You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Null pointer exception is randomly raised after executing stop ranging (possibly after stop monitoring as well) when using 2.0-beta3 binary library. This occurs on synchronized (rangeState), line 596, of processBeaconFromScan method from BeaconService.java file. The exception seems to be triggered by a race condition after the region was removed from rangedRegionState map after the region was included in the matchedRegions but before retrieving it from rangedRegionState for the code indicated above. The exception occurs randomly and could be reproduced by executing in a quick succession start/stop ranging/monitoring methods.
Please find below the debug messages captured when the error was reported:
08-20 10:39:23.151: D/BeaconService(22993): beacon detected multiple times in scan cycle :id1: aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa id2: 1 id3: 1
08-20 10:39:23.151: D/BeaconService(22993): beacon detected :id1: aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa id2: 1 id3: 1
08-20 10:39:23.151: D/BeaconService(22993): looking for ranging region matches for this beacon
08-20 10:39:23.151: D/BeaconService(22993): matches ranging region: id1: aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa id2: null id3: null
08-20 10:39:23.151: I/BeaconService(22993): stop ranging received
08-20 10:39:23.151: D/BeaconService(22993): Currently ranging 0 regions.
08-20 10:39:23.151: W/dalvikvm(22993): threadid=24: thread exiting with uncaught exception (group=0x4153bba8)
08-20 10:39:23.151: E/AndroidRuntime(22993): FATAL EXCEPTION: AsyncTask #3
08-20 10:39:23.151: E/AndroidRuntime(22993): Process: …, PID: 22993
08-20 10:39:23.151: E/AndroidRuntime(22993): java.lang.RuntimeException: An error occured while executing doInBackground()
08-20 10:39:23.151: E/AndroidRuntime(22993): at android.os.AsyncTask$3.done(AsyncTask.java:300)
08-20 10:39:23.151: E/AndroidRuntime(22993): at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:355)
08-20 10:39:23.151: E/AndroidRuntime(22993): at java.util.concurrent.FutureTask.setException(FutureTask.java:222)
08-20 10:39:23.151: E/AndroidRuntime(22993): at java.util.concurrent.FutureTask.run(FutureTask.java:242)
08-20 10:39:23.151: E/AndroidRuntime(22993): at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:231)
08-20 10:39:23.151: E/AndroidRuntime(22993): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
08-20 10:39:23.151: E/AndroidRuntime(22993): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
08-20 10:39:23.151: E/AndroidRuntime(22993): at java.lang.Thread.run(Thread.java:841)
08-20 10:39:23.151: E/AndroidRuntime(22993): Caused by: java.lang.NullPointerException
08-20 10:39:23.151: E/AndroidRuntime(22993): at org.altbeacon.beacon.service.BeaconService.processBeaconFromScan(BeaconService.java:596)
08-20 10:39:23.151: E/AndroidRuntime(22993): at org.altbeacon.beacon.service.BeaconService.access$400(BeaconService.java:64)
08-20 10:39:23.151: E/AndroidRuntime(22993): at org.altbeacon.beacon.service.BeaconService$ScanProcessor.doInBackground(BeaconService.java:617)
08-20 10:39:23.151: E/AndroidRuntime(22993): at org.altbeacon.beacon.service.BeaconService$ScanProcessor.doInBackground(BeaconService.java:602)
08-20 10:39:23.151: E/AndroidRuntime(22993): at android.os.AsyncTask$2.call(AsyncTask.java:288)
08-20 10:39:23.151: E/AndroidRuntime(22993): at java.util.concurrent.FutureTask.run(FutureTask.java:237)
08-20 10:39:23.151: E/AndroidRuntime(22993): ... 4 more
The text was updated successfully, but these errors were encountered:
Null pointer exception is randomly raised after executing stop ranging (possibly after stop monitoring as well) when using 2.0-beta3 binary library. This occurs on synchronized (rangeState), line 596, of processBeaconFromScan method from BeaconService.java file. The exception seems to be triggered by a race condition after the region was removed from rangedRegionState map after the region was included in the matchedRegions but before retrieving it from rangedRegionState for the code indicated above. The exception occurs randomly and could be reproduced by executing in a quick succession start/stop ranging/monitoring methods.
Please find below the debug messages captured when the error was reported:
08-20 10:39:23.151: D/BeaconService(22993): beacon detected multiple times in scan cycle :id1: aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa id2: 1 id3: 1
08-20 10:39:23.151: D/BeaconService(22993): beacon detected :id1: aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa id2: 1 id3: 1
08-20 10:39:23.151: D/BeaconService(22993): looking for ranging region matches for this beacon
08-20 10:39:23.151: D/BeaconService(22993): matches ranging region: id1: aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa id2: null id3: null
08-20 10:39:23.151: I/BeaconService(22993): stop ranging received
08-20 10:39:23.151: D/BeaconService(22993): Currently ranging 0 regions.
08-20 10:39:23.151: W/dalvikvm(22993): threadid=24: thread exiting with uncaught exception (group=0x4153bba8)
08-20 10:39:23.151: E/AndroidRuntime(22993): FATAL EXCEPTION: AsyncTask #3
08-20 10:39:23.151: E/AndroidRuntime(22993): Process: …, PID: 22993
08-20 10:39:23.151: E/AndroidRuntime(22993): java.lang.RuntimeException: An error occured while executing doInBackground()
08-20 10:39:23.151: E/AndroidRuntime(22993): at android.os.AsyncTask$3.done(AsyncTask.java:300)
08-20 10:39:23.151: E/AndroidRuntime(22993): at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:355)
08-20 10:39:23.151: E/AndroidRuntime(22993): at java.util.concurrent.FutureTask.setException(FutureTask.java:222)
08-20 10:39:23.151: E/AndroidRuntime(22993): at java.util.concurrent.FutureTask.run(FutureTask.java:242)
08-20 10:39:23.151: E/AndroidRuntime(22993): at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:231)
08-20 10:39:23.151: E/AndroidRuntime(22993): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
08-20 10:39:23.151: E/AndroidRuntime(22993): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
08-20 10:39:23.151: E/AndroidRuntime(22993): at java.lang.Thread.run(Thread.java:841)
08-20 10:39:23.151: E/AndroidRuntime(22993): Caused by: java.lang.NullPointerException
08-20 10:39:23.151: E/AndroidRuntime(22993): at org.altbeacon.beacon.service.BeaconService.processBeaconFromScan(BeaconService.java:596)
08-20 10:39:23.151: E/AndroidRuntime(22993): at org.altbeacon.beacon.service.BeaconService.access$400(BeaconService.java:64)
08-20 10:39:23.151: E/AndroidRuntime(22993): at org.altbeacon.beacon.service.BeaconService$ScanProcessor.doInBackground(BeaconService.java:617)
08-20 10:39:23.151: E/AndroidRuntime(22993): at org.altbeacon.beacon.service.BeaconService$ScanProcessor.doInBackground(BeaconService.java:602)
08-20 10:39:23.151: E/AndroidRuntime(22993): at android.os.AsyncTask$2.call(AsyncTask.java:288)
08-20 10:39:23.151: E/AndroidRuntime(22993): at java.util.concurrent.FutureTask.run(FutureTask.java:237)
08-20 10:39:23.151: E/AndroidRuntime(22993): ... 4 more
The text was updated successfully, but these errors were encountered: