Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
492 views
in Technique[技术] by (71.8m points)

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

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:

   #00  pc 000000000001da4c  /system/lib64/libc.so (abort+112)
   #01  pc 0000000000007f7c  /system/lib64/liblog.so (__android_log_assert+312) 
   #02  pc 000000000006cff8  /system/lib64/libhwui.so (android::uirenderer::renderthread::EglManager::createSurface(ANativeWindow*, bool)+324) 
   #03  pc 000000000006ad14  /system/lib64/libhwui.so (android::uirenderer::renderthread::OpenGLPipeline::setSurface(android::Surface*, android::uirenderer::renderthread::SwapBehavior, android::uirenderer::renderthread::ColorMode)+72) 
   #04  pc 00000000000679ec  /system/lib64/libhwui.so (android::uirenderer::renderthread::CanvasContext::setSurface(android::Surface*)+144) 
   #05  pc 00000000000703bc  /system/lib64/libhwui.so (android::uirenderer::renderthread::Bridge_initialize(android::uirenderer::renderthread::initializeArgs*)+16) 
   #06  pc 00000000000726c4  /system/lib64/libhwui.so (android::uirenderer::renderthread::MethodInvokeRenderTask::run()+24) 
   #07  pc 00000000000738d8  /system/lib64/libhwui.so (android::uirenderer::renderthread::RenderThread::threadLoop()+336) 
   #08  pc 0000000000011504  /system/lib64/libutils.so (android::Thread::_threadLoop(void*)+264) 
   #09  pc 00000000000a9830  /system/lib64/libandroid_runtime.so (android::AndroidRuntime::javaThreadShell(void*)+140) 
   #10  pc 0000000000069c94  /system/lib64/libc.so (__pthread_start(void*)+36) 
   #11  pc 000000000001eeec  /system/lib64/libc.so (__start_thread+68)

UPDATE: I guess the issue can be solved only by Google themselves :( Issue is tracked here https://issuetracker.google.com/issues/70259031
In the meantime, could someone already reproduce the issue or at least explain when the issue occurs? This would help to find a workaround!

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

Check out this answer:

tgkill - native error on Android 8.0 Samsung S8

It seems it might be related to Samsung S8 and Samsung S8+.

Basically, if you have an edit text in a dialog or dialog fragment, highlight the text and then close the dialog (or do an orientation change) this crash will occur.

To resolve the issue, I had to turn off hardwareAcceleration on the offending activities - this can be done in the manifest and will cause the activity to lag a bit.

   <activity android:name=".activities.CarDamageActivity"
           android:hardwareAccelerated="false" />

To help prevent the lag on OTHER devices, one can check the device model and if it is NOT a S8 or S8+, turn ON the hardware acceleration.

    String phoneMake =  Build.MANUFACTURER;
    String phoneModel =  Build.MODEL.toUpperCase();
    if (!(phoneMake.equalsIgnoreCase("samsung") && (phoneModel.startsWith("SM-G950")
            ||  phoneModel.startsWith("SM-G955")))) {
        window.setFlags(
                WindowManager.LayoutParams.FLAG_HARDWARE_ACCELERATED,
                WindowManager.LayoutParams.FLAG_HARDWARE_ACCELERATED);
    }

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...