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 1525
心在旅途
心在旅途 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);
    
    0 讨论(0)
  • 2020-12-15 00:37

    I have a some problem, an I added below code to Android Manifest. It is work fine.

    <application        
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name"
        android:theme="@style/CustomTheme"
        android:allowBackup="true"           
        android:vmSafeMode="true"       
        android:allowClearUserData="true"
        android:hardwareAccelerated="true" >
    
    0 讨论(0)
提交回复
热议问题