Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/231.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android 渲染期间遇到EGL错误12291 EGL_BAD_ALLOC_Android - Fatal编程技术网

Android 渲染期间遇到EGL错误12291 EGL_BAD_ALLOC

Android 渲染期间遇到EGL错误12291 EGL_BAD_ALLOC,android,Android,我有一个处理图像的实时壁纸应用程序。我在Play Store(但不是fabric.io)中收到了一些关于堆栈跟踪的崩溃报告: *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** Build fingerprint: 'samsung/hero2ltexx/hero2lte:6.0.1/MMB29K/G935FXXU1APDN:user/release-keys' Revision: '9' ABI: 'arm64' pi

我有一个处理图像的实时壁纸应用程序。我在Play Store(但不是fabric.io)中收到了一些关于堆栈跟踪的崩溃报告:

*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
Build fingerprint: 'samsung/hero2ltexx/hero2lte:6.0.1/MMB29K/G935FXXU1APDN:user/release-keys'
Revision: '9'
ABI: 'arm64'
pid: 15250, tid: 15331, name: RenderThread  >>> com.xxxx.xxxxx <<<
signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
Abort message: 'Encountered EGL error 12291 EGL_BAD_ALLOC during rendering'
    x0   0000000000000000  x1   0000000000003be3  x2   0000000000000006  x3   0000000000000000
    x4   0000000000000000  x5   0000000000000001  x6   0000000000000000  x7   0000000000000000
    x8   0000000000000083  x9   fefeff7e6032ce0b  x10  7f7f7f7f7f7fff7f  x11  0101010101010101
    x12  0000000000000010  x13  0000007f6f425bdc  x14  0000000000000001  x15  000000000000000f
    x16  0000007f9422f568  x17  0000007f941c23b8  x18  0000007f945cf720  x19  0000007f6f426500
    x20  0000007f6f426440  x21  0000000000000019  x22  0000000000000006  x23  0000007f6132f6c0
    x24  0000007f6132e800  x25  0000007f614fd7b0  x26  0000000000000002  x27  0000007f70602bb0
    x28  0000007f6eb58c10  x29  0000007f6f425b80  x30  0000007f941bfb54
    sp   0000007f6f425b80  pc   0000007f941c23c0  pstate 0000000020000000

backtrace:
    #00 pc 00000000000693c0  /system/lib64/libc.so (tgkill+8)
    #01 pc 0000000000066b50  /system/lib64/libc.so (pthread_kill+68)
    #02 pc 0000000000023990  /system/lib64/libc.so (raise+28)
    #03 pc 000000000001e2c0  /system/lib64/libc.so (abort+60)
    #04 pc 000000000000cf04  /system/lib64/libcutils.so (__android_log_assert+236)
    #05 pc 000000000002be6c  /system/lib64/libhwui.so
    #06 pc 00000000000284f4  /system/lib64/libhwui.so
    #07 pc 000000000002aa68  /system/lib64/libhwui.so
    #08 pc 000000000002ef50  /system/lib64/libhwui.so (_ZN7android10uirenderer12renderthread12RenderThread10threadLoopEv+124)
    #09 pc 000000000001699c  /system/lib64/libutils.so (_ZN7android6Thread11_threadLoopEPv+208)
    #10 pc 0000000000095110  /system/lib64/libandroid_runtime.so (_ZN7android14AndroidRuntime15javaThreadShellEPv+96)
    #11 pc 00000000000161ec  /system/lib64/libutils.so
    #12 pc 0000000000065fa0  /system/lib64/libc.so (_ZL15__pthread_startPv+52)
    #13 pc 000000000001ee6c  /system/lib64/libc.so (__start_thread+16)
************************************************
构建指纹:“三星/hero2ltexx/hero2lte:6.0.1/MMB29K/G935FXXU1APDN:user/release key”
修订:“9”
阿比:“arm64”

pid:15250,tid:15331,name:RenderThread>>>com.xxxx.xxxxx我在一个服务中遇到了同样的问题,当服务被破坏时它会崩溃,请删除WindowManager上的一些视图

我发现有效的解决方案是使用removeViewImmediate而不是removeView删除视图

@Override
public void onDestroy() {
  super.onDestroy();
  WindowManager windowManager = (WindowManager) getSystemService(WINDOW_SERVICE);
  windowManager.removeView(view);
}
取代

@Override
public void onDestroy() {
  super.onDestroy();
  WindowManager windowManager = (WindowManager) getSystemService(WINDOW_SERVICE);
  windowManager.removeViewImmediate(view);
}

不知道为什么这个问题还没有解决,医生很轻


这只发生在使用安卓6.0.1(主要是S6和S7)的三星设备上。

我也有同样的问题。如果你找到了解决方案,请不要忘记分享你的补丁。请检查一下。我在中兴W6.0.1上看到过这个。相同的调用堆栈(不是LiveWallper,只是一个普通的应用程序)。三星S6搭载android 6.0.1Hi,我也遇到了类似的问题:当我打开BottomSheetDialog时,一切正常。但在显示BottomSheetDialog后的1s内,应用程序会因该错误而崩溃。有什么建议吗?谢谢