java.lang.NullPointerException: Attempt to invoke virtual method 'boolean android.preference.CheckBoxPreference.isChecked()' on a null object reference

GitHub | hssm | 4 months ago
  1. 0

    GitHub comment 4422#252122513

    GitHub | 4 months ago | hssm
    java.lang.NullPointerException: Attempt to invoke virtual method 'boolean android.preference.CheckBoxPreference.isChecked()' on a null object reference
  2. 0
    The resource was accessed after it was dismissed.
  3. 0
    The parsed JSON does not contains the requested field.
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0
    Initialize the variable before calling a method on it.
  6. 0
    Use 'dialog' to access views from custom_layout layout.

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.NullPointerException

      Attempt to invoke virtual method 'boolean android.preference.CheckBoxPreference.isChecked()' on a null object reference

      at com.ichi2.anki.Preferences.updatePreference()
    2. com.ichi2.anki
      Preferences$SettingsFragment.onSharedPreferenceChanged
      1. com.ichi2.anki.Preferences.updatePreference(Preferences.java:470)
      2. com.ichi2.anki.Preferences.access$300(Preferences.java:90)
      3. com.ichi2.anki.Preferences$SettingsFragment.onSharedPreferenceChanged(Preferences.java:812)
      3 frames
    3. Android Platform
      PreferenceFragment.addPreferencesFromResource
      1. android.app.SharedPreferencesImpl$EditorImpl.notifyListeners(SharedPreferencesImpl.java:479)
      2. android.app.SharedPreferencesImpl$EditorImpl.apply(SharedPreferencesImpl.java:387)
      3. android.preference.PreferenceManager.setNoCommit(PreferenceManager.java:659)
      4. android.preference.PreferenceManager.inflateFromResource(PreferenceManager.java:284)
      5. android.preference.PreferenceFragment.addPreferencesFromResource(PreferenceFragment.java:326)
      5 frames
    4. com.ichi2.anki
      Preferences$SettingsFragment.onCreate
      1. com.ichi2.anki.Preferences.initSubscreen(Preferences.java:308)
      2. com.ichi2.anki.Preferences.access$100(Preferences.java:90)
      3. com.ichi2.anki.Preferences$SettingsFragment.onCreate(Preferences.java:788)
      3 frames
    5. Android Platform
      ActivityThread.main
      1. android.app.Fragment.performCreate(Fragment.java:2335)
      2. android.app.FragmentManagerImpl.moveToState(FragmentManager.java:949)
      3. android.app.BackStackRecord.setLastIn(BackStackRecord.java:857)
      4. android.app.BackStackRecord.calculateFragments(BackStackRecord.java:897)
      5. android.app.BackStackRecord.run(BackStackRecord.java:727)
      6. android.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1578)
      7. android.app.FragmentManagerImpl$1.run(FragmentManager.java:483)
      8. android.os.Handler.handleCallback(Handler.java:751)
      9. android.os.Handler.dispatchMessage(Handler.java:95)
      10. android.os.Looper.loop(Looper.java:154)
      11. android.app.ActivityThread.main(ActivityThread.java:6077)
      11 frames
    6. Java RT
      Method.invoke
      1. java.lang.reflect.Method.invoke(Native Method)
      1 frame
    7. Android
      ZygoteInit.main
      1. com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:865)
      2. com.android.internal.os.ZygoteInit.main(ZygoteInit.java:755)
      2 frames