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

Null Pointer exception after executing regionBootstrap.disable() [Randomly] #140

Closed
jayshildave opened this issue Mar 26, 2015 · 4 comments

Comments

@jayshildave
Copy link

Null pointer exception is randomly raised after executing stop ranging (possibly after stop monitoring as well) when using the latest altBeacon trunk source code from Github 2.1.4

Its in link with issue #25 where it was being crashed in the same method.
Now the crash is on line no. 391 in method processBeaconFromScan from the asynctask.
The null pointer happens while reading state inside monitoredRegionState.

Currently we are synchronising reading rangedRegionState but monitoredRegionState is not given the same safeguard for multiple threaded operations.

@davidgyoung
Copy link
Member

Do you have a stack trace? Which library version is this?

@jayshildave
Copy link
Author

The stack trace is
java.lang.RuntimeException: An error occured
while executing doInBackground()
at android.os.AsyncTask$3.done(AsyncTask.java:300)
at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:355)
at java.util.concurrent.FutureTask.setException(FutureTask.java:222)
at java.util.concurrent.FutureTask.run(FutureTask.java:242)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
at java.lang.Thread.run(Thread.java:841)
Caused by: java.lang.NullPointerException
at org.altbeacon.beacon.service.BeaconService.processBeaconFromScan(BeaconService.java:391)
at org.altbeacon.beacon.service.BeaconService.access$400(BeaconService.java:66)
at org.altbeacon.beacon.service.BeaconService$ScanProcessor.doInBackground(BeaconService.java:439)
at org.altbeacon.beacon.service.BeaconService$ScanProcessor.doInBackground(BeaconService.java:422)
at android.os.AsyncTask$2.call(AsyncTask.java:288)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
... 3 more

And I am compiling the latest source code from trunk.

@jayshildave
Copy link
Author

Hi David,

I posted the stack trace on the issue did you see it?

BR,
Jayshil
On Mar 26, 2015 5:59 PM, "David G. Young" notifications@github.com wrote:

Do you have a stack trace? Which library version is this?


Reply to this email directly or view it on GitHub
#140 (comment)
.

@davidgyoung
Copy link
Member

@jayshildave, yes I saw the stack trace. I put in a fix in commit 0f7d5b7. See #146

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