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

java.lang.NullPointerException: Attempt to invoke virtual method 'android.content.Context android.view.View.getContext()' on a null object reference #23

Open
tianxiaogu opened this Issue Nov 1, 2017 · 0 comments

Comments

Projects
None yet
2 participants
@tianxiaogu

tianxiaogu commented Nov 1, 2017

Founded on Android Studio Emulator and can be reproduced on Nexus 5 (6.0.1)

Steps:

  1. Install v1.4 from FDroid
  2. Launch app.
  3. Enable Automatically refresh
  4. Click INFO
  5. Click GO TO LIBRENEWS
  6. Click BACK button
  7. Disable Automatically refresh
// CRASH: app.librenews.io.librenews (pid 3284) (elapsed nanos: 702931492114)
// Short Msg: java.lang.NullPointerException
// Long Msg: java.lang.NullPointerException: Attempt to invoke virtual method 'android.content.Context android.view.View.getContext()' on a null object reference
// Build Label: Android/sdk_google_phone_x86/generic_x86:6.0/MASTER/4088240:userdebug/test-keys
// Build Changelist: 4088240
// Build Time: 1497047463000
// java.lang.NullPointerException: Attempt to invoke virtual method 'android.content.Context android.view.View.getContext()' on a null object reference
// 	at app.librenews.io.librenews.views.SettingsActivityFragment.onSharedPreferenceChanged(SettingsActivityFragment.java:26)
// 	at android.app.SharedPreferencesImpl$EditorImpl.notifyListeners(SharedPreferencesImpl.java:479)
// 	at android.app.SharedPreferencesImpl$EditorImpl.apply(SharedPreferencesImpl.java:387)
// 	at android.preference.Preference.tryCommit(Preference.java:1415)
// 	at android.preference.Preference.persistBoolean(Preference.java:1681)
// 	at android.preference.TwoStatePreference.setChecked(TwoStatePreference.java:81)
// 	at android.preference.TwoStatePreference.onClick(TwoStatePreference.java:66)
// 	at android.preference.Preference.performClick(Preference.java:994)
// 	at android.preference.PreferenceScreen.onItemClick(PreferenceScreen.java:214)
// 	at android.widget.AdapterView.performItemClick(AdapterView.java:310)
// 	at android.widget.AbsListView.performItemClick(AbsListView.java:1145)
// 	at android.widget.AbsListView$PerformClick.run(AbsListView.java:3042)
// 	at android.widget.AbsListView$3.run(AbsListView.java:3879)
// 	at android.os.Handler.handleCallback(Handler.java:739)
// 	at android.os.Handler.dispatchMessage(Handler.java:95)
// 	at android.os.Looper.loop(Looper.java:148)
// 	at android.app.ActivityThread.main(ActivityThread.java:5417)
// 	at java.lang.reflect.Method.invoke(Native Method)
// 	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
// 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
// 

@milesmcc milesmcc self-assigned this Nov 2, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment