question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Beta3] NPE BleManager$BleManagerGattCallback.nextRequest(boolean)' on a null object reference

See original GitHub issue

On Beta3, it happened after I tried to connect and received a TimeoutException

Process: com.mycompany, PID: 20828
    java.lang.NullPointerException: Attempt to invoke direct method 'void no.nordicsemi.android.ble.BleManager$BleManagerGattCallback.nextRequest(boolean)' on a null object reference
        at no.nordicsemi.android.ble.BleManager$BleManagerGattCallback.access$1300(BleManager.java:1836)
        at no.nordicsemi.android.ble.BleManager.lambda$enqueue$4(BleManager.java:1804)
        at no.nordicsemi.android.ble.-$$Lambda$BleManager$KDSxdgn5nClZRFe_FvyLUfX8mWc.run(Unknown Source:2)
        at android.os.Handler.handleCallback(Handler.java:790)
        at android.os.Handler.dispatchMessage(Handler.java:99)
        at android.os.Looper.loop(Looper.java:164)
        at android.app.ActivityThread.main(ActivityThread.java:6494)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)

Might it be that I immediately tried to connect again, even before receiving bluetoothgatt close callback?

//Exception stack trace
2018-10-01 14:51:21.872  D/MyClass: Invoking connect 
2018-10-01 14:51:21.873  D/BluetoothGatt: close()
2018-10-01 14:51:21.873  D/BluetoothGatt: unregisterApp() - mClientIf=7
2018-10-01 14:51:21.881  D/MyClass: onError: a BLE error has occurred message = Error on connection state change, code = 133

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:12 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
ghostcommented, Oct 2, 2018

I haven’t been able to reproduce the issue, congrats!

Also, I’d say this branch works much better, I’d say there was a stability decrease in beta 3, I don’t know if it makes sense 🤷‍♂️

1reaction
ghostcommented, Oct 2, 2018

I’m going to do it right now

Read more comments on GitHub >

github_iconTop Results From Across the Web

android - nullObjectReference on a bool - Stack Overflow
for some reason i'm getting a null object reference of this Boolean and i don't know why. i cant figure out why the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found