com.ansca.corona.CoronaService ANR affects 20k users

Troy, I would appreciate it if you would start a new thread about this since it has nothing to do with ANR’s. There is an older thread, but it’s archived. In that thread it sounds like there was an attempt to fix it. Also @roaminggamer said he had filed a bug report and perhaps it got closed after our attempt to fix this issue.

Rob

I just posted a version of my game using the 3294 build. Wait until tomorrow to see the results. Thank you for releasing this attempt to fix, hopefully solve!

Att.,

Joéver

Per @Rob’s request, I’ve created a different Topic specific to: Runtime Error caused by widget.lua at https://forums.coronalabs.com/topic/72782-runtime-error-caused-by-widgetlua/

I just checked that the problem below continues!  :frowning:

Broadcast of Intent { act=android.intent.action.SCREEN_OFF flg=0x50000010 }

“main” prio=5 tid=1 Blocked | group=“main” sCount=1 dsCount=0 obj=0x73855268 self=0xaab85400 | sysTid=15186 nice=-4 cgrp=default sched=0/0 handle=0xad827534 | state=S schedstat=( 0 0 0 ) utm=125 stm=69 core=3 HZ=100 | stack=0xbe74e000-0xbe750000 stackSize=8MB | held mutexes=

 

at com.ansca.corona.Controller.stop (Controller.java:263)

  • waiting to lock <0x08b3cd4e> (a com.ansca.corona.Controller) held by thread 11

 

at com.ansca.corona.CoronaActivity.requestSuspendCoronaRuntime (CoronaActivity.java:2005)

 

at com.ansca.corona.CoronaActivity.onPause (CoronaActivity.java:1828)

 

at android.app.Activity.performPause (Activity.java:6806)

 

at android.app.Instrumentation.callActivityOnPause (Instrumentation.java:1322)

 

at android.app.ActivityThread.performPauseActivityIfNeeded (ActivityThread.java:3752)

 

at android.app.ActivityThread.performPauseActivity (ActivityThread.java:3729)

 

at android.app.ActivityThread.performPauseActivity (ActivityThread.java:3703)

 

at android.app.ActivityThread.handlePauseActivity (ActivityThread.java:3677)

 

at android.app.ActivityThread.-wrap16 (ActivityThread.java)

 

at android.app.ActivityThread$H.handleMessage (ActivityThread.java:1492)

 

at android.os.Handler.dispatchMessage (Handler.java:102)

 

at android.os.Looper.loop (Looper.java:154)

 

at android.app.ActivityThread.main (ActivityThread.java:6146)

 

at java.lang.reflect.Method.invoke! (Native method)

 

at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run (ZygoteInit.java:865)

 

at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:755)

“GLThread 15925” tid=11 Native 

“GLThread 15925” prio=5 tid=11 Native | group=“main” sCount=1 dsCount=0 obj=0x12c130e0 self=0xa1d6ee00 | sysTid=15202 nice=0 cgrp=default sched=0/0 handle=0x946c3920 | state=R schedstat=( 0 0 0 ) utm=1180 stm=167 core=3 HZ=100 | stack=0x945c1000-0x945c3000 stackSize=1038KB | held mutexes=

 

#00 pc 000000000001629c /data/app/com.gmail.joever.hoffman.Jogo_da_Memoria-1/lib/arm/libmpg123.so (INT123_synth_1to1+996)

 

#01 pc 0000000000011798 /data/app/com.gmail.joever.hoffman.Jogo_da_Memoria-1/lib/arm/libmpg123.so (???)

 

#02 pc 000000000000e94c /data/app/com.gmail.joever.hoffman.Jogo_da_Memoria-1/lib/arm/libmpg123.so (INT123_do_layer3+3940)

 

#03 pc 000000000000ef90 /data/app/com.gmail.joever.hoffman.Jogo_da_Memoria-1/lib/arm/libmpg123.so (???)

 

#04 pc 000000000000fffc /data/app/com.gmail.joever.hoffman.Jogo_da_Memoria-1/lib/arm/libmpg123.so (mpg123_decode+144)

 

#05 pc 00000000000100f4 /data/app/com.gmail.joever.hoffman.Jogo_da_Memoria-1/lib/arm/libmpg123.so (mpg123_read+32)

 

#06 pc 000000000000d16d /data/app/com.gmail.joever.hoffman.Jogo_da_Memoria-1/lib/arm/libalmixer.so (???)

 

#07 pc 000000000000c1a5 /data/app/com.gmail.joever.hoffman.Jogo_da_Memoria-1/lib/arm/libalmixer.so (SoundDecoder_Decode+68)

 

#08 pc 000000000000c1f3 /data/app/com.gmail.joever.hoffman.Jogo_da_Memoria-1/lib/arm/libalmixer.so (SoundDecoder_DecodeAll+54)

 

#09 pc 0000000000006cb1 /data/app/com.gmail.joever.hoffman.Jogo_da_Memoria-1/lib/arm/libalmixer.so (???)

 

#10 pc 000000000000a105 /data/app/com.gmail.joever.hoffman.Jogo_da_Memoria-1/lib/arm/libalmixer.so (ALmixer_LoadSample+104)

 

#11 pc 0000000000130edc /data/app/com.gmail.joever.hoffman.Jogo_da_Memoria-1/lib/arm/libcorona.so (???)

 

#12 pc 000000000010f6cc /data/app/com.gmail.joever.hoffman.Jogo_da_Memoria-1/lib/arm/libcorona.so (???)

 

#13 pc 000000000000cc1c /data/app/com.gmail.joever.hoffman.Jogo_da_Memoria-1/lib/arm/liblua.so (???)

 

#14 pc 000000000001ce30 /data/app/com.gmail.joever.hoffman.Jogo_da_Memoria-1/lib/arm/liblua.so (???)

 

#15 pc 000000000000d068 /data/app/com.gmail.joever.hoffman.Jogo_da_Memoria-1/lib/arm/liblua.so (???)

 

#16 pc 000000000000c374 /data/app/com.gmail.joever.hoffman.Jogo_da_Memoria-1/lib/arm/liblua.so (???)

 

#17 pc 000000000000d1e0 /data/app/com.gmail.joever.hoffman.Jogo_da_Memoria-1/lib/arm/liblua.so (???)

 

#18 pc 00000000000055b8 /data/app/com.gmail.joever.hoffman.Jogo_da_Memoria-1/lib/arm/liblua.so (lua_pcall+88)

 

#19 pc 0000000000107000 /data/app/com.gmail.joever.hoffman.Jogo_da_Memoria-1/lib/arm/libcorona.so (???)

 

#20 pc 000000000009adac /data/app/com.gmail.joever.hoffman.Jogo_da_Memoria-1/lib/arm/libcorona.so (???)

 

#21 pc 00000000001411ec /data/app/com.gmail.joever.hoffman.Jogo_da_Memoria-1/lib/arm/libcorona.so (???)

 

#22 pc 000000000008d4c0 /data/app/com.gmail.joever.hoffman.Jogo_da_Memoria-1/lib/arm/libcorona.so (???)

 

#23 pc 00000000000716bd /data/app/com.gmail.joever.hoffman.Jogo_da_Memoria-1/oat/arm/base.odex (Java_com_ansca_corona_JavaToNativeShim_nativeRender__J+80)

 

at com.ansca.corona.JavaToNativeShim.nativeRender (Native method)

 

at com.ansca.corona.JavaToNativeShim.render (JavaToNativeShim.java:195)

 

at com.ansca.corona.Controller.updateRuntimeState (Controller.java:347)

 

at com.ansca.corona.graphics.opengl.CoronaGLSurfaceView$CoronaRenderer.onDrawFrame (CoronaGLSurfaceView.java:425)

 

at com.ansca.corona.graphics.opengl.GLSurfaceView$GLThread.guardedRun (GLSurfaceView.java:1623)

 

at com.ansca.corona.graphics.opengl.GLSurfaceView$GLThread.run (GLSurfaceView.java:1378)

@everyone: Per @Rob’s request, can you all move your reported issues of runtime errors caused by widget.lua to this new forum topic? https://forums.coronalabs.com/topic/72782-runtime-error-caused-by-widgetlua/) - then, update all your previous related posts to point to this new location, should anyone in the future search on runtime errors caused by widget.lua - Thanks in advance everyone.

@joeversh, have all your users updated yet? Is there something that says that error is happening with the most recent release or did you get the crash while testing the app?

@Rob, in the Google console it is possible to filter by APK version. I’m just looking at the last version I generated today!

@Rob, this problem also continues…

executing service com.gmail.joever.hoffman.Jogo_da_Memoria/shared.google.play.services.base.PackageStateChangedService

shared.google.play.services.base.PackageStateChangedService

“main” prio=5 tid=1 Native | group=“main” sCount=1 dsCount=0 obj=0x75a306d0 self=0xe8e85400 | sysTid=31902 nice=0 cgrp=default sched=0/0 handle=0xec4d7534 | state=S schedstat=( 0 0 0 ) utm=63 stm=22 core=0 HZ=100 | stack=0xff31e000-0xff320000 stackSize=8MB | held mutexes=

 

#00 pc 0000000000017520 /system/lib/libc.so (syscall+28)

 

#01 pc 00000000000477bf /system/lib/libc.so (pthread_join+146)

 

#02 pc 0000000000015b58 /data/app/com.gmail.joever.hoffman.Jogo_da_Memoria-1/lib/arm/libopenal.so (alcDestroyContext+516)

 

#03 pc 0000000000008ed7 /data/app/com.gmail.joever.hoffman.Jogo_da_Memoria-1/lib/arm/libalmixer.so (ALmixer_Quit+230)

 

#04 pc 000000000012ed34 /data/app/com.gmail.joever.hoffman.Jogo_da_Memoria-1/lib/arm/libcorona.so (???)

 

#05 pc 0000000000131168 /data/app/com.gmail.joever.hoffman.Jogo_da_Memoria-1/lib/arm/libcorona.so (???)

 

#06 pc 000000000014126c /data/app/com.gmail.joever.hoffman.Jogo_da_Memoria-1/lib/arm/libcorona.so (???)

 

#07 pc 000000000002bf9c /data/app/com.gmail.joever.hoffman.Jogo_da_Memoria-1/lib/arm/libcorona.so (???)

 

#08 pc 000000000002f38c /data/app/com.gmail.joever.hoffman.Jogo_da_Memoria-1/lib/arm/libcorona.so (Java_com_ansca_corona_JavaToNativeShim_nativeDone+28)

 

#09 pc 00000000000716bd /data/app/com.gmail.joever.hoffman.Jogo_da_Memoria-1/oat/arm/base.odex (Java_com_ansca_corona_JavaToNativeShim_nativeDone__J+80)

 

at com.ansca.corona.JavaToNativeShim.nativeDone (Native method)

 

at com.ansca.corona.JavaToNativeShim.destroy (JavaToNativeShim.java:290)

 

at com.ansca.corona.Controller.destroy (Controller.java:286)

  • locked <0x01f20bf8> (a com.ansca.corona.Controller)

 

at com.ansca.corona.CoronaRuntime.dispose (CoronaRuntime.java:88)

 

at com.ansca.corona.CoronaActivity.onDestroy (CoronaActivity.java:1736)

 

at android.app.Activity.performDestroy (Activity.java:7195)

 

at android.app.Instrumentation.callActivityOnDestroy (Instrumentation.java:1161)

 

at android.app.ActivityThread.performDestroyActivity (ActivityThread.java:4573)

 

at android.app.ActivityThread.handleDestroyActivity (ActivityThread.java:4609)

 

at android.app.ActivityThread.-wrap7 (ActivityThread.java)

 

at android.app.ActivityThread$H.handleMessage (ActivityThread.java:1692)

 

at android.os.Handler.dispatchMessage (Handler.java:102)

 

at android.os.Looper.loop (Looper.java:154)

 

at android.app.ActivityThread.main (ActivityThread.java:6682)

 

at java.lang.reflect.Method.invoke! (Native method)

 

at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run (ZygoteInit.java:1520)

 

at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1410)

This is bizzare, because 3294 shouldn’t have pthread_join which seems to cause ANR…

@Vlads, if you want evidence just say what you need…

Btw, I’d appreciate if you would use some service, like https://pastebin.com/ to share full crashlogs for future.

But for now we have another fix in workings.

@Vlad (re build 3294 vs PSCS)

one occurrence today:  https://pastebin.com/EZTvLDFQ

Any news on these issues?

I’m also very interested in those issues, because my ANR-Rate is about 2.3% and most of the ANRs are of kind:

shared.google.play.services.base.PackageStateChangedService

and

Broadcast of Intent { act=android.intent.action.SCREEN\_OFF flg=0x50200010 (has extras) }

Best regards!

I’m getting too many ANR’s too. It’s affecting ranking. I assume there’s no way for the Corona Engine to try/catch situations that could cause ANR’s and keep the app alive? Or have some other thread running so that the App isn’t considered crashed by the Android OS?

John_M, ANR means Application Not Responding. Basically UI thread is blocked by something. It is not a crash. There isn’t a place you can wrap in try/catch because no exception is thrown. We were not able to reproduce now it happens.

However we try to reason about code. Daily 2018.3306 should fix most of ANRs. Make sure to test your app severely.

Btw, guys. In 3036 we hopefully fixed OpenAL ANRs. We changed memory model not to unload OpenAL when game is paused/quitting.

Feel free to check our changes in 3036 and see how it goes.

Hey vlad

I am still seeing openAL issues with 3306

Here is an example stack trace from a crash…

signal 11 (SIGSEGV), code 1 (SEGV\_MAPERR) libopenal.so #00 pc 00000000000a2f94 /data/app/com.spheregamestudios.designercity-1/lib/arm/libopenal.so #01 pc 0000000000016874 /data/app/com.spheregamestudios.designercity-1/lib/arm/libopenal.so (alcCreateContext+436) #02 pc 0000000000005ff7 /data/app/com.spheregamestudios.designercity-1/lib/arm/libalmixer.so (ALmixer\_Init+214) #03 pc 0000000000130f2c /data/app/com.spheregamestudios.designercity-1/lib/arm/libcorona.so #04 pc 000000000010f684 /data/app/com.spheregamestudios.designercity-1/lib/arm/libcorona.so #05 pc 000000000000cc1c /data/app/com.spheregamestudios.designercity-1/lib/arm/liblua.so #06 pc 000000000001ce30 /data/app/com.spheregamestudios.designercity-1/lib/arm/liblua.so #07 pc 000000000000d068 /data/app/com.spheregamestudios.designercity-1/lib/arm/liblua.so #08 pc 000000000000c374 /data/app/com.spheregamestudios.designercity-1/lib/arm/liblua.so #09 pc 000000000000d1e0 /data/app/com.spheregamestudios.designercity-1/lib/arm/liblua.so #10 pc 00000000000055b8 /data/app/com.spheregamestudios.designercity-1/lib/arm/liblua.so (lua\_pcall+88) #11 pc 0000000000007010 /data/app/com.spheregamestudios.designercity-1/lib/arm/liblua.so #12 pc 000000000000cc1c /data/app/com.spheregamestudios.designercity-1/lib/arm/liblua.so #13 pc 000000000001ce30 /data/app/com.spheregamestudios.designercity-1/lib/arm/liblua.so #14 pc 000000000000d068 /data/app/com.spheregamestudios.designercity-1/lib/arm/liblua.so #15 pc 000000000000c374 /data/app/com.spheregamestudios.designercity-1/lib/arm/liblua.so #16 pc 000000000000d1e0 /data/app/com.spheregamestudios.designercity-1/lib/arm/liblua.so #17 pc 00000000000055b8 /data/app/com.spheregamestudios.designercity-1/lib/arm/liblua.so (lua\_pcall+88) #18 pc 0000000000106fb8 /data/app/com.spheregamestudios.designercity-1/lib/arm/libcorona.so #19 pc 00000000000e9150 /data/app/com.spheregamestudios.designercity-1/lib/arm/libcorona.so #20 pc 0000000000140c68 /data/app/com.spheregamestudios.designercity-1/lib/arm/libcorona.so #21 pc 0000000000142cb0 /data/app/com.spheregamestudios.designercity-1/lib/arm/libcorona.so #22 pc 0000000000141120 /data/app/com.spheregamestudios.designercity-1/lib/arm/libcorona.so #23 pc 0000000000141edc /data/app/com.spheregamestudios.designercity-1/lib/arm/libcorona.so #24 pc 000000000002bd48 /data/app/com.spheregamestudios.designercity-1/lib/arm/libcorona.so #25 pc 00000000008d4e8d /data/app/com.spheregamestudios.designercity-1/oat/arm/base.odex

@SGS - ok, so crashes still, but did it clear up any _ ANR _s?  (aka PackageStateChangeService?)

I haven’t yet tried 3306, but it’s the _ ANR _'s that I’m mostly concerned with, not the crashes.

I do get that SIGSEGV crash from libopenal too, but only occasionally, it’s easily 10X less frequent than the PackageStateChangeService ANR.

My biggest crash offender is “signal 5 (SIGTRAP), code 1 (TRAP_BRKPT)” in libc.so.  The SIGSEGV in libopenal.so is #3 on my list, at about only 1/3 the rate of the #1.  All told, cumulative crash rate is still only 0.16%, well under bad behavior threshold, and 99.8% daily crash-free.

But that single ANR source (PackageStateChangeService, libopenal) is so rampant that it’s enough all on its own to cross the bad behavior threshold for ANR’s!!  So, if the ANR is fixed then that’d be a huge deal for me, I could wait on a separate investigation/fix for the crash.

Only just started a rollout today… so far figures look positive

Crashes7Crashes per 1,000 devices1.5-70% vs All Install events4.8K

time will tell

globally I am

ANR-free daily sessions 

99.6%

 

Crash-free daily sessions 

99.7%