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

NullPointer when destroying BeaconService #792

Closed
Del-S opened this issue Dec 4, 2018 · 2 comments
Closed

NullPointer when destroying BeaconService #792

Del-S opened this issue Dec 4, 2018 · 2 comments

Comments

@Del-S
Copy link

Del-S commented Dec 4, 2018

Hello,

I'm testing new Pre-release (2.15.3-beta1) and I'm getting this NullPointerException when I'm destroying BeaconService.

java.lang.RuntimeException: Unable to stop service org.altbeacon.beacon.service.BeaconService@28ee2fe: java.lang.NullPointerException: Attempt to invoke virtual method 'void org.altbeacon.bluetooth.BluetoothCrashResolver.stop()' on a null object reference
        at android.app.ActivityThread.handleStopService(ActivityThread.java:4114)
        at android.app.ActivityThread.-wrap27(Unknown Source:0)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2025)
        at android.os.Handler.dispatchMessage(Handler.java:108)
        at android.os.Looper.loop(Looper.java:166)
        at android.app.ActivityThread.main(ActivityThread.java:7425)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:245)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:921)
     Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'void org.altbeacon.bluetooth.BluetoothCrashResolver.stop()' on a null object reference
        at org.altbeacon.beacon.service.BeaconService.onDestroy(BeaconService.java:333)

Seems like BluetoothCrashResolver is created only for API under 21 but onDestroy does not check for this condition or if it exists.

@davidgyoung
Copy link
Member

This was just fixed in #790, although it has not yet been put into a release. It will be in 2.15.3

@Del-S
Copy link
Author

Del-S commented Dec 5, 2018

Oh I missed that. Thank you.

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