We are quite consistently seeing fairly high ANR rates (>1% which exceeds the Bad Behaviour threshold by some distance) on all our apps for the last many months.
Recently it was announced that Google plan to raise the technical quality bar in deciding how discoverable apps are on the Play Store and they intend to directly use the user perceived Crash and ANR rates for this.
The vast majority of the ANRs are related to com.ansca.corona.Controller.stop and many others appear on android.os.MessageQueue.nativePollOnce
As for the nature of problem, many cases are input dispatching timeouts and there are other multiple issues with execution of certain services originating at these calling points.
We only use plugins for ads (Scott’s IrnSrc plugin), the latest Solar2d Notifications plugin and the new billing library.
I do remember reading some other similar threads recently where people are pushing the bad behaviour threshold on some of their apps and if this is something in the core engine, I was wondering if this will be looked at any time soon. With Google planning to take these apps off their discoverability queues, the damage to developers would be substantial.
com.ansca.corona.Controller.stop logs:
#00 pc 0x00000000004a67e4 /apex/com.android.art/lib64/libart.so (art::DumpNativeStack(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, int, BacktraceMap*, char const*, art::ArtMethod*, void*, bool)+140)
#01 pc 0x00000000005b5704 /apex/com.android.art/lib64/libart.so (art::Thread::DumpStack(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, bool, BacktraceMap*, bool) const+372)
#02 pc 0x00000000005d2ca4 /apex/com.android.art/lib64/libart.so (art::DumpCheckpoint::Run(art::Thread*)+924)
#03 pc 0x00000000005ccb14 /apex/com.android.art/lib64/libart.so (art::ThreadList::RunCheckpoint(art::Closure*, art::Closure*)+532)
#04 pc 0x00000000005cbc94 /apex/com.android.art/lib64/libart.so (art::ThreadList::Dump(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, bool)+1876)
#05 pc 0x00000000005cb150 /apex/com.android.art/lib64/libart.so (art::ThreadList::DumpForSigQuit(std::__1::basic_ostream<char, std::__1::char_traits<char> >&)+792)
#06 pc 0x00000000005764f4 /apex/com.android.art/lib64/libart.so (art::Runtime::DumpForSigQuit(std::__1::basic_ostream<char, std::__1::char_traits<char> >&)+196)
#07 pc 0x000000000058bf7c /apex/com.android.art/lib64/libart.so (art::SignalCatcher::HandleSigQuit()+1396)
#08 pc 0x000000000058af14 /apex/com.android.art/lib64/libart.so (art::SignalCatcher::Run(void*)+348)
#09 pc 0x00000000000b0bd8 /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+64)
#10 pc 0x00000000000505d0 /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+64)
at com.ansca.corona.Controller.stop (Controller.java)
at com.ansca.corona.CoronaActivity.requestSuspendCoronaRuntime (CoronaActivity.java:2055)
at com.ansca.corona.CoronaActivity.onPause (CoronaActivity.java:1878)
at android.app.Activity.performPause (Activity.java:8174)
at android.app.Instrumentation.callActivityOnPause (Instrumentation.java:1510)
at android.app.ActivityThread.performPauseActivityIfNeeded (ActivityThread.java:4771)
at android.app.ActivityThread.performPauseActivity (ActivityThread.java:4732)
at android.app.ActivityThread.handlePauseActivity (ActivityThread.java:4683)
at android.app.servertransaction.PauseActivityItem.execute (PauseActivityItem.java:46)
at android.app.servertransaction.TransactionExecutor.executeLifecycleState (TransactionExecutor.java:176)
at android.app.servertransaction.TransactionExecutor.execute (TransactionExecutor.java:97)
at android.app.ActivityThread$H.handleMessage (ActivityThread.java:2105)
at android.os.Handler.dispatchMessage (Handler.java:106)
at android.os.Looper.loop (Looper.java:223)
at android.app.ActivityThread.main (ActivityThread.java:7703)
at java.lang.reflect.Method.invoke (Native method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:612)
at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:997)
at java.lang.Object.wait (Native method)
at java.lang.Object.wait (Object.java:442)
at java.lang.ref.ReferenceQueue.remove (ReferenceQueue.java:190)
at java.lang.ref.ReferenceQueue.remove (ReferenceQueue.java:211)
at java.lang.Daemons$FinalizerDaemon.runInternal (Daemons.java:273)
at java.lang.Daemons$Daemon.run (Daemons.java:139)
at java.lang.Thread.run (Thread.java:923)
Around 50% of the ANRs for android.os.MessageQueue.nativePollOnce are when the app is in background and the logs are not loading up for this. I’ll update the post when I’m able to fetch more details on this one.