java.lang.NullPointerException: Attempt to read from null array

tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    com.android.phone crashes after boot

    Android Enthusiasts | 1 year ago | Frank Science
    java.lang.NullPointerException: Attempt to read from null array
  2. 0

    I suffered from the bug for nightly builds of kltechnduo 20150825-20150828, when SIM1 is empty but SIM2 is inserted. One can simply repeatedly skip this warning, but afterwards no SMS could be received successfully. Even after wiping data, the bug is still there. The issue disappears if I replug my SIM to SIM1 port. Here's part of logcat: E/AndroidRuntime( 1260): FATAL EXCEPTION: main E/AndroidRuntime( 1260): Process: com.android.phone, PID: 1260 E/AndroidRuntime( 1260): java.lang.NullPointerException: Attempt to read from null array E/AndroidRuntime( 1260): at com.android.internal.telephony.ModemBindingPolicyHandler.handleGetPreferredNetwork(ModemBindingPolicyHandler.java:287) E/AndroidRuntime( 1260): at com.android.internal.telephony.ModemBindingPolicyHandler.handleMessage(ModemBindingPolicyHandler.java:254) E/AndroidRuntime( 1260): at android.os.Handler.dispatchMessage(Handler.java:102) E/AndroidRuntime( 1260): at android.os.Looper.loop(Looper.java:135) E/AndroidRuntime( 1260): at android.app.ActivityThread.main(ActivityThread.java:5293) E/AndroidRuntime( 1260): at java.lang.reflect.Method.invoke(Native Method) E/AndroidRuntime( 1260): at java.lang.reflect.Method.invoke(Method.java:372) E/AndroidRuntime( 1260): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:904) E/AndroidRuntime( 1260): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:699)

    JIRA | 1 year ago | Frank Eular
    java.lang.NullPointerException: Attempt to read from null array

    Root Cause Analysis

    1. java.lang.NullPointerException

      Attempt to read from null array

      at com.android.internal.telephony.ModemBindingPolicyHandler.handleGetPreferredNetwork()
    2. Android
      ModemBindingPolicyHandler.handleMessage
      1. com.android.internal.telephony.ModemBindingPolicyHandler.handleGetPreferredNetwork(ModemBindingPolicyHandler.java:287)
      2. com.android.internal.telephony.ModemBindingPolicyHandler.handleMessage(ModemBindingPolicyHandler.java:254)
      2 frames
    3. Android Platform
      ActivityThread.main
      1. android.os.Handler.dispatchMessage(Handler.java:102)
      2. android.os.Looper.loop(Looper.java:135)
      3. android.app.ActivityThread.main(ActivityThread.java:5293)
      3 frames
    4. Java RT
      Method.invoke
      1. java.lang.reflect.Method.invoke(Native Method)
      2. java.lang.reflect.Method.invoke(Method.java:372)
      2 frames
    5. 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