axmolengine / axmol

Axmol Engine – A Multi-platform Engine for Desktop, XBOX (UWP) and Mobile games. (A fork of Cocos2d-x-4.0)
https://axmol.dev
MIT License
733 stars 181 forks source link

Crash in createBuffer function of TriangleCommandBufferManager #1899

Closed battulasaivinesh closed 1 month ago

battulasaivinesh commented 1 month ago
  1. On App Launch when we setGLView in director we are initialising Renderer
  2. This further creates TriangleCommandBufferManager and calls createBuffer
  3. The application is crashing in createBuffer and in vector class

Stack trace -

*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
pid: 0, tid: 18635 >>> com.superking.parchisi.star <<<

backtrace:
  #00  pc 0x000000000181c78c  /data/app/com.superking.parchisi.star-UIWh1TF5dokbhzxJUN03lg==/split_config.armeabi_v7a.apk (ax::Renderer::TriangleCommandBufferManager::createBuffer()+100)
  #01  pc 0x000000000181a6b0  /data/app/com.superking.parchisi.star-UIWh1TF5dokbhzxJUN03lg==/split_config.armeabi_v7a.apk (ax::Renderer::init()+28)
  #02  pc 0x000000000184f614  /data/app/com.superking.parchisi.star-UIWh1TF5dokbhzxJUN03lg==/split_config.armeabi_v7a.apk (ax::Director::setGLView(ax::GLView*)+100)
  #03  pc 0x0000000001747bf0  /data/app/com.superking.parchisi.star-UIWh1TF5dokbhzxJUN03lg==/split_config.armeabi_v7a.apk (Java_org_axmol_lib_AxmolRenderer_nativeInit+232)
  #04  pc 0x00000000000babb7  /data/app/com.superking.parchisi.star-UIWh1TF5dokbhzxJUN03lg==/oat/arm/base.odex (org.axmol.lib.AxmolRenderer.nativeInit [DEDUPED]+102)
  #05  pc 0x0000000000410b75  /system/lib/libart.so (art_quick_invoke_stub_internal+68)
  #06  pc 0x00000000003ea28b  /system/lib/libart.so (art_quick_invoke_static_stub+222)
  #07  pc 0x00000000000a1827  /system/lib/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+154)
  #08  pc 0x00000000001e6db5  /system/lib/libart.so (art::interpreter::ArtInterpreterToCompiledCodeBridge(art::Thread*, art::ArtMethod*, art::ShadowFrame*, unsigned short, art::JValue*)+236)
  #09  pc 0x00000000001e18a3  /system/lib/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+814)
  #10  pc 0x00000000003e5dbf  /system/lib/libart.so (MterpInvokeStatic+130)
  #11  pc 0x0000000000403a94  /system/lib/libart.so (ExecuteMterpImpl+14612)
  #12  pc 0x00000000019fa216  /data/app/com.superking.parchisi.star-UIWh1TF5dokbhzxJUN03lg==/oat/arm/base.vdex (org.axmol.lib.AxmolRenderer.onSurfaceCreated+8)
  #13  pc 0x00000000001c5f73  /system/lib/libart.so (art::interpreter::Execute(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame&, art::JValue, bool) (.llvm.3380498304)+378)
  #14  pc 0x00000000001ca59f  /system/lib/libart.so (art::interpreter::EnterInterpreterFromEntryPoint(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame*)+82)
  #15  pc 0x00000000003d88c9  /system/lib/libart.so (artQuickToInterpreterBridge+880)
  #16  pc 0x00000000004150ff  /system/lib/libart.so (art_quick_to_interpreter_bridge+30)
  #17  pc 0x0000000000977671  /system/framework/arm/boot-framework.oat (android.opengl.GLSurfaceView$GLThread.guardedRun+2760)
  #18  pc 0x00000000009786ed  /system/framework/arm/boot-framework.oat (android.opengl.GLSurfaceView$GLThread.run+180)
  #19  pc 0x0000000000410b75  /system/lib/libart.so (art_quick_invoke_stub_internal+68)
  #20  pc 0x00000000003ea189  /system/lib/libart.so (art_quick_invoke_stub+224)
  #21  pc 0x00000000000a1815  /system/lib/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+136)
  #22  pc 0x0000000000349b75  /system/lib/libart.so (art::(anonymous namespace)::InvokeWithArgArray(art::ScopedObjectAccessAlreadyRunnable const&, art::ArtMethod*, art::(anonymous namespace)::ArgArray*, art::JValue*, char const*)+52)
  #23  pc 0x000000000034a8cd  /system/lib/libart.so (art::InvokeVirtualOrInterfaceWithJValues(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, _jmethodID*, jvalue*)+320)
  #24  pc 0x000000000036bcb3  /system/lib/libart.so (art::Thread::CreateCallback(void*)+866)
  #25  pc 0x0000000000073ab1  /system/lib/libc.so (__pthread_start(void*)+22)
  #26  pc 0x000000000001e1cd  /system/lib/libc.so (__start_thread+24)
Screenshot 2024-05-16 at 9 03 31 AM
rh101 commented 1 month ago

Just to clarify, is this crashing only on app start-up? Does it occur on every start-up, or is it random?

Also, is it only occurring with the 32bit version (v7a), or is it also happening with the 64Bit version (v8a)?

Which versions of Android? From the screenshot it shows 42% Android 9, but what about the other 58%?

battulasaivinesh commented 1 month ago

We are currently supporting two archs - armeabi_v7a and arm64_v8a. Crash is happening in both.

All crashes are happening on launch.

Screenshot 2024-05-16 at 11 35 59 AM
rh101 commented 1 month ago

All crashes are happening on launch.

Does it happen consistently on every launch, or randomly?

battulasaivinesh commented 1 month ago

We had 100k installs of this update, out of this we got 157 crash events affecting 122 users, so the crash is random. Not able to reproduce this on our end.

battulasaivinesh commented 1 month ago

By the way, we are not seeing this anymore in the new release, not sure what was causing the issue, we can close this issue now

halx99 commented 4 weeks ago

Looks like the crash stack trace same with: https://github.com/axmolengine/axmol/issues/1211