10% crash rate on android

Hi, I have more than 10% crash rate, but couldn’t figure out the problem.
Can anyone point me the direction on what could be the cause? Thank you.
Some players can play for hours with no problem, some crashes in first few minutes. Same phone model and android version.

signal 11 (SIGSEGV), code 2 (SEGV_ACCERR)

libcorona.so!libcorona.so (offset 0x37e000)

*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
pid: 0, tid: 0 >>> com.nobstudio.chengshuwan.prisonLifeRPG <<<

backtrace:
  #00  pc 0000000000388a20  /data/app/~~SaEQ4CB8GzpsZ6VfFVWGVQ==/com.nobstudio.chengshuwan.prisonLifeRPG-qdtUQwFIZ50vwnCf3731bA==/lib/arm64/libcorona.so!libcorona.so (offset 0x37e000)
  #00  pc 000000000010bb80  /data/app/~~SaEQ4CB8GzpsZ6VfFVWGVQ==/com.nobstudio.chengshuwan.prisonLifeRPG-qdtUQwFIZ50vwnCf3731bA==/lib/arm64/libcorona.so
  #00  pc 000000000010ba84  /data/app/~~SaEQ4CB8GzpsZ6VfFVWGVQ==/com.nobstudio.chengshuwan.prisonLifeRPG-qdtUQwFIZ50vwnCf3731bA==/lib/arm64/libcorona.so
  #00  pc 000000000011f5bc  /data/app/~~SaEQ4CB8GzpsZ6VfFVWGVQ==/com.nobstudio.chengshuwan.prisonLifeRPG-qdtUQwFIZ50vwnCf3731bA==/lib/arm64/libcorona.so
  #00  pc 000000000011e76c  /data/app/~~SaEQ4CB8GzpsZ6VfFVWGVQ==/com.nobstudio.chengshuwan.prisonLifeRPG-qdtUQwFIZ50vwnCf3731bA==/lib/arm64/libcorona.so
  #00  pc 00000000000220a8  /data/app/~~SaEQ4CB8GzpsZ6VfFVWGVQ==/com.nobstudio.chengshuwan.prisonLifeRPG-qdtUQwFIZ50vwnCf3731bA==/oat/arm64/base.odex (art_jni_trampoline+152)
  #00  pc 0000000000027ac8  /data/app/~~SaEQ4CB8GzpsZ6VfFVWGVQ==/com.nobstudio.chengshuwan.prisonLifeRPG-qdtUQwFIZ50vwnCf3731bA==/oat/arm64/base.odex (com.ansca.corona.Controller.updateRuntimeState+856)
  #00  pc 0000000000068b10  /data/app/~~SaEQ4CB8GzpsZ6VfFVWGVQ==/com.nobstudio.chengshuwan.prisonLifeRPG-qdtUQwFIZ50vwnCf3731bA==/oat/arm64/base.odex (com.ansca.corona.graphics.opengl.CoronaGLSurfaceView$CoronaRenderer.onDrawFrame+64)
  #00  pc 0000000000040d98  /data/app/~~SaEQ4CB8GzpsZ6VfFVWGVQ==/com.nobstudio.chengshuwan.prisonLifeRPG-qdtUQwFIZ50vwnCf3731bA==/oat/arm64/base.odex (com.ansca.corona.graphics.opengl.GLSurfaceView$GLThread.guardedRun+2648)
  #00  pc 0000000000041a74  /data/app/~~SaEQ4CB8GzpsZ6VfFVWGVQ==/com.nobstudio.chengshuwan.prisonLifeRPG-qdtUQwFIZ50vwnCf3731bA==/oat/arm64/base.odex (com.ansca.corona.graphics.opengl.GLSurfaceView$GLThread.run+228)
  #00  pc 0000000000134564  /apex/com.android.art/lib64/libart.so (art_quick_invoke_stub+548)
  #00  pc 00000000001a9a78  /apex/com.android.art/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+200)
  #00  pc 000000000055e1d8  /apex/com.android.art/lib64/libart.so (art::JValue art::InvokeVirtualOrInterfaceWithJValues<art::ArtMethod*>(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, art::ArtMethod*, jvalue const*)+460)
  #00  pc 00000000005ad99c  /apex/com.android.art/lib64/libart.so (art::Thread::CreateCallback(void*)+1308)
  #00  pc 00000000000b0128  /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+64)
  #00  pc 000000000005060c  /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+64)

I’m not too familiar with debugging Solar2D related Java logs, but based on seeing mentions of CoronaRenderer,.onDrawFrame and other OpenGL things, I’d guess you are getting a runtime error because you are trying to manipulate a display object that doesn’t exist.

This is just a guess.

You could try getting more information from Solar2D itself and not just through Java by not stripping the debug info. You can then send your data to a server/service of your choice and you can gather more information about the Lua errors that are (very likely) occurring.

1 Like

Thank you for your reply. After I added “AndroidDebugSymbols-2021.3645.zip” to my production in googlePlay store, and finally seeing more info on the crash.
It seems to be a problem with audio?

*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
pid: 0, tid: 0 >>> com.nobstudio.chengshuwan.prisonLifeRPG <<<

backtrace:
  #00  pc 0000000000388a20  /data/app/~~wm-qk7GGl6Py15u4UhCVWw==/com.nobstudio.chengshuwan.prisonLifeRPG-YJBMExyyKWkE9zYaEfQoNw==/lib/arm64/libcorona.so!libcorona.so (offset 0x37e000)
  #00  pc 000000000010bb80  /data/app/~~wm-qk7GGl6Py15u4UhCVWw==/com.nobstudio.chengshuwan.prisonLifeRPG-YJBMExyyKWkE9zYaEfQoNw==/lib/arm64/libcorona.so (Rtt::ALmixerSoundCompletionEvent::~ALmixerSoundCompletionEvent()) (SourceCode: /Users/runner/work/corona/corona/librtt/Rtt_PlatformOpenALPlayer.cpp:77)
  #00  pc 000000000010bb80  /data/app/~~wm-qk7GGl6Py15u4UhCVWw==/com.nobstudio.chengshuwan.prisonLifeRPG-YJBMExyyKWkE9zYaEfQoNw==/lib/arm64/libcorona.so (Rtt::ALmixerSoundCompletionEvent::~ALmixerSoundCompletionEvent()) (SourceCode: /Users/runner/work/corona/corona/librtt/Rtt_PlatformOpenALPlayer.cpp:76)
  #00  pc 000000000010ba84  /data/app/~~wm-qk7GGl6Py15u4UhCVWw==/com.nobstudio.chengshuwan.prisonLifeRPG-YJBMExyyKWkE9zYaEfQoNw==/lib/arm64/libcorona.so (Rtt::PlatformNotifierTask::~PlatformNotifierTask()) (SourceCode: /Users/runner/work/corona/corona/librtt/Rtt_PlatformNotifier.cpp:173)
  #00  pc 000000000010ba84  /data/app/~~wm-qk7GGl6Py15u4UhCVWw==/com.nobstudio.chengshuwan.prisonLifeRPG-YJBMExyyKWkE9zYaEfQoNw==/lib/arm64/libcorona.so (Rtt::PlatformNotifierTask::~PlatformNotifierTask()) (SourceCode: /Users/runner/work/corona/corona/librtt/Rtt_PlatformNotifier.cpp:172)
  #00  pc 000000000011f5bc  /data/app/~~wm-qk7GGl6Py15u4UhCVWw==/com.nobstudio.chengshuwan.prisonLifeRPG-YJBMExyyKWkE9zYaEfQoNw==/lib/arm64/libcorona.so (Rtt::Scheduler::Run()) (SourceCode: /Users/runner/work/corona/corona/librtt/Rtt_Scheduler.cpp:95)
  #00  pc 000000000011e76c  /data/app/~~wm-qk7GGl6Py15u4UhCVWw==/com.nobstudio.chengshuwan.prisonLifeRPG-YJBMExyyKWkE9zYaEfQoNw==/lib/arm64/libcorona.so (Rtt::Runtime::operator()()) (SourceCode: /Users/runner/work/corona/corona/librtt/Rtt_Runtime.cpp:1962)
  #00  pc 00000000000210a8  /data/app/~~wm-qk7GGl6Py15u4UhCVWw==/com.nobstudio.chengshuwan.prisonLifeRPG-YJBMExyyKWkE9zYaEfQoNw==/oat/arm64/base.odex (art_jni_trampoline+152)
  #00  pc 00000000000269e8  /data/app/~~wm-qk7GGl6Py15u4UhCVWw==/com.nobstudio.chengshuwan.prisonLifeRPG-YJBMExyyKWkE9zYaEfQoNw==/oat/arm64/base.odex (com.ansca.corona.Controller.updateRuntimeState+856)
  #00  pc 0000000000060fa0  /data/app/~~wm-qk7GGl6Py15u4UhCVWw==/com.nobstudio.chengshuwan.prisonLifeRPG-YJBMExyyKWkE9zYaEfQoNw==/oat/arm64/base.odex (com.ansca.corona.graphics.opengl.CoronaGLSurfaceView$CoronaRenderer.onDrawFrame+64)
  #00  pc 000000000003de18  /data/app/~~wm-qk7GGl6Py15u4UhCVWw==/com.nobstudio.chengshuwan.prisonLifeRPG-YJBMExyyKWkE9zYaEfQoNw==/oat/arm64/base.odex (com.ansca.corona.graphics.opengl.GLSurfaceView$GLThread.guardedRun+2648)
  #00  pc 000000000003e8f4  /data/app/~~wm-qk7GGl6Py15u4UhCVWw==/com.nobstudio.chengshuwan.prisonLifeRPG-YJBMExyyKWkE9zYaEfQoNw==/oat/arm64/base.odex (com.ansca.corona.graphics.opengl.GLSurfaceView$GLThread.run+228)
  #00  pc 0000000000134564  /apex/com.android.art/lib64/libart.so (art_quick_invoke_stub+548)
  #00  pc 0000000000198e94  /apex/com.android.art/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+204)
  #00  pc 0000000000532198  /apex/com.android.art/lib64/libart.so (art::(anonymous namespace)::InvokeWithArgArray(art::ScopedObjectAccessAlreadyRunnable const&, art::ArtMethod*, art::(anonymous namespace)::ArgArray*, art::JValue*, char const*)+104)
  #00  pc 0000000000533398  /apex/com.android.art/lib64/libart.so (art::JValue art::InvokeVirtualOrInterfaceWithJValues<art::ArtMethod*>(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, art::ArtMethod*, jvalue const*)+440)
  #00  pc 00000000005808b8  /apex/com.android.art/lib64/libart.so (art::Thread::CreateCallback(void*)+1272)
  #00  pc 00000000000b6234  /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+64)
  #00  pc 0000000000050e64  /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+64)

I tried removing all onComplete calls for audio, as other threads suggested, but still having issues.

signal 11 (SIGSEGV), code 2 (SEGV_ACCERR)


pid: 0, tid: 0 >>> com.nobstudio.chengshuwan.prisonLifeRPG <<<

backtrace:
  #00  pc 0000000000388a20  /data/app/~~XD8XGieNCpiKuFLKv2SVag==/com.nobstudio.chengshuwan.prisonLifeRPG-mGfQinLFMxGF20hkNtL49Q==/lib/arm64/libcorona.so!libcorona.so (offset 0x37e000)
  #00  pc 000000000010bb80  /data/app/~~XD8XGieNCpiKuFLKv2SVag==/com.nobstudio.chengshuwan.prisonLifeRPG-mGfQinLFMxGF20hkNtL49Q==/lib/arm64/libcorona.so (Rtt::ALmixerSoundCompletionEvent::~ALmixerSoundCompletionEvent()) (SourceCode: /Users/runner/work/corona/corona/librtt/Rtt_PlatformOpenALPlayer.cpp:77)
  #00  pc 000000000010bb80  /data/app/~~XD8XGieNCpiKuFLKv2SVag==/com.nobstudio.chengshuwan.prisonLifeRPG-mGfQinLFMxGF20hkNtL49Q==/lib/arm64/libcorona.so (Rtt::ALmixerSoundCompletionEvent::~ALmixerSoundCompletionEvent()) (SourceCode: /Users/runner/work/corona/corona/librtt/Rtt_PlatformOpenALPlayer.cpp:76)
  #00  pc 000000000010ba84  /data/app/~~XD8XGieNCpiKuFLKv2SVag==/com.nobstudio.chengshuwan.prisonLifeRPG-mGfQinLFMxGF20hkNtL49Q==/lib/arm64/libcorona.so (Rtt::PlatformNotifierTask::~PlatformNotifierTask()) (SourceCode: /Users/runner/work/corona/corona/librtt/Rtt_PlatformNotifier.cpp:173)
  #00  pc 000000000010ba84  /data/app/~~XD8XGieNCpiKuFLKv2SVag==/com.nobstudio.chengshuwan.prisonLifeRPG-mGfQinLFMxGF20hkNtL49Q==/lib/arm64/libcorona.so (Rtt::PlatformNotifierTask::~PlatformNotifierTask()) (SourceCode: /Users/runner/work/corona/corona/librtt/Rtt_PlatformNotifier.cpp:172)
  #00  pc 000000000011f5bc  /data/app/~~XD8XGieNCpiKuFLKv2SVag==/com.nobstudio.chengshuwan.prisonLifeRPG-mGfQinLFMxGF20hkNtL49Q==/lib/arm64/libcorona.so (Rtt::Scheduler::Run()) (SourceCode: /Users/runner/work/corona/corona/librtt/Rtt_Scheduler.cpp:95)
  #00  pc 000000000011e76c  /data/app/~~XD8XGieNCpiKuFLKv2SVag==/com.nobstudio.chengshuwan.prisonLifeRPG-mGfQinLFMxGF20hkNtL49Q==/lib/arm64/libcorona.so (Rtt::Runtime::operator()()) (SourceCode: /Users/runner/work/corona/corona/librtt/Rtt_Runtime.cpp:1962)
  #00  pc 00000000000100a8  /data/app/~~XD8XGieNCpiKuFLKv2SVag==/com.nobstudio.chengshuwan.prisonLifeRPG-mGfQinLFMxGF20hkNtL49Q==/oat/arm64/base.odex (art_jni_trampoline+152)
  #00  pc 0000000002019ce8  /memfd:jit-cache (com.ansca.corona.Controller.updateRuntimeState+1000)
  #00  pc 00000000020029d8  /memfd:jit-cache (com.ansca.corona.graphics.opengl.GLSurfaceView$GLThread.guardedRun+3096)
  #00  pc 000000000013287c  /apex/com.android.art/lib64/libart.so (art_quick_osr_stub+60)
  #00  pc 0000000000320178  /apex/com.android.art/lib64/libart.so (art::jit::Jit::MaybeDoOnStackReplacement(art::Thread*, art::ArtMethod*, unsigned int, int, art::JValue*)+336)
  #00  pc 000000000063b4e0  /apex/com.android.art/lib64/libart.so (MterpMaybeDoOnStackReplacement+208)
  #00  pc 0000000000131350  /apex/com.android.art/lib64/libart.so (MterpHelpers+240)
  #00  pc 00000000000a9082  /data/app/~~XD8XGieNCpiKuFLKv2SVag==/com.nobstudio.chengshuwan.prisonLifeRPG-mGfQinLFMxGF20hkNtL49Q==/oat/arm64/base.vdex (com.ansca.corona.graphics.opengl.GLSurfaceView$GLThread.guardedRun+946)
  #00  pc 0000000000632584  /apex/com.android.art/lib64/libart.so (MterpInvokeDirect+1164)
  #00  pc 000000000012c914  /apex/com.android.art/lib64/libart.so (mterp_op_invoke_direct+20)
  #00  pc 00000000000a9484  /data/app/~~XD8XGieNCpiKuFLKv2SVag==/com.nobstudio.chengshuwan.prisonLifeRPG-mGfQinLFMxGF20hkNtL49Q==/oat/arm64/base.vdex (com.ansca.corona.graphics.opengl.GLSurfaceView$GLThread.run+48)
  #00  pc 00000000002f48e4  /apex/com.android.art/lib64/libart.so (art::interpreter::Execute(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame&, art::JValue, bool, bool) (.llvm.455116323805885647)+268)
  #00  pc 000000000061ea34  /apex/com.android.art/lib64/libart.so (artQuickToInterpreterBridge+796)
  #00  pc 000000000013bff8  /apex/com.android.art/lib64/libart.so (art_quick_to_interpreter_bridge+88)
  #00  pc 0000000000132564  /apex/com.android.art/lib64/libart.so (art_quick_invoke_stub+548)
  #00  pc 0000000000196e94  /apex/com.android.art/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+204)
  #00  pc 0000000000527730  /apex/com.android.art/lib64/libart.so (art::(anonymous namespace)::InvokeWithArgArray(art::ScopedObjectAccessAlreadyRunnable const&, art::ArtMethod*, art::(anonymous namespace)::ArgArray*, art::JValue*, char const*)+104)
  #00  pc 0000000000528930  /apex/com.android.art/lib64/libart.so (art::JValue art::InvokeVirtualOrInterfaceWithJValues<art::ArtMethod*>(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, art::ArtMethod*, jvalue const*)+440)
  #00  pc 0000000000575994  /apex/com.android.art/lib64/libart.so (art::Thread::CreateCallback(void*)+1272)
  #00  pc 00000000000b4fb4  /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+64)
  #00  pc 000000000004fb64  /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+64)

At least the version of the code that I have on my desktop the lines in question (77 & 76) appears to be related to the sound completion event. Instead of removing the event, I would make sure all of them have it. I tried to trace Rtt_DELETE and went down a rabbit hole (not seen since I went to school) but basically, it is trying to deallocate memory.

// Bug:5724. There seems to be a race condition bug with the callback system.
// Our workaround is to take ownership of the platform notifier and delete when the event is destroyed.
ALmixerSoundCompletionEvent::~ALmixerSoundCompletionEvent()
{
   Rtt_DELETE( platformALmixerPlaybackFinishedCallback );
}
1 Like

@agramonte thank you so much, couldn’t figure out what’s the problem and I removed all onComplete event!
So you solve the problem with onComplete event for every audio?
For example like this?

function soundEnded ()
	print("Nothing here")
end

audio.play(_G.soundFile.step2, { onComplete=soundEnded })

No. Not at all. I have very limited sound in my game because of multiple sound problem crashes. I am just looking at the code and trying to guess what would cause a problem.

1 Like