Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android ANR/deadlock in BOOT_COMPLETED intent #9

Open
Buthrakaur opened this issue Nov 15, 2017 · 1 comment
Open

Android ANR/deadlock in BOOT_COMPLETED intent #9

Buthrakaur opened this issue Nov 15, 2017 · 1 comment

Comments

@Buthrakaur
Copy link
Contributor

Hello,
I get hundreds of ANR reports for this:

Broadcast of Intent { act=android.intent.action.BOOT_COMPLETED flg=0x8000010 cmp=org.smart_guide.smartguide2.T00040/com.cube.geofencing.RNRegionMonitorBootReceiver (has extras) }

"main" prio=5 tid=1 Waiting
  | group="main" sCount=1 dsCount=0 obj=0x764cc730 self=0xec105400
  | sysTid=15317 nice=0 cgrp=bg_non_interactive sched=0/0 handle=0xef746534
  | state=S schedstat=( 0 0 0 ) utm=6 stm=2 core=7 HZ=100
  | stack=0xff5dc000-0xff5de000 stackSize=8MB
  | held mutexes=
  at java.lang.Object.wait! (Native method)
- waiting on <0x03b394a7> (a java.lang.Object)
  at java.lang.Thread.parkFor$ (Thread.java:2128)
- locked <0x03b394a7> (a java.lang.Object)
  at sun.misc.Unsafe.park (Unsafe.java:325)
  at java.util.concurrent.locks.LockSupport.park (LockSupport.java:161)
  at java.util.concurrent.locks.AbstractQueuedSynchronizer.parkAndCheckInterrupt (AbstractQueuedSynchronizer.java:840)
  at java.util.concurrent.locks.AbstractQueuedSynchronizer.doAcquireSharedInterruptibly (AbstractQueuedSynchronizer.java:994)
  at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireSharedInterruptibly (AbstractQueuedSynchronizer.java:1303)
  at java.util.concurrent.CountDownLatch.await (CountDownLatch.java:203)
  at com.cube.geofencing.GeofenceManager.addGeofences (GeofenceManager.java:69)
  at com.cube.geofencing.RNRegionMonitorBootReceiver.onReceive (RNRegionMonitorBootReceiver.java:41)
  at android.app.ActivityThread.handleReceiver (ActivityThread.java:3309)
  at android.app.ActivityThread.-wrap20 (ActivityThread.java)
  at android.app.ActivityThread$H.handleMessage (ActivityThread.java:1715)
  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)

It looks like GoogleApiClient isn't able to get connected after restart of device causing the ANR (Applicaiton Not Responding). It's probably not visible to the user, but it shouldn't occur anyway.

@benlui
Copy link

benlui commented Nov 21, 2018

We experienced the same when trying to use @next version (2.0.0-alpha.2). Our team is trying to implement the GeofenceManager using LocationServices.getGeofencingClient which was introduced in Google Play Service version 11.0. While the "AppRegistry.registerHeadlessTask" in regionMonitor.android.js may need to modify to make the tailor make the callback for onRegionChange().

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants