Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ax::backend::CommandBufferGL::drawArrays 中的glDrawArrays崩溃BUG #2240

Open
cxcxiaochuan opened this issue Nov 23, 2024 · 7 comments
Open

Comments

@cxcxiaochuan
Copy link

cxcxiaochuan commented Nov 23, 2024

崩溃版本:axmol-2.1.2

崩溃堆栈A:
崩溃手机:Infinix Infinix-X6515 (Infinix SMART 7)
崩溃系统:Android 12 (SDK 31)
崩溃堆栈:

backtrace:
  #00  pc 0x00000000000f7fb0  /vendor/lib64/egl/libGLESv2_mtk.so
  #01  pc 0x000000000006f9a4  /vendor/lib64/egl/libGLESv2_mtk.so
  #02  pc 0x000000000006f364  /vendor/lib64/egl/libGLESv2_mtk.so
  #03  pc 0x000000000006d6f8  /vendor/lib64/egl/libGLESv2_mtk.so (glDrawArrays+3500)
  #04  pc 0x0000000000919364  /data/app/~~Id52RRpArY9ErdNEZhL1Rg==/*******==/split_config.arm64_v8a.apk!libGame.so (ax::backend::CommandBufferGL::drawArrays(ax::backend::PrimitiveType, unsigned long, unsigned long, bool)+76) (BuildId: 5498f62da2355a571210a636d6989be2873c7f2a)
  #05  pc 0x00000000008fb508  /data/app/~~Id52RRpArY9ErdNEZhL1Rg==/*******==/split_config.arm64_v8a.apk!libGame.so (ax::Renderer::drawCustomCommand(ax::RenderCommand*)+504) (BuildId: 5498f62da2355a571210a636d6989be2873c7f2a)
  #06  pc 0x00000000008faad4  /data/app/~~Id52RRpArY9ErdNEZhL1Rg==/*******==/split_config.arm64_v8a.apk!libGame.so (ax::Renderer::visitRenderQueue(ax::RenderQueue&)+368) (BuildId: 5498f62da2355a571210a636d6989be2873c7f2a)
  #07  pc 0x00000000008fa818  /data/app/~~Id52RRpArY9ErdNEZhL1Rg==/*******==/split_config.arm64_v8a.apk!libGame.so (ax::Renderer::processGroupCommand(ax::GroupCommand*)+224) (BuildId: 5498f62da2355a571210a636d6989be2873c7f2a)
  #08  pc 0x00000000008fac98  /data/app/~~Id52RRpArY9ErdNEZhL1Rg==/*******==/split_config.arm64_v8a.apk!libGame.so (ax::Renderer::processRenderCommand(ax::RenderCommand*)+128) (BuildId: 5498f62da2355a571210a636d6989be2873c7f2a)
  #09  pc 0x00000000008faad4  /data/app/~~Id52RRpArY9ErdNEZhL1Rg==/*******==/split_config.arm64_v8a.apk!libGame.so (ax::Renderer::visitRenderQueue(ax::RenderQueue&)+368) (BuildId: 5498f62da2355a571210a636d6989be2873c7f2a)
  #10  pc 0x00000000008fb600  /data/app/~~Id52RRpArY9ErdNEZhL1Rg==/*******==/split_config.arm64_v8a.apk!libGame.so (ax::Renderer::render()+84) (BuildId: 5498f62da2355a571210a636d6989be2873c7f2a)
  #11  pc 0x00000000008a5bec  /data/app/~~Id52RRpArY9ErdNEZhL1Rg==/*******==/split_config.arm64_v8a.apk!libGame.so (ax::Scene::render(ax::Renderer*, ax::Mat4 const&, ax::Mat4 const*)+248) (BuildId: 5498f62da2355a571210a636d6989be2873c7f2a)
  #12  pc 0x0000000000935ec4  /data/app/~~Id52RRpArY9ErdNEZhL1Rg==/*******==/split_config.arm64_v8a.apk!libGame.so (ax::Director::drawScene()+372) (BuildId: 5498f62da2355a571210a636d6989be2873c7f2a)
  #13  pc 0x0000000000938248  /data/app/~~Id52RRpArY9ErdNEZhL1Rg==/*******==/split_config.arm64_v8a.apk!libGame.so (ax::Director::mainLoop()+124) (BuildId: 5498f62da2355a571210a636d6989be2873c7f2a)
  #14  pc 0x0000000000068ecc  /data/app/~~Id52RRpArY9ErdNEZhL1Rg==/*******==/oat/arm64/base.odex (art_jni_trampoline+108)

崩溃堆栈B:
崩溃手机:OPPO OP4F97 (CPH2269)
崩溃系统:Android 11 (SDK 30)
崩溃堆栈:

backtrace:
  #00  pc 0x0000000000095fac  /vendor/lib64/egl/libGLESv2_mtk.so
  #01  pc 0x00000000000b5244  /vendor/lib64/egl/libGLESv2_mtk.so
  #02  pc 0x00000000000b4c44  /vendor/lib64/egl/libGLESv2_mtk.so
  #03  pc 0x00000000000b32b4  /vendor/lib64/egl/libGLESv2_mtk.so (glDrawArrays+3560)
  #04  pc 0x0000000000087be0  /vendor/lib64/egl/libGLES_meow.so (MEOW::meow_call_ddk_gl_2_glDrawArrays(unsigned int, int, int)+32)
  #05  pc 0x0000000000919364  /data/app/~~BRLZDVGYMl0K3V_Vmx0Ihw==/*******==/split_config.arm64_v8a.apk!libGame.so (ax::backend::CommandBufferGL::drawArrays(ax::backend::PrimitiveType, unsigned long, unsigned long, bool)+76) (BuildId: 5498f62da2355a571210a636d6989be2873c7f2a)
  #06  pc 0x00000000008fb508  /data/app/~~BRLZDVGYMl0K3V_Vmx0Ihw==/*******==/split_config.arm64_v8a.apk!libGame.so (ax::Renderer::drawCustomCommand(ax::RenderCommand*)+504) (BuildId: 5498f62da2355a571210a636d6989be2873c7f2a)
  #07  pc 0x00000000008faad4  /data/app/~~BRLZDVGYMl0K3V_Vmx0Ihw==/*******==/split_config.arm64_v8a.apk!libGame.so (ax::Renderer::visitRenderQueue(ax::RenderQueue&)+368) (BuildId: 5498f62da2355a571210a636d6989be2873c7f2a)
  #08  pc 0x00000000008fa818  /data/app/~~BRLZDVGYMl0K3V_Vmx0Ihw==/*******==/split_config.arm64_v8a.apk!libGame.so (ax::Renderer::processGroupCommand(ax::GroupCommand*)+224) (BuildId: 5498f62da2355a571210a636d6989be2873c7f2a)
  #09  pc 0x00000000008fac98  /data/app/~~BRLZDVGYMl0K3V_Vmx0Ihw==/*******==/split_config.arm64_v8a.apk!libGame.so (ax::Renderer::processRenderCommand(ax::RenderCommand*)+128) (BuildId: 5498f62da2355a571210a636d6989be2873c7f2a)
  #10  pc 0x00000000008faad4  /data/app/~~BRLZDVGYMl0K3V_Vmx0Ihw==/*******==/split_config.arm64_v8a.apk!libGame.so (ax::Renderer::visitRenderQueue(ax::RenderQueue&)+368) (BuildId: 5498f62da2355a571210a636d6989be2873c7f2a)
  #11  pc 0x00000000008fb600  /data/app/~~BRLZDVGYMl0K3V_Vmx0Ihw==/*******==/split_config.arm64_v8a.apk!libGame.so (ax::Renderer::render()+84) (BuildId: 5498f62da2355a571210a636d6989be2873c7f2a)
  #12  pc 0x00000000008a5bec  /data/app/~~BRLZDVGYMl0K3V_Vmx0Ihw==/*******==/split_config.arm64_v8a.apk!libGame.so (ax::Scene::render(ax::Renderer*, ax::Mat4 const&, ax::Mat4 const*)+248) (BuildId: 5498f62da2355a571210a636d6989be2873c7f2a)
  #13  pc 0x0000000000935ec4  /data/app/~~BRLZDVGYMl0K3V_Vmx0Ihw==/*******==/split_config.arm64_v8a.apk!libGame.so (ax::Director::drawScene()+372) (BuildId: 5498f62da2355a571210a636d6989be2873c7f2a)
  #14  pc 0x0000000000938248  /data/app/~~BRLZDVGYMl0K3V_Vmx0Ihw==/*******==/split_config.arm64_v8a.apk!libGame.so (ax::Director::mainLoop()+124) (BuildId: 5498f62da2355a571210a636d6989be2873c7f2a)
  #15  pc 0x0000000000070eb0  /data/app/~~BRLZDVGYMl0K3V_Vmx0Ihw==/*******==/oat/arm64/base.odex (art_jni_trampoline+144)
  #16  pc 0x00000000001460c0  /data/app/~~BRLZDVGYMl0K3V_Vmx0Ihw==/*******==/oat/arm64/base.odex (org.axmol.lib.AxmolRenderer.onDrawFrame+128)
  #17  pc 0x0000000000682c14  /system/framework/arm64/boot-framework.oat (android.opengl.GLSurfaceView$GLThread.guardedRun+6612)
  #18  pc 0x0000000000683474  /system/framework/arm64/boot-framework.oat (android.opengl.GLSurfaceView$GLThread.run+436)
  #19  pc 0x0000000000133564  /apex/com.android.art/lib64/libart.so (art_quick_invoke_stub+548)
  #20  pc 0x00000000001a97e8  /apex/com.android.art/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+200)
  #21  pc 0x000000000055e57c  /apex/com.android.art/lib64/libart.so (art::JValue art::InvokeVirtualOrInterfaceWithJValues<art::ArtMethod*>(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, art::ArtMethod*, jvalue const*)+460)
  #22  pc 0x00000000005ad7cc  /apex/com.android.art/lib64/libart.so (art::Thread::CreateCallback(void*)+1308)
  #23  pc 0x00000000000db188  /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+64)
  #24  pc 0x000000000007a9d0  /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+64)

崩溃堆栈C:
崩溃手机:OPPO OP56F5 (A17k)
崩溃系统:Android 12 (SDK 31)
崩溃堆栈:

backtrace:
  #00  pc 0x0000000000095040  /vendor/lib64/egl/libGLESv2_mtk.so
  #01  pc 0x00000000000b3f84  /vendor/lib64/egl/libGLESv2_mtk.so
  #02  pc 0x00000000000b3934  /vendor/lib64/egl/libGLESv2_mtk.so
  #03  pc 0x00000000000b1f3c  /vendor/lib64/egl/libGLESv2_mtk.so (glDrawArrays+2880)
  #04  pc 0x0000000000919364  /data/app/~~gH2YlQHMXgJRO0xm5TTQlw==/*******==/split_config.arm64_v8a.apk!libGame.so (ax::backend::CommandBufferGL::drawArrays(ax::backend::PrimitiveType, unsigned long, unsigned long, bool)+76) (BuildId: 5498f62da2355a571210a636d6989be2873c7f2a)
  #05  pc 0x00000000008fb508  /data/app/~~gH2YlQHMXgJRO0xm5TTQlw==/*******==/split_config.arm64_v8a.apk!libGame.so (ax::Renderer::drawCustomCommand(ax::RenderCommand*)+504) (BuildId: 5498f62da2355a571210a636d6989be2873c7f2a)
  #06  pc 0x00000000008faad4  /data/app/~~gH2YlQHMXgJRO0xm5TTQlw==/*******==/split_config.arm64_v8a.apk!libGame.so (ax::Renderer::visitRenderQueue(ax::RenderQueue&)+368) (BuildId: 5498f62da2355a571210a636d6989be2873c7f2a)
  #07  pc 0x00000000008fa818  /data/app/~~gH2YlQHMXgJRO0xm5TTQlw==/*******==/split_config.arm64_v8a.apk!libGame.so (ax::Renderer::processGroupCommand(ax::GroupCommand*)+224) (BuildId: 5498f62da2355a571210a636d6989be2873c7f2a)
  #08  pc 0x00000000008fac98  /data/app/~~gH2YlQHMXgJRO0xm5TTQlw==/*******==/split_config.arm64_v8a.apk!libGame.so (ax::Renderer::processRenderCommand(ax::RenderCommand*)+128) (BuildId: 5498f62da2355a571210a636d6989be2873c7f2a)
  #09  pc 0x00000000008faad4  /data/app/~~gH2YlQHMXgJRO0xm5TTQlw==/*******==/split_config.arm64_v8a.apk!libGame.so (ax::Renderer::visitRenderQueue(ax::RenderQueue&)+368) (BuildId: 5498f62da2355a571210a636d6989be2873c7f2a)
  #10  pc 0x00000000008fb600  /data/app/~~gH2YlQHMXgJRO0xm5TTQlw==/*******==/split_config.arm64_v8a.apk!libGame.so (ax::Renderer::render()+84) (BuildId: 5498f62da2355a571210a636d6989be2873c7f2a)
  #11  pc 0x00000000008a5bec  /data/app/~~gH2YlQHMXgJRO0xm5TTQlw==/*******==/split_config.arm64_v8a.apk!libGame.so (ax::Scene::render(ax::Renderer*, ax::Mat4 const&, ax::Mat4 const*)+248) (BuildId: 5498f62da2355a571210a636d6989be2873c7f2a)
  #12  pc 0x0000000000935ec4  /data/app/~~gH2YlQHMXgJRO0xm5TTQlw==/*******==/split_config.arm64_v8a.apk!libGame.so (ax::Director::drawScene()+372) (BuildId: 5498f62da2355a571210a636d6989be2873c7f2a)
  #13  pc 0x0000000000938248  /data/app/~~gH2YlQHMXgJRO0xm5TTQlw==/*******==/split_config.arm64_v8a.apk!libGame.so (ax::Director::mainLoop()+124) (BuildId: 5498f62da2355a571210a636d6989be2873c7f2a)
  #14  pc 0x00000000003a8b5c  /data/misc/apexdata/com.android.art/dalvik-cache/arm64/boot.oat (art_jni_trampoline+108)

崩溃堆栈D:
崩溃手机:Itel itel-A667L (itel A50)
崩溃系统:Android 14 (SDK 34)
崩溃堆栈:

backtrace:
  #00  pc 0x00000000000b6cd2  /vendor/lib/egl/libGLESv2_powervr.so
  #01  pc 0x000000000005608d  /vendor/lib/egl/libGLESv2_powervr.so
  #02  pc 0x0000000000055409  /vendor/lib/egl/libGLESv2_powervr.so (glDrawArrays+1024)
  #03  pc 0x000000000064f477  /data/app/~~d2k45pSXHHfL6H1qCO7IJA==/*******==/split_config.armeabi_v7a.apk!libGame.so (ax::backend::CommandBufferGL::drawArrays(ax::backend::PrimitiveType, unsigned int, unsigned int, bool)+46) (BuildId: bd26b3b83d492ac2e02c800327ef6334fb6dbd99)
  #04  pc 0x0000000000639821  /data/app/~~d2k45pSXHHfL6H1qCO7IJA==/*******==/split_config.armeabi_v7a.apk!libGame.so (ax::Renderer::drawCustomCommand(ax::RenderCommand*)+360) (BuildId: bd26b3b83d492ac2e02c800327ef6334fb6dbd99)
  #05  pc 0x000000000063904d  /data/app/~~d2k45pSXHHfL6H1qCO7IJA==/*******==/split_config.armeabi_v7a.apk!libGame.so (ax::Renderer::visitRenderQueue(ax::RenderQueue&)+270) (BuildId: bd26b3b83d492ac2e02c800327ef6334fb6dbd99)
  #06  pc 0x0000000000638e5f  /data/app/~~d2k45pSXHHfL6H1qCO7IJA==/*******==/split_config.armeabi_v7a.apk!libGame.so (ax::Renderer::processGroupCommand(ax::GroupCommand*)+158) (BuildId: bd26b3b83d492ac2e02c800327ef6334fb6dbd99)
  #07  pc 0x0000000000639183  /data/app/~~d2k45pSXHHfL6H1qCO7IJA==/*******==/split_config.armeabi_v7a.apk!libGame.so (ax::Renderer::processRenderCommand(ax::RenderCommand*)+62) (BuildId: bd26b3b83d492ac2e02c800327ef6334fb6dbd99)
  #08  pc 0x000000000063904d  /data/app/~~d2k45pSXHHfL6H1qCO7IJA==/*******==/split_config.armeabi_v7a.apk!libGame.so (ax::Renderer::visitRenderQueue(ax::RenderQueue&)+270) (BuildId: bd26b3b83d492ac2e02c800327ef6334fb6dbd99)
  #09  pc 0x00000000006398bf  /data/app/~~d2k45pSXHHfL6H1qCO7IJA==/*******==/split_config.armeabi_v7a.apk!libGame.so (ax::Renderer::render()+56) (BuildId: bd26b3b83d492ac2e02c800327ef6334fb6dbd99)
  #10  pc 0x00000000005fadd7  /data/app/~~d2k45pSXHHfL6H1qCO7IJA==/*******==/split_config.armeabi_v7a.apk!libGame.so (ax::Scene::render(ax::Renderer*, ax::Mat4 const&, ax::Mat4 const*)+266) (BuildId: bd26b3b83d492ac2e02c800327ef6334fb6dbd99)
  #11  pc 0x0000000000664035  /data/app/~~d2k45pSXHHfL6H1qCO7IJA==/*******==/split_config.armeabi_v7a.apk!libGame.so (ax::Director::drawScene()+380) (BuildId: bd26b3b83d492ac2e02c800327ef6334fb6dbd99)
  #12  pc 0x0000000000665b0b  /data/app/~~d2k45pSXHHfL6H1qCO7IJA==/*******==/split_config.armeabi_v7a.apk!libGame.so (ax::Director::mainLoop()+74) (BuildId: bd26b3b83d492ac2e02c800327ef6334fb6dbd99)
  #13  pc 0x0000000000309181  /data/misc/apexdata/com.android.art/dalvik-cache/arm/boot.oat (art_jni_trampoline+64)
  #14  pc 0x0000000002009bd9  /memfd:jit-cache (org.axmol.lib.AxmolRenderer.onDrawFrame+136)
  #15  pc 0x00000000000a0c68  /apex/com.android.art/lib/libart.so (nterp_helper+5464)
  #16  pc 0x00000000004e86ae  /system/framework/framework.jar (android.opengl.GLSurfaceView$GLThread.guardedRun+1066)
  #17  pc 0x00000000000a0200  /apex/com.android.art/lib/libart.so (nterp_helper+2800)
  #18  pc 0x00000000004e8ca4  /system/framework/framework.jar (android.opengl.GLSurfaceView$GLThread.run+52)
  #19  pc 0x00000000000a4575  /apex/com.android.art/lib/libart.so (art_quick_invoke_stub_internal+68)
  #20  pc 0x00000000005ace41  /apex/com.android.art/lib/libart.so (art_quick_invoke_stub+248)
  #21  pc 0x0000000000208c25  /apex/com.android.art/lib/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+120)
  #22  pc 0x0000000000517e9b  /apex/com.android.art/lib/libart.so (art::Thread::CreateCallback(void*)+1106)
  #23  pc 0x0000000000517a3f  /apex/com.android.art/lib/libart.so (art::Thread::CreateCallbackWithUffdGc(void*)+2)
  #24  pc 0x00000000000ad33b  /apex/com.android.runtime/lib/bionic/libc.so (__pthread_start(void*)+40)
  #25  pc 0x0000000000063da7  /apex/com.android.runtime/lib/bionic/libc.so (__start_thread+30)

崩溃堆栈E:
崩溃手机:samsung a10s (Galaxy A10s)
崩溃系统:Android 11 (SDK 30)
崩溃堆栈:

backtrace:
  #00  pc 0x000000000007018e  /vendor/lib/egl/libGLESv2_mtk.so
  #01  pc 0x0000000000089c81  /vendor/lib/egl/libGLESv2_mtk.so
  #02  pc 0x00000000000888b9  /vendor/lib/egl/libGLESv2_mtk.so (glDrawArrays+2592)
  #03  pc 0x000000000002d549  /vendor/lib/egl/libGLES_meow.so (MEOW::meow_call_ddk_gl_2_glDrawArrays(unsigned int, int, int)+20)
  #04  pc 0x000000000064f477  /data/app/~~QgCFi8VFp5Xad2x-r0M8GA==/*******==/split_config.armeabi_v7a.apk!libGame.so (ax::backend::CommandBufferGL::drawArrays(ax::backend::PrimitiveType, unsigned int, unsigned int, bool)+46) (BuildId: bd26b3b83d492ac2e02c800327ef6334fb6dbd99)
  #05  pc 0x0000000000639821  /data/app/~~QgCFi8VFp5Xad2x-r0M8GA==/*******==/split_config.armeabi_v7a.apk!libGame.so (ax::Renderer::drawCustomCommand(ax::RenderCommand*)+360) (BuildId: bd26b3b83d492ac2e02c800327ef6334fb6dbd99)
  #06  pc 0x000000000063904d  /data/app/~~QgCFi8VFp5Xad2x-r0M8GA==/*******==/split_config.armeabi_v7a.apk!libGame.so (ax::Renderer::visitRenderQueue(ax::RenderQueue&)+270) (BuildId: bd26b3b83d492ac2e02c800327ef6334fb6dbd99)
  #07  pc 0x0000000000638e5f  /data/app/~~QgCFi8VFp5Xad2x-r0M8GA==/*******==/split_config.armeabi_v7a.apk!libGame.so (ax::Renderer::processGroupCommand(ax::GroupCommand*)+158) (BuildId: bd26b3b83d492ac2e02c800327ef6334fb6dbd99)
  #08  pc 0x0000000000639183  /data/app/~~QgCFi8VFp5Xad2x-r0M8GA==/*******==/split_config.armeabi_v7a.apk!libGame.so (ax::Renderer::processRenderCommand(ax::RenderCommand*)+62) (BuildId: bd26b3b83d492ac2e02c800327ef6334fb6dbd99)
  #09  pc 0x000000000063904d  /data/app/~~QgCFi8VFp5Xad2x-r0M8GA==/*******==/split_config.armeabi_v7a.apk!libGame.so (ax::Renderer::visitRenderQueue(ax::RenderQueue&)+270) (BuildId: bd26b3b83d492ac2e02c800327ef6334fb6dbd99)
  #10  pc 0x00000000006398bf  /data/app/~~QgCFi8VFp5Xad2x-r0M8GA==/*******==/split_config.armeabi_v7a.apk!libGame.so (ax::Renderer::render()+56) (BuildId: bd26b3b83d492ac2e02c800327ef6334fb6dbd99)
  #11  pc 0x00000000005fadd7  /data/app/~~QgCFi8VFp5Xad2x-r0M8GA==/*******==/split_config.armeabi_v7a.apk!libGame.so (ax::Scene::render(ax::Renderer*, ax::Mat4 const&, ax::Mat4 const*)+266) (BuildId: bd26b3b83d492ac2e02c800327ef6334fb6dbd99)
  #12  pc 0x0000000000664035  /data/app/~~QgCFi8VFp5Xad2x-r0M8GA==/*******==/split_config.armeabi_v7a.apk!libGame.so (ax::Director::drawScene()+380) (BuildId: bd26b3b83d492ac2e02c800327ef6334fb6dbd99)
  #13  pc 0x0000000000665b0b  /data/app/~~QgCFi8VFp5Xad2x-r0M8GA==/*******==/split_config.armeabi_v7a.apk!libGame.so (ax::Director::mainLoop()+74) (BuildId: bd26b3b83d492ac2e02c800327ef6334fb6dbd99)
  #14  pc 0x000000000006e9a7  /data/app/~~QgCFi8VFp5Xad2x-r0M8GA==/*******==/oat/arm/base.odex (art_jni_trampoline+94)
  #15  pc 0x0000000000127d27  /data/app/~~QgCFi8VFp5Xad2x-r0M8GA==/*******==/oat/arm/base.odex (org.axmol.lib.AxmolRenderer.onDrawFrame+150)
  #16  pc 0x00000000005955d1  /system/framework/arm/boot-framework.oat (android.opengl.GLSurfaceView$GLThread.guardedRun+3592)
  #17  pc 0x0000000000595d09  /system/framework/arm/boot-framework.oat (android.opengl.GLSurfaceView$GLThread.run+184)
  #18  pc 0x00000000000d47d5  /apex/com.android.art/lib/libart.so (art_quick_invoke_stub_internal+68)
  #19  pc 0x00000000004f2427  /apex/com.android.art/lib/libart.so (art_quick_invoke_stub+282)
  #20  pc 0x000000000012cb2d  /apex/com.android.art/lib/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+148)
  #21  pc 0x00000000003ff4df  /apex/com.android.art/lib/libart.so (art::JValue art::InvokeVirtualOrInterfaceWithJValues<art::ArtMethod*>(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, art::ArtMethod*, jvalue const*)+374)
  #22  pc 0x00000000003ff5ef  /apex/com.android.art/lib/libart.so (art::JValue art::InvokeVirtualOrInterfaceWithJValues<_jmethodID*>(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, _jmethodID*, jvalue const*)+42)
  #23  pc 0x0000000000440b35  /apex/com.android.art/lib/libart.so (art::Thread::CreateCallback(void*)+1056)
  #24  pc 0x00000000000aad13  /apex/com.android.runtime/lib/bionic/libc.so (__pthread_start(void*)+40)
  #25  pc 0x0000000000064193  /apex/com.android.runtime/lib/bionic/libc.so (__start_thread+30)

崩溃堆栈F:
崩溃手机:OPPO OP56F5 (A17k)
崩溃系统:Android 12 (SDK 31)
崩溃堆栈:

backtrace:
  #00  pc 0x0000000000095040  /vendor/lib64/egl/libGLESv2_mtk.so
  #01  pc 0x00000000000b3f84  /vendor/lib64/egl/libGLESv2_mtk.so
  #02  pc 0x00000000000b3934  /vendor/lib64/egl/libGLESv2_mtk.so
  #03  pc 0x00000000000b1f3c  /vendor/lib64/egl/libGLESv2_mtk.so (glDrawArrays+2880)
  #04  pc 0x0000000000919364  /data/app/~~b-zjfqOn6IWrb3kdYPr1Gg==/*******==/split_config.arm64_v8a.apk!libGame.so (ax::backend::CommandBufferGL::drawArrays(ax::backend::PrimitiveType, unsigned long, unsigned long, bool)+76) (BuildId: 5498f62da2355a571210a636d6989be2873c7f2a)
  #05  pc 0x00000000008fb508  /data/app/~~b-zjfqOn6IWrb3kdYPr1Gg==/*******==/split_config.arm64_v8a.apk!libGame.so (ax::Renderer::drawCustomCommand(ax::RenderCommand*)+504) (BuildId: 5498f62da2355a571210a636d6989be2873c7f2a)
  #06  pc 0x00000000008faad4  /data/app/~~b-zjfqOn6IWrb3kdYPr1Gg==/*******==/split_config.arm64_v8a.apk!libGame.so (ax::Renderer::visitRenderQueue(ax::RenderQueue&)+368) (BuildId: 5498f62da2355a571210a636d6989be2873c7f2a)
  #07  pc 0x00000000008fa818  /data/app/~~b-zjfqOn6IWrb3kdYPr1Gg==/*******==/split_config.arm64_v8a.apk!libGame.so (ax::Renderer::processGroupCommand(ax::GroupCommand*)+224) (BuildId: 5498f62da2355a571210a636d6989be2873c7f2a)
  #08  pc 0x00000000008fac98  /data/app/~~b-zjfqOn6IWrb3kdYPr1Gg==/*******==/split_config.arm64_v8a.apk!libGame.so (ax::Renderer::processRenderCommand(ax::RenderCommand*)+128) (BuildId: 5498f62da2355a571210a636d6989be2873c7f2a)
  #09  pc 0x00000000008faad4  /data/app/~~b-zjfqOn6IWrb3kdYPr1Gg==/*******==/split_config.arm64_v8a.apk!libGame.so (ax::Renderer::visitRenderQueue(ax::RenderQueue&)+368) (BuildId: 5498f62da2355a571210a636d6989be2873c7f2a)
  #10  pc 0x00000000008fb600  /data/app/~~b-zjfqOn6IWrb3kdYPr1Gg==/*******==/split_config.arm64_v8a.apk!libGame.so (ax::Renderer::render()+84) (BuildId: 5498f62da2355a571210a636d6989be2873c7f2a)
  #11  pc 0x00000000008a5bec  /data/app/~~b-zjfqOn6IWrb3kdYPr1Gg==/*******==/split_config.arm64_v8a.apk!libGame.so (ax::Scene::render(ax::Renderer*, ax::Mat4 const&, ax::Mat4 const*)+248) (BuildId: 5498f62da2355a571210a636d6989be2873c7f2a)
  #12  pc 0x0000000000935ec4  /data/app/~~b-zjfqOn6IWrb3kdYPr1Gg==/*******==/split_config.arm64_v8a.apk!libGame.so (ax::Director::drawScene()+372) (BuildId: 5498f62da2355a571210a636d6989be2873c7f2a)
  #13  pc 0x0000000000938248  /data/app/~~b-zjfqOn6IWrb3kdYPr1Gg==/*******==/split_config.arm64_v8a.apk!libGame.so (ax::Director::mainLoop()+124) (BuildId: 5498f62da2355a571210a636d6989be2873c7f2a)
  #14  pc 0x000000000005cf50  /data/app/~~b-zjfqOn6IWrb3kdYPr1Gg==/*******==/oat/arm64/base.odex (art_jni_trampoline+112)

崩溃版本:axmol-2.1.2
崩溃手机:OPPO OP56F5 (A17k)
崩溃系统:Android 12 (SDK 31)
崩溃堆栈:

backtrace:
  #00  pc 0x0000000000095040  /vendor/lib64/egl/libGLESv2_mtk.so
  #01  pc 0x00000000000b3f84  /vendor/lib64/egl/libGLESv2_mtk.so
  #02  pc 0x00000000000b3934  /vendor/lib64/egl/libGLESv2_mtk.so
  #03  pc 0x00000000000b1f3c  /vendor/lib64/egl/libGLESv2_mtk.so (glDrawArrays+2880)
  #04  pc 0x0000000000919364  /data/app/~~b-zjfqOn6IWrb3kdYPr1Gg==/*******==/split_config.arm64_v8a.apk!libGame.so (ax::backend::CommandBufferGL::drawArrays(ax::backend::PrimitiveType, unsigned long, unsigned long, bool)+76) (BuildId: 5498f62da2355a571210a636d6989be2873c7f2a)
  #05  pc 0x00000000008fb508  /data/app/~~b-zjfqOn6IWrb3kdYPr1Gg==/*******==/split_config.arm64_v8a.apk!libGame.so (ax::Renderer::drawCustomCommand(ax::RenderCommand*)+504) (BuildId: 5498f62da2355a571210a636d6989be2873c7f2a)
  #06  pc 0x00000000008faad4  /data/app/~~b-zjfqOn6IWrb3kdYPr1Gg==/*******==/split_config.arm64_v8a.apk!libGame.so (ax::Renderer::visitRenderQueue(ax::RenderQueue&)+368) (BuildId: 5498f62da2355a571210a636d6989be2873c7f2a)
  #07  pc 0x00000000008fa818  /data/app/~~b-zjfqOn6IWrb3kdYPr1Gg==/*******==/split_config.arm64_v8a.apk!libGame.so (ax::Renderer::processGroupCommand(ax::GroupCommand*)+224) (BuildId: 5498f62da2355a571210a636d6989be2873c7f2a)
  #08  pc 0x00000000008fac98  /data/app/~~b-zjfqOn6IWrb3kdYPr1Gg==/*******==/split_config.arm64_v8a.apk!libGame.so (ax::Renderer::processRenderCommand(ax::RenderCommand*)+128) (BuildId: 5498f62da2355a571210a636d6989be2873c7f2a)
  #09  pc 0x00000000008faad4  /data/app/~~b-zjfqOn6IWrb3kdYPr1Gg==/*******==/split_config.arm64_v8a.apk!libGame.so (ax::Renderer::visitRenderQueue(ax::RenderQueue&)+368) (BuildId: 5498f62da2355a571210a636d6989be2873c7f2a)
  #10  pc 0x00000000008fb600  /data/app/~~b-zjfqOn6IWrb3kdYPr1Gg==/*******==/split_config.arm64_v8a.apk!libGame.so (ax::Renderer::render()+84) (BuildId: 5498f62da2355a571210a636d6989be2873c7f2a)
  #11  pc 0x00000000008a5bec  /data/app/~~b-zjfqOn6IWrb3kdYPr1Gg==/*******==/split_config.arm64_v8a.apk!libGame.so (ax::Scene::render(ax::Renderer*, ax::Mat4 const&, ax::Mat4 const*)+248) (BuildId: 5498f62da2355a571210a636d6989be2873c7f2a)
  #12  pc 0x0000000000935ec4  /data/app/~~b-zjfqOn6IWrb3kdYPr1Gg==/*******==/split_config.arm64_v8a.apk!libGame.so (ax::Director::drawScene()+372) (BuildId: 5498f62da2355a571210a636d6989be2873c7f2a)
  #13  pc 0x0000000000938248  /data/app/~~b-zjfqOn6IWrb3kdYPr1Gg==/*******==/split_config.arm64_v8a.apk!libGame.so (ax::Director::mainLoop()+124) (BuildId: 5498f62da2355a571210a636d6989be2873c7f2a)
  #14  pc 0x000000000005cf50  /data/app/~~b-zjfqOn6IWrb3kdYPr1Gg==/*******==/oat/arm64/base.odex (art_jni_trampoline+112)
@cxcxiaochuan cxcxiaochuan changed the title ax::backend::CommandBufferGL::drawArrays 崩溃BUG ax::backend::CommandBufferGL::drawArrays 中的glDrawArrays崩溃BUG Nov 23, 2024
@rh101
Copy link
Contributor

rh101 commented Nov 23, 2024

@cxcxiaochuan Edited your post to add the code tags to format the logs so that they are easier to read. Please do not forget to add the tags when you post code or logs.

@cxcxiaochuan
Copy link
Author

void CommandBufferGL::drawArrays(PrimitiveType primitiveType, std::size_t start, std::size_t count, bool wireframe)
{
prepareDrawing();
#if !AX_GLES_PROFILE // glPolygonMode is only supported in Desktop OpenGL
if (wireframe)
glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
#else
if (wireframe)
primitiveType = PrimitiveType::LINE;
#endif
glDrawArrays(UtilsGL::toGLPrimitiveType(primitiveType), start, count);//崩溃在这句代码中了
#if !AX_GLES_PROFILE // glPolygonMode is only supported in Desktop OpenGL
if (wireframe)
glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
#endif
cleanResources();
}

@rh101
Copy link
Contributor

rh101 commented Nov 23, 2024

glDrawArrays(UtilsGL::toGLPrimitiveType(primitiveType), start, count);//崩溃在这句代码中了

It's clear from the logs that the crash is happening when that method is called, but that doesn't necessarily mean it is the cause of the crash. It is most likely something else that is causing this crash, and perhaps even the crashes in the other issues you posted today.

If you have a test project that reproduces the issue, then please post it.

@cxcxiaochuan
Copy link
Author

I can't reproduce this error now, but I have collected a lot of this error through the Google Store. We are also analyzing the source code, but have not solved this problem.

@rh101
Copy link
Contributor

rh101 commented Nov 23, 2024

Please check issue #1211

It seems similar, so check if anything in there helps.

@cxcxiaochuan
Copy link
Author

Is there any way to prevent glDrawArrays from crashing when there is an error? For example, can I use try *** catch *** to catch the error, catch the exception and handle it, so as to avoid the program crashing?

@rh101
Copy link
Contributor

rh101 commented Nov 23, 2024

Is there any way to prevent glDrawArrays from crashing when there is an error? For example, can I use try *** catch *** to catch the error, catch the exception and handle it, so as to avoid the program crashing?

No. It doesn't throw an exception, so try/catch won't work.

You need to find the source of the error.

I can't reproduce this error now, but I have collected a lot of this error through the Google Store. We are also analyzing the source code, but have not solved this problem.

In AxmolActivity.java, change this line:

this.mGLSurfaceView.setPreserveEGLContextOnPause(true);

to

this.mGLSurfaceView.setPreserveEGLContextOnPause(false);

See if this change helps to reproduce the crash. Also, please test it by putting the app into the background, load up other apps, then bring it back to the foreground etc..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants