Native crashes on abort in developer console with Oreo (8.1)

前端 未结 2 1250
执念已碎
执念已碎 2020-12-13 18:32

In the developer console I get more and more a native crash in abort. This occurs ONLY for android 8.1 device! Is anybody aware of a regression? Here is the backtrace:

2条回答
  •  萌比男神i
    2020-12-13 19:09

    that a Surface is being used hints for OpenGL ES and GLSurfaceView - which extends View.

    a possible workaround might be to disable hardware acceleration for the views, which cause it to crash on Android 8.1 and 9.0 (as libhwui.so hints for) - because even if it gets fixed, any device not updated will still keep crashing. this can be done per View (see the documentation):

    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O_MR1) {
        mSurface.setLayerType(View.LAYER_TYPE_SOFTWARE, null);
    }
    

    of course, this would result in sub-optimal performance; but still better than a crash.

提交回复
热议问题