Android Lollipop 5.1: Fatal signal 11 (SIGSEGV), code 2, fault addr 0x9e985ff8 in tid 4093 (RenderThread) / when using lot of nine patch graphics

前端 未结 2 1527
心在旅途
心在旅途 2020-12-14 23:51

I\'m using quite a large amount of NinePatchDrawables in the app views. The underlying Bitmaps are cached, so there is no memory issue.

While preparing/drawing the

2条回答
  •  鱼传尺愫
    2020-12-15 00:35

    So far (even in Android M) there's no bug fix for the graphics driver bug (Adreno 420), but I found a way to work around the bug. It's definitely not a long time solution, but for the moment it's just the best available to stop apps from crashing.

    I reduced the number of graphics layers to a minimum (flattened many layered graphics)

    I disabled GPU rendering for particular graphic layers. It slows the drawing down a bit, but not significant.

    view.setLayerType(View.LAYER_TYPE_SOFTWARE, null);
    

    Within the "software" layers, you can still set particular views to "hardware" rendering, if you need to.

    view.setLayerType(View.LAYER_TYPE_HARDWARE, null);
    

提交回复
热议问题