java.lang.NullPointerException: Attempt to invoke interface method 'boolean android.bluetooth.IBluetoothPan.isTetheringOn()' on a null object reference

JIRA | Stefano Figura | 1 year ago
tip
Click on the to mark the solution that helps you, Samebug will learn from it.
As a community member, you’ll be rewarded for you help.
  1. 0

    Bluetooth randomly stops working when phone is connected to Sony Smart Watch 3 (Android Wear). Bluetooth seems working if it is left active but not connected. When bluetooth "crashes" the toggle is set to off and is grayed out. If I try to re enable bluetooth I get an error: "Unfortunately, Settings has stopped." java.lang.NullPointerException: Attempt to invoke interface method 'boolean android.bluetooth.IBluetoothPan.isTetheringOn()' on a null object reference at android.bluetooth.BluetoothPan.isTetheringOn(BluetoothPan.java:353) at com.android.settings.bluetooth.BluetoothSettings.onCreateOptionsMenu(BluetoothSettings.java:245) at android.app.Fragment.performCreateOptionsMenu(Fragment.java:2133) at android.app.FragmentManagerImpl.dispatchCreateOptionsMenu(FragmentManager.java:1943) at android.app.Activity.onCreatePanelMenu(Activity.java:2824) at com.android.internal.policy.impl.PhoneWindow.preparePanel(PhoneWindow.java:600) at com.android.internal.policy.impl.PhoneWindow.doInvalidatePanelMenu(PhoneWindow.java:972) at com.android.internal.policy.impl.PhoneWindow$1.run(PhoneWindow.java:309) at android.view.Choreographer$CallbackRecord.run(Choreographer.java:767) at android.view.Choreographer.doCallbacks(Choreographer.java:580) at android.view.Choreographer.doFrame(Choreographer.java:549) at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:753) at android.os.Handler.handleCallback(Handler.java:739) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:135) at android.app.ActivityThread.main(ActivityThread.java:5289) at java.lang.reflect.Method.invoke(Native Method) at java.lang.reflect.Method.invoke(Method.java:372) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:904) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:699) In order to re enable bluetooth I have to reboot the phone.

    JIRA | 1 year ago | Stefano Figura
    java.lang.NullPointerException: Attempt to invoke interface method 'boolean android.bluetooth.IBluetoothPan.isTetheringOn()' on a null object reference
  2. 0

    Bluetooth randomly stops working when phone is connected to Sony Smart Watch 3 (Android Wear). Bluetooth seems working if it is left active but not connected. When bluetooth "crashes" the toggle is set to off and is grayed out. If I try to re enable bluetooth I get an error: "Unfortunately, Settings has stopped." java.lang.NullPointerException: Attempt to invoke interface method 'boolean android.bluetooth.IBluetoothPan.isTetheringOn()' on a null object reference at android.bluetooth.BluetoothPan.isTetheringOn(BluetoothPan.java:353) at com.android.settings.bluetooth.BluetoothSettings.onCreateOptionsMenu(BluetoothSettings.java:245) at android.app.Fragment.performCreateOptionsMenu(Fragment.java:2133) at android.app.FragmentManagerImpl.dispatchCreateOptionsMenu(FragmentManager.java:1943) at android.app.Activity.onCreatePanelMenu(Activity.java:2824) at com.android.internal.policy.impl.PhoneWindow.preparePanel(PhoneWindow.java:600) at com.android.internal.policy.impl.PhoneWindow.doInvalidatePanelMenu(PhoneWindow.java:972) at com.android.internal.policy.impl.PhoneWindow$1.run(PhoneWindow.java:309) at android.view.Choreographer$CallbackRecord.run(Choreographer.java:767) at android.view.Choreographer.doCallbacks(Choreographer.java:580) at android.view.Choreographer.doFrame(Choreographer.java:549) at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:753) at android.os.Handler.handleCallback(Handler.java:739) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:135) at android.app.ActivityThread.main(ActivityThread.java:5289) at java.lang.reflect.Method.invoke(Native Method) at java.lang.reflect.Method.invoke(Method.java:372) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:904) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:699) In order to re enable bluetooth I have to reboot the phone.

    JIRA | 1 year ago | Stefano Figura
    java.lang.NullPointerException: Attempt to invoke interface method 'boolean android.bluetooth.IBluetoothPan.isTetheringOn()' on a null object reference

    Root Cause Analysis

    1. java.lang.NullPointerException

      Attempt to invoke interface method 'boolean android.bluetooth.IBluetoothPan.isTetheringOn()' on a null object reference

      at android.bluetooth.BluetoothPan.isTetheringOn()
    2. Android Platform
      BluetoothPan.isTetheringOn
      1. android.bluetooth.BluetoothPan.isTetheringOn(BluetoothPan.java:353)
      1 frame
    3. com.android.settings
      BluetoothSettings.onCreateOptionsMenu
      1. com.android.settings.bluetooth.BluetoothSettings.onCreateOptionsMenu(BluetoothSettings.java:245)
      1 frame
    4. Android Platform
      Activity.onCreatePanelMenu
      1. android.app.Fragment.performCreateOptionsMenu(Fragment.java:2133)
      2. android.app.FragmentManagerImpl.dispatchCreateOptionsMenu(FragmentManager.java:1943)
      3. android.app.Activity.onCreatePanelMenu(Activity.java:2824)
      3 frames
    5. Android
      PhoneWindow$1.run
      1. com.android.internal.policy.impl.PhoneWindow.preparePanel(PhoneWindow.java:600)
      2. com.android.internal.policy.impl.PhoneWindow.doInvalidatePanelMenu(PhoneWindow.java:972)
      3. com.android.internal.policy.impl.PhoneWindow$1.run(PhoneWindow.java:309)
      3 frames
    6. Android Platform
      ActivityThread.main
      1. android.view.Choreographer$CallbackRecord.run(Choreographer.java:767)
      2. android.view.Choreographer.doCallbacks(Choreographer.java:580)
      3. android.view.Choreographer.doFrame(Choreographer.java:549)
      4. android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:753)
      5. android.os.Handler.handleCallback(Handler.java:739)
      6. android.os.Handler.dispatchMessage(Handler.java:95)
      7. android.os.Looper.loop(Looper.java:135)
      8. android.app.ActivityThread.main(ActivityThread.java:5289)
      8 frames
    7. Java RT
      Method.invoke
      1. java.lang.reflect.Method.invoke(Native Method)
      2. java.lang.reflect.Method.invoke(Method.java:372)
      2 frames
    8. Android
      ZygoteInit.main
      1. com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:904)
      2. com.android.internal.os.ZygoteInit.main(ZygoteInit.java:699)
      2 frames