ANR on suspend/pause seemingly caused by Google IAP plugin

I have about a thousand ANRs reported daily, where it seems the app cannot suspend due to Google IAP plugin blocking a thread in init().

The IAP init() is called in main.lua.

Any known fix? Suggested workaround?

Here we see thread 1 blocked in CoronaActivity.onPause by thread 11 :

“main” prio=5 tid=1 Blocked | group=“main” sCount=1 dsCount=0 obj=0x75272000 self=0xb4827800 | sysTid=14697 nice=0 cgrp=bg_non_interactive sched=0/0 handle=0xb6fc4bec | state=S schedstat=( 0 0 0 ) utm=33 stm=27 core=2 HZ=100 | stack=0xbe119000-0xbe11b000 stackSize=8MB | held mutexes=

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

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

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

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

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

And the offending thread (tid=11 in this case):

“GLThread 10468” prio=5 tid=11 Native | group=“main” sCount=1 dsCount=0 obj=0x1ac00960 self=0xb482c800 | sysTid=15943 nice=0 cgrp=bg_non_interactive sched=0/0 handle=0xb4918a80 | state=S schedstat=( 0 0 0 ) utm=17939 stm=69021 core=0 HZ=100 | stack=0xa2cf2000-0xa2cf4000 stackSize=1036KB | held mutexes=

native: pc 00000000000133dc /system/lib/libc.so (syscall+28)

native: pc 00000000000a9993 /system/lib/libart.so (_ZN3art17ConditionVariable4WaitEPNS_6ThreadE+82)

native: pc 000000000027ded5 /system/lib/libart.so (_ZN3artL12GoToRunnableEPNS_6ThreadE+756)

native: pc 0000000000087639 /system/lib/libart.so (_ZN3art12JniMethodEndEjPNS_6ThreadE+8)

native: pc 0000000000006e57 /system/framework/arm/boot.oat (Java_java_lang_Thread_yield__+90)

at java.lang.Thread.yield (Native method)

at plugin.google.iap.v3.LuaLoader.init (LuaLoader.java:183)

at plugin.google.iap.v3.LuaLoader.access$1200 (LuaLoader.java:37)

at plugin.google.iap.v3.LuaLoader$InitWrapper.invoke (LuaLoader.java:445)

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

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

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

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

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

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

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

Full ANR snapshot:

“main” prio=5 tid=1 Blocked | group=“main” sCount=1 dsCount=0 obj=0x75272000 self=0xb4827800 | sysTid=14697 nice=0 cgrp=bg_non_interactive sched=0/0 handle=0xb6fc4bec | state=S schedstat=( 0 0 0 ) utm=33 stm=27 core=2 HZ=100 | stack=0xbe119000-0xbe11b000 stackSize=8MB | held mutexes=

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

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

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

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

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

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

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

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

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

at android.app.ActivityThread.access$1200 (ActivityThread.java:218)

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

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

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

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

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

at java.lang.reflect.Method.invoke (Method.java:372)

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

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

“Signal Catcher” daemon prio=5 tid=2 Runnable | group=“system” sCount=0 dsCount=0 obj=0x1ac005e8 self=0xb049e800 | sysTid=14700 nice=0 cgrp=bg_non_interactive sched=0/0 handle=0xb4918580 | state=R schedstat=( 0 0 0 ) utm=0 stm=2 core=2 HZ=100 | stack=0xb4009000-0xb400b000 stackSize=1012KB | held mutexes= “thread list lock” “mutator lock”(exclusive held)

native: pc 0000000000004dfc /system/lib/libbacktrace_libc++.so (_ZN13UnwindCurrent6UnwindEjP8ucontext+23)

native: pc 0000000000003631 /system/lib/libbacktrace_libc++.so (_ZN9Backtrace6UnwindEjP8ucontext+8)

native: pc 00000000002446f9 /system/lib/libart.so (_ZN3art15DumpNativeStackERNSt3__113basic_ostreamIcNS0_11char_traitsIcEEEEiPKcPNS_6mirror9ArtMethodE+68)

native: pc 00000000002289fd /system/lib/libart.so (_ZNK3art6Thread4DumpERNSt3__113basic_ostreamIcNS1_11char_traitsIcEEEE+148)

native: pc 0000000000231deb /system/lib/libart.so (_ZN3art10ThreadList14DumpForSigQuitERNSt3__113basic_ostreamIcNS1_11char_traitsIcEEEE+142)

native: pc 00000000002172bf /system/lib/libart.so (_ZN3art7Runtime14DumpForSigQuitERNSt3__113basic_ostreamIcNS1_11char_traitsIcEEEE+66)

native: pc 000000000021d3a9 /system/lib/libart.so (_ZN3art13SignalCatcher13HandleSigQuitEv+752)

native: pc 000000000021da53 /system/lib/libart.so (_ZN3art13SignalCatcher3RunEPv+318)

native: pc 0000000000016f23 /system/lib/libc.so (_ZL15__pthread_startPv+30)

native: pc 0000000000014f43 /system/lib/libc.so (__start_thread+6)

“JDWP” daemon prio=5 tid=3 WaitingInMainDebuggerLoop | group=“system” sCount=1 dsCount=0 obj=0x1ac00640 self=0xb4827400 | sysTid=14701 nice=0 cgrp=bg_non_interactive sched=0/0 handle=0xb4918800 | state=S schedstat=( 0 0 0 ) utm=0 stm=0 core=3 HZ=100 | stack=0xb3f07000-0xb3f09000 stackSize=1012KB | held mutexes=

native: pc 000000000003bab4 /system/lib/libc.so (recvmsg+8)

native: pc 0000000000283647 /system/lib/libart.so (_ZN3art4JDWP12JdwpAdbState15ReceiveClientFdEv+90)

native: pc 000000000028373b /system/lib/libart.so (_ZN3art4JDWP12JdwpAdbState6AcceptEv+106)

native: pc 000000000018f607 /system/lib/libart.so (_ZN3art4JDWP9JdwpState3RunEv+286)

native: pc 0000000000190b4b /system/lib/libart.so (_ZN3art4JDWPL15StartJdwpThreadEPv+10)

native: pc 0000000000016f23 /system/lib/libc.so (_ZL15__pthread_startPv+30)

native: pc 0000000000014f43 /system/lib/libc.so (__start_thread+6)

“ReferenceQueueDaemon” daemon prio=5 tid=5 Waiting | group=“system” sCount=1 dsCount=0 obj=0x1ac00698 self=0xb049f800 | sysTid=14706 nice=0 cgrp=bg_non_interactive sched=0/0 handle=0xb0452d00 | state=S schedstat=( 0 0 0 ) utm=1 stm=0 core=2 HZ=100 | stack=0xafefe000-0xaff00000 stackSize=1036KB | held mutexes=

at java.lang.Object.wait! (Native method)

  • waiting on <0x215551a8> (a java.lang.Class<java.lang.ref.ReferenceQueue>)

at java.lang.Daemons$ReferenceQueueDaemon.run (Daemons.java:149)

  • locked <0x215551a8> (a java.lang.Class<java.lang.ref.ReferenceQueue>)

at java.lang.Thread.run (Thread.java:818)

“FinalizerDaemon” daemon prio=5 tid=6 Waiting | group=“system” sCount=1 dsCount=0 obj=0x1ac006f0 self=0xb049fc00 | sysTid=14707 nice=0 cgrp=bg_non_interactive sched=0/0 handle=0xb0452f80 | state=S schedstat=( 0 0 0 ) utm=3 stm=0 core=1 HZ=100 | stack=0xafdfa000-0xafdfc000 stackSize=1036KB | held mutexes=

at java.lang.Object.wait! (Native method)

  • waiting on <0x002524c1> (a java.lang.ref.ReferenceQueue)

at java.lang.Object.wait (Object.java:422)

at java.lang.ref.ReferenceQueue.remove (ReferenceQueue.java:101)

  • locked <0x002524c1> (a java.lang.ref.ReferenceQueue)

at java.lang.ref.ReferenceQueue.remove (ReferenceQueue.java:72)

at java.lang.Daemons$FinalizerDaemon.run (Daemons.java:189)

at java.lang.Thread.run (Thread.java:818)

“HeapTrimmerDaemon” daemon prio=5 tid=7 Waiting | group=“system” sCount=1 dsCount=0 obj=0x1ac00748 self=0xb04a0400 | sysTid=14709 nice=0 cgrp=bg_non_interactive sched=0/0 handle=0xb0453480 | state=S schedstat=( 0 0 0 ) utm=5 stm=4 core=1 HZ=100 | stack=0xa4246000-0xa4248000 stackSize=1036KB | held mutexes=

at java.lang.Object.wait! (Native method)

  • waiting on <0x0f49a466> (a java.lang.Daemons$HeapTrimmerDaemon)

at java.lang.Daemons$HeapTrimmerDaemon.run (Daemons.java:326)

  • locked <0x0f49a466> (a java.lang.Daemons$HeapTrimmerDaemon)

at java.lang.Thread.run (Thread.java:818)

“GCDaemon” daemon prio=5 tid=4 Waiting | group=“system” sCount=1 dsCount=0 obj=0x1ac007a0 self=0xb04a0800 | sysTid=14710 nice=0 cgrp=bg_non_interactive sched=0/0 handle=0xb0453700 | state=S schedstat=( 0 0 0 ) utm=6 stm=1 core=0 HZ=100 | stack=0xa4142000-0xa4144000 stackSize=1036KB | held mutexes=

at java.lang.Object.wait! (Native method)

  • waiting on <0x3f5643a7> (a java.lang.Daemons$GCDaemon)

at java.lang.Daemons$GCDaemon.run (Daemons.java:359)

  • locked <0x3f5643a7> (a java.lang.Daemons$GCDaemon)

at java.lang.Thread.run (Thread.java:818)

“FinalizerWatchdogDaemon” daemon prio=5 tid=8 Waiting | group=“system” sCount=1 dsCount=0 obj=0x1ac007f8 self=0xb04a0000 | sysTid=14708 nice=0 cgrp=bg_non_interactive sched=0/0 handle=0xb0453200 | state=S schedstat=( 0 0 0 ) utm=0 stm=0 core=1 HZ=100 | stack=0xa434a000-0xa434c000 stackSize=1036KB | held mutexes=

at java.lang.Object.wait! (Native method)

  • waiting on <0x3a81e054> (a java.lang.Daemons$FinalizerWatchdogDaemon)

at java.lang.Daemons$FinalizerWatchdogDaemon.waitForObject (Daemons.java:255)

  • locked <0x3a81e054> (a java.lang.Daemons$FinalizerWatchdogDaemon)

at java.lang.Daemons$FinalizerWatchdogDaemon.run (Daemons.java:227)

at java.lang.Thread.run (Thread.java:818)

“Binder_1” prio=5 tid=9 Native | group=“main” sCount=1 dsCount=0 obj=0x1ac00858 self=0xb4828000 | sysTid=14711 nice=0 cgrp=bg_non_interactive sched=0/0 handle=0xb4918300 | state=S schedstat=( 0 0 0 ) utm=0 stm=1 core=2 HZ=100 | stack=0xa444e000-0xa4450000 stackSize=1012KB | held mutexes=

native: pc 000000000003b554 /system/lib/libc.so (__ioctl+8)

native: pc 00000000000526a9 /system/lib/libc.so (ioctl+14)

native: pc 000000000001f5db /system/lib/libbinder.so (_ZN7android14IPCThreadState14talkWithDriverEb+138)

native: pc 000000000001fadb /system/lib/libbinder.so (_ZN7android14IPCThreadState20getAndExecuteCommandEv+6)

native: pc 000000000001fb3d /system/lib/libbinder.so (_ZN7android14IPCThreadState14joinThreadPoolEb+48)

native: pc 0000000000023ce3 /system/lib/libbinder.so (???)

native: pc 000000000001052d /system/lib/libutils.so (_ZN7android6Thread11_threadLoopEPv+112)

native: pc 0000000000065419 /system/lib/libandroid_runtime.so (_ZN7android14AndroidRuntime15javaThreadShellEPv+72)

native: pc 000000000001009d /system/lib/libutils.so (???)

native: pc 0000000000016f23 /system/lib/libc.so (_ZL15__pthread_startPv+30)

native: pc 0000000000014f43 /system/lib/libc.so (__start_thread+6)

“Binder_2” prio=5 tid=10 Native | group=“main” sCount=1 dsCount=0 obj=0x1ac008b0 self=0xb04a0c00 | sysTid=14712 nice=0 cgrp=bg_non_interactive sched=0/0 handle=0xb4918080 | state=S schedstat=( 0 0 0 ) utm=1 stm=0 core=1 HZ=100 | stack=0xb08ac000-0xb08ae000 stackSize=1012KB | held mutexes=

native: pc 000000000003b554 /system/lib/libc.so (__ioctl+8)

native: pc 00000000000526a9 /system/lib/libc.so (ioctl+14)

native: pc 000000000001f5db /system/lib/libbinder.so (_ZN7android14IPCThreadState14talkWithDriverEb+138)

native: pc 000000000001fadb /system/lib/libbinder.so (_ZN7android14IPCThreadState20getAndExecuteCommandEv+6)

native: pc 000000000001fb3d /system/lib/libbinder.so (_ZN7android14IPCThreadState14joinThreadPoolEb+48)

native: pc 0000000000023ce3 /system/lib/libbinder.so (???)

native: pc 000000000001052d /system/lib/libutils.so (_ZN7android6Thread11_threadLoopEPv+112)

native: pc 0000000000065419 /system/lib/libandroid_runtime.so (_ZN7android14AndroidRuntime15javaThreadShellEPv+72)

native: pc 000000000001009d /system/lib/libutils.so (???)

native: pc 0000000000016f23 /system/lib/libc.so (_ZL15__pthread_startPv+30)

native: pc 0000000000014f43 /system/lib/libc.so (__start_thread+6)

“Binder_3” prio=5 tid=12 Native | group=“main” sCount=1 dsCount=0 obj=0x1ac00908 self=0xb04a1c00 | sysTid=14772 nice=0 cgrp=bg_non_interactive sched=0/0 handle=0xb0453980 | state=S schedstat=( 0 0 0 ) utm=0 stm=0 core=1 HZ=100 | stack=0xb3de3000-0xb3de5000 stackSize=1012KB | held mutexes=

native: pc 000000000003b554 /system/lib/libc.so (__ioctl+8)

native: pc 00000000000526a9 /system/lib/libc.so (ioctl+14)

native: pc 000000000001f5db /system/lib/libbinder.so (_ZN7android14IPCThreadState14talkWithDriverEb+138)

native: pc 000000000001fadb /system/lib/libbinder.so (_ZN7android14IPCThreadState20getAndExecuteCommandEv+6)

native: pc 000000000001fb3d /system/lib/libbinder.so (_ZN7android14IPCThreadState14joinThreadPoolEb+48)

native: pc 0000000000023ce3 /system/lib/libbinder.so (???)

native: pc 000000000001052d /system/lib/libutils.so (_ZN7android6Thread11_threadLoopEPv+112)

native: pc 0000000000065419 /system/lib/libandroid_runtime.so (_ZN7android14AndroidRuntime15javaThreadShellEPv+72)

native: pc 000000000001009d /system/lib/libutils.so (???)

native: pc 0000000000016f23 /system/lib/libc.so (_ZL15__pthread_startPv+30)

native: pc 0000000000014f43 /system/lib/libc.so (__start_thread+6)

“GLThread 10468” prio=5 tid=11 Native | group=“main” sCount=1 dsCount=0 obj=0x1ac00960 self=0xb482c800 | sysTid=15943 nice=0 cgrp=bg_non_interactive sched=0/0 handle=0xb4918a80 | state=S schedstat=( 0 0 0 ) utm=17939 stm=69021 core=0 HZ=100 | stack=0xa2cf2000-0xa2cf4000 stackSize=1036KB | held mutexes=

native: pc 00000000000133dc /system/lib/libc.so (syscall+28)

native: pc 00000000000a9993 /system/lib/libart.so (_ZN3art17ConditionVariable4WaitEPNS_6ThreadE+82)

native: pc 000000000027ded5 /system/lib/libart.so (_ZN3artL12GoToRunnableEPNS_6ThreadE+756)

native: pc 0000000000087639 /system/lib/libart.so (_ZN3art12JniMethodEndEjPNS_6ThreadE+8)

native: pc 0000000000006e57 /system/framework/arm/boot.oat (Java_java_lang_Thread_yield__+90)

at java.lang.Thread.yield (Native method)

at plugin.google.iap.v3.LuaLoader.init (LuaLoader.java:183)

at plugin.google.iap.v3.LuaLoader.access$1200 (LuaLoader.java:37)

at plugin.google.iap.v3.LuaLoader$InitWrapper.invoke (LuaLoader.java:445)

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

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

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

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

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

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

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

“SoundPool” prio=5 tid=13 Native | group=“main” sCount=1 dsCount=0 obj=0x1ac010c0 self=0xb482d800 | sysTid=15954 nice=0 cgrp=bg_non_interactive sched=0/0 handle=0xb4918d00 | state=S schedstat=( 0 0 0 ) utm=0 stm=0 core=2 HZ=100 | stack=0xa2bf4000-0xa2bf6000 stackSize=1012KB | held mutexes=

native: pc 00000000000133dc /system/lib/libc.so (syscall+28)

native: pc 0000000000016df5 /system/lib/libc.so (_Z33__pthread_cond_timedwait_relativeP14pthread_cond_tP15pthread_mutex_tPK8timespec+56)

native: pc 0000000000081491 /system/lib/libmedia.so (_ZN7android9SoundPool3runEv+32)

native: pc 0000000000065419 /system/lib/libandroid_runtime.so (_ZN7android14AndroidRuntime15javaThreadShellEPv+72)

native: pc 000000000001009d /system/lib/libutils.so (???)

native: pc 0000000000016f23 /system/lib/libc.so (_ZL15__pthread_startPv+30)

native: pc 0000000000014f43 /system/lib/libc.so (__start_thread+6)

“SoundPoolThread” prio=5 tid=14 Native | group=“main” sCount=1 dsCount=0 obj=0x1ac01118 self=0xb04a3c00 | sysTid=15956 nice=0 cgrp=bg_non_interactive sched=0/0 handle=0xb491a380 | state=S schedstat=( 0 0 0 ) utm=0 stm=0 core=2 HZ=100 | stack=0xa2af6000-0xa2af8000 stackSize=1012KB | held mutexes=

native: pc 00000000000133dc /system/lib/libc.so (syscall+28)

native: pc 0000000000016df5 /system/lib/libc.so (_Z33__pthread_cond_timedwait_relativeP14pthread_cond_tP15pthread_mutex_tPK8timespec+56)

native: pc 0000000000081615 /system/lib/libmedia.so (_ZN7android15SoundPoolThread4readEv+18)

native: pc 0000000000081793 /system/lib/libmedia.so (_ZN7android15SoundPoolThread3runEv+14)

native: pc 0000000000065419 /system/lib/libandroid_runtime.so (_ZN7android14AndroidRuntime15javaThreadShellEPv+72)

native: pc 000000000001009d /system/lib/libutils.so (???)

native: pc 0000000000016f23 /system/lib/libc.so (_ZL15__pthread_startPv+30)

native: pc 0000000000014f43 /system/lib/libc.so (__start_thread+6)

“pool-3-thread-1” prio=5 tid=16 Waiting | group=“main” sCount=1 dsCount=0 obj=0x1ac011e0 self=0xb482e800 | sysTid=15975 nice=0 cgrp=bg_non_interactive sched=0/0 handle=0xb491b780 | state=S schedstat=( 0 0 0 ) utm=0 stm=0 core=2 HZ=100 | stack=0xa28b1000-0xa28b3000 stackSize=1036KB | held mutexes=

at java.lang.Object.wait! (Native method)

  • waiting on <0x109e4bfd> (a java.lang.Object)

at java.lang.Thread.parkFor (Thread.java:1220)

  • locked <0x109e4bfd> (a java.lang.Object)

at sun.misc.Unsafe.park (Unsafe.java:299)

at java.util.concurrent.locks.LockSupport.park (LockSupport.java:157)

at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await (AbstractQueuedSynchronizer.java:2016)

at java.util.concurrent.LinkedBlockingQueue.take (LinkedBlockingQueue.java:410)

at java.util.concurrent.ThreadPoolExecutor.getTask (ThreadPoolExecutor.java:1035)

at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1097)

at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:587)

at java.lang.Thread.run (Thread.java:818)

“RenderThread” prio=5 tid=17 Native | group=“main” sCount=1 dsCount=0 obj=0x1ac01338 self=0xb482f800 | sysTid=15979 nice=-4 cgrp=bg_non_interactive sched=0/0 handle=0xb491b000 | state=S schedstat=( 0 0 0 ) utm=2 stm=0 core=3 HZ=100 | stack=0xa27aa000-0xa27ac000 stackSize=1012KB | held mutexes=

native: pc 000000000003ba94 /system/lib/libc.so (__epoll_pwait+20)

native: pc 00000000000151df /system/lib/libc.so (epoll_pwait+26)

native: pc 00000000000151ed /system/lib/libc.so (epoll_wait+6)

native: pc 0000000000012573 /system/lib/libutils.so (_ZN7android6Looper9pollInnerEi+98)

native: pc 000000000001279d /system/lib/libutils.so (_ZN7android6Looper8pollOnceEiPiS1_PPv+92)

native: pc 0000000000043ab5 /system/lib/libhwui.so (_ZN7android10uirenderer12renderthread12RenderThread10threadLoopEv+44)

native: pc 000000000001052d /system/lib/libutils.so (_ZN7android6Thread11_threadLoopEPv+112)

native: pc 0000000000065419 /system/lib/libandroid_runtime.so (_ZN7android14AndroidRuntime15javaThreadShellEPv+72)

native: pc 000000000001009d /system/lib/libutils.so (???)

native: pc 0000000000016f23 /system/lib/libc.so (_ZL15__pthread_startPv+30)

native: pc 0000000000014f43 /system/lib/libc.so (__start_thread+6)

“background thread” prio=5 tid=25 Native | group=“main” sCount=1 dsCount=0 obj=0x1ac02868 self=0xb4bcb000 | sysTid=16047 nice=0 cgrp=bg_non_interactive sched=0/0 handle=0xa1936c00 | state=S schedstat=( 0 0 0 ) utm=0 stm=0 core=1 HZ=100 | stack=0xa12ee000-0xa12f0000 stackSize=1036KB | held mutexes=

native: pc 000000000003ba94 /system/lib/libc.so (__epoll_pwait+20)

native: pc 00000000000151df /system/lib/libc.so (epoll_pwait+26)

native: pc 00000000000151ed /system/lib/libc.so (epoll_wait+6)

native: pc 0000000000012573 /system/lib/libutils.so (_ZN7android6Looper9pollInnerEi+98)

native: pc 000000000001279d /system/lib/libutils.so (_ZN7android6Looper8pollOnceEiPiS1_PPv+92)

native: pc 00000000000889b5 /system/lib/libandroid_runtime.so (_ZN7android18NativeMessageQueue8pollOnceEP7_JNIEnvi+22)

native: pc 00000000000b6813 /system/framework/arm/boot.oat (Java_android_os_MessageQueue_nativePollOnce__JI+102)

at android.os.MessageQueue.nativePollOnce (Native method)

at android.os.MessageQueue.next (MessageQueue.java:143)

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

at android.os.HandlerThread.run (HandlerThread.java:61)

“Binder_4” prio=5 tid=26 Native | group=“main” sCount=1 dsCount=0 obj=0x1ac02920 self=0xa19cc400 | sysTid=16163 nice=0 cgrp=bg_non_interactive sched=0/0 handle=0xb4918f80 | state=S schedstat=( 0 0 0 ) utm=0 stm=0 core=3 HZ=100 | stack=0xa11f0000-0xa11f2000 stackSize=1012KB | held mutexes=

native: pc 000000000003b554 /system/lib/libc.so (__ioctl+8)

native: pc 00000000000526a9 /system/lib/libc.so (ioctl+14)

native: pc 000000000001f5db /system/lib/libbinder.so (_ZN7android14IPCThreadState14talkWithDriverEb+138)

native: pc 000000000001fadb /system/lib/libbinder.so (_ZN7android14IPCThreadState20getAndExecuteCommandEv+6)

native: pc 000000000001fb3d /system/lib/libbinder.so (_ZN7android14IPCThreadState14joinThreadPoolEb+48)

native: pc 0000000000023ce3 /system/lib/libbinder.so (???)

native: pc 000000000001052d /system/lib/libutils.so (_ZN7android6Thread11_threadLoopEPv+112)

native: pc 0000000000065419 /system/lib/libandroid_runtime.so (_ZN7android14AndroidRuntime15javaThreadShellEPv+72)

native: pc 000000000001009d /system/lib/libutils.so (???)

native: pc 0000000000016f23 /system/lib/libc.so (_ZL15__pthread_startPv+30)

native: pc 0000000000014f43 /system/lib/libc.so (__start_thread+6)

I am investigating the same issue. Did you find anything that helped?

I’m looking into this but it’s proving difficult to reproduce.  I’ll post when I know more.

@Perry and you thought it was just me… 

Guys, Corona is aware of the issue… fix is comming

This is a different issue (also in the Google IAP V3 plugin).

No it is not Perry…  I only reported crashes to you.

I see a massive escalations of ANRs recently (as reported to Rob) using a recent build.  

The fixes should cure both hopefully

I get it with Facebook plugin too

"main" prio=5 tid=1 Blocked | group="main" sCount=1 dsCount=0 obj=0x747f7b50 self=0xb89450a8 | sysTid=27859 nice=0 cgrp=default sched=0/0 handle=0xb6fcabec | state=S schedstat=( 914983881 983720820 1693 ) utm=63 stm=28 core=1 HZ=100 | stack=0xbe2c2000-0xbe2c4000 stackSize=8MB | held mutexes= at com.ansca.corona.Controller.stop (Controller.java:263) - waiting to lock \<0x086314f7\> (a com.ansca.corona.Controller) held by thread 13 at com.ansca.corona.CoronaActivity.requestSuspendCoronaRuntime (CoronaActivity.java:1948) at com.ansca.corona.CoronaActivity.onPause (CoronaActivity.java:1771) at android.app.Activity.performPause (Activity.java:6144) at android.app.Instrumentation.callActivityOnPause (Instrumentation.java:1310) at android.app.ActivityThread.performPauseActivity (ActivityThread.java:3246) at android.app.ActivityThread.performPauseActivity (ActivityThread.java:3219) at android.app.ActivityThread.handlePauseActivity (ActivityThread.java:3194) at android.app.ActivityThread.access$1000 (ActivityThread.java:151) at android.app.ActivityThread$H.handleMessage (ActivityThread.java:1314) at android.os.Handler.dispatchMessage (Handler.java:102) at android.os.Looper.loop (Looper.java:135) at android.app.ActivityThread.main (ActivityThread.java:5254) at java.lang.reflect.Method.invoke! (Native method) at java.lang.reflect.Method.invoke (Method.java:372) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run (ZygoteInit.java:902) at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:697) "GLThread 7317" prio=5 tid=13 Native | group="main" sCount=1 dsCount=0 obj=0x12c140c0 self=0xb8afb340 | sysTid=31305 nice=0 cgrp=default sched=0/0 handle=0xb8afb958 | state=S schedstat=( 14417155405 892515384 3740 ) utm=640 stm=801 core=0 HZ=100 | stack=0xa5bf6000-0xa5bf8000 stackSize=1036KB | held mutexes= native: pc 000000000000f9a8 /system/lib/libc.so (syscall+28) native: pc 00000000000a8c4b /system/lib/libart.so (art::ConditionVariable::Wait(art::Thread\*)+82) native: pc 000000000027a76d /system/lib/libart.so (art::GoToRunnable(art::Thread\*)+756) native: pc 0000000000086939 /system/lib/libart.so (art::JniMethodEnd(unsigned int, art::Thread\*)+8) native: pc 0000000000006c7f /data/dalvik-cache/arm/system@framework@boot.oat (Java\_java\_lang\_Thread\_yield\_\_+90) at java.lang.Thread.yield (Native method) at plugin.facebook.v4.FacebookController.facebookInit (FacebookController.java:800) at plugin.facebook.v4.LuaLoader.invoke (LuaLoader.java:75) at com.ansca.corona.JavaToNativeShim.nativeRender (Native method) at com.ansca.corona.JavaToNativeShim.render (JavaToNativeShim.java:182) at com.ansca.corona.Controller.updateRuntimeState (Controller.java:347) - locked \<0x086314f7\> (a com.ansca.corona.Controller) at com.ansca.corona.graphics.opengl.CoronaGLSurfaceView$CoronaRenderer.onDrawFrame (CoronaGLSurfaceView.java:421) at com.ansca.corona.graphics.opengl.GLSurfaceView$GLThread.guardedRun (GLSurfaceView.java:1623) at com.ansca.corona.graphics.opengl.GLSurfaceView$GLThread.run (GLSurfaceView.java:1378)

Has there been any progress on this issue?

Now that performance quality is more important for app ranking in the Google Play store this is even more of an issue :confused:

We have made changes to both Google IAP V3 and Facebook V4 to address this issue. For IAP the changes should have been picked up, though you may need to tweak your code if you’re doing IAP things when main.lua runs more than initializing the listener (loading products, calling store.restore() etc.). See: https://coronalabs.com/blog/2017/07/19/important-google-iap-plugin-update/

For Facebook, you have to actively change to the facebook.v4a plugin to pick up the changes. This changes how you have to initialize the plugin slightly and again, doing things in main.lua until the initialization completes is problematic. Please see: https://coronalabs.com/blog/2017/08/14/introducing-new-facebook-v4a-plugin/

Rob

Oh! Missed those posts. Thank you for pointing it out.

I am investigating the same issue. Did you find anything that helped?

I’m looking into this but it’s proving difficult to reproduce.  I’ll post when I know more.

@Perry and you thought it was just me… 

Guys, Corona is aware of the issue… fix is comming

This is a different issue (also in the Google IAP V3 plugin).

No it is not Perry…  I only reported crashes to you.

I see a massive escalations of ANRs recently (as reported to Rob) using a recent build.  

The fixes should cure both hopefully

I get it with Facebook plugin too

"main" prio=5 tid=1 Blocked | group="main" sCount=1 dsCount=0 obj=0x747f7b50 self=0xb89450a8 | sysTid=27859 nice=0 cgrp=default sched=0/0 handle=0xb6fcabec | state=S schedstat=( 914983881 983720820 1693 ) utm=63 stm=28 core=1 HZ=100 | stack=0xbe2c2000-0xbe2c4000 stackSize=8MB | held mutexes= at com.ansca.corona.Controller.stop (Controller.java:263) - waiting to lock \<0x086314f7\> (a com.ansca.corona.Controller) held by thread 13 at com.ansca.corona.CoronaActivity.requestSuspendCoronaRuntime (CoronaActivity.java:1948) at com.ansca.corona.CoronaActivity.onPause (CoronaActivity.java:1771) at android.app.Activity.performPause (Activity.java:6144) at android.app.Instrumentation.callActivityOnPause (Instrumentation.java:1310) at android.app.ActivityThread.performPauseActivity (ActivityThread.java:3246) at android.app.ActivityThread.performPauseActivity (ActivityThread.java:3219) at android.app.ActivityThread.handlePauseActivity (ActivityThread.java:3194) at android.app.ActivityThread.access$1000 (ActivityThread.java:151) at android.app.ActivityThread$H.handleMessage (ActivityThread.java:1314) at android.os.Handler.dispatchMessage (Handler.java:102) at android.os.Looper.loop (Looper.java:135) at android.app.ActivityThread.main (ActivityThread.java:5254) at java.lang.reflect.Method.invoke! (Native method) at java.lang.reflect.Method.invoke (Method.java:372) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run (ZygoteInit.java:902) at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:697) "GLThread 7317" prio=5 tid=13 Native | group="main" sCount=1 dsCount=0 obj=0x12c140c0 self=0xb8afb340 | sysTid=31305 nice=0 cgrp=default sched=0/0 handle=0xb8afb958 | state=S schedstat=( 14417155405 892515384 3740 ) utm=640 stm=801 core=0 HZ=100 | stack=0xa5bf6000-0xa5bf8000 stackSize=1036KB | held mutexes= native: pc 000000000000f9a8 /system/lib/libc.so (syscall+28) native: pc 00000000000a8c4b /system/lib/libart.so (art::ConditionVariable::Wait(art::Thread\*)+82) native: pc 000000000027a76d /system/lib/libart.so (art::GoToRunnable(art::Thread\*)+756) native: pc 0000000000086939 /system/lib/libart.so (art::JniMethodEnd(unsigned int, art::Thread\*)+8) native: pc 0000000000006c7f /data/dalvik-cache/arm/system@framework@boot.oat (Java\_java\_lang\_Thread\_yield\_\_+90) at java.lang.Thread.yield (Native method) at plugin.facebook.v4.FacebookController.facebookInit (FacebookController.java:800) at plugin.facebook.v4.LuaLoader.invoke (LuaLoader.java:75) at com.ansca.corona.JavaToNativeShim.nativeRender (Native method) at com.ansca.corona.JavaToNativeShim.render (JavaToNativeShim.java:182) at com.ansca.corona.Controller.updateRuntimeState (Controller.java:347) - locked \<0x086314f7\> (a com.ansca.corona.Controller) at com.ansca.corona.graphics.opengl.CoronaGLSurfaceView$CoronaRenderer.onDrawFrame (CoronaGLSurfaceView.java:421) at com.ansca.corona.graphics.opengl.GLSurfaceView$GLThread.guardedRun (GLSurfaceView.java:1623) at com.ansca.corona.graphics.opengl.GLSurfaceView$GLThread.run (GLSurfaceView.java:1378)

Has there been any progress on this issue?

Now that performance quality is more important for app ranking in the Google Play store this is even more of an issue :confused:

We have made changes to both Google IAP V3 and Facebook V4 to address this issue. For IAP the changes should have been picked up, though you may need to tweak your code if you’re doing IAP things when main.lua runs more than initializing the listener (loading products, calling store.restore() etc.). See: https://coronalabs.com/blog/2017/07/19/important-google-iap-plugin-update/

For Facebook, you have to actively change to the facebook.v4a plugin to pick up the changes. This changes how you have to initialize the plugin slightly and again, doing things in main.lua until the initialization completes is problematic. Please see: https://coronalabs.com/blog/2017/08/14/introducing-new-facebook-v4a-plugin/

Rob

Oh! Missed those posts. Thank you for pointing it out.