Skip to content
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

Crash: NPE in AccountSetupIncoming.getSelectedSecurity() #1877

Closed
cketti opened this issue Dec 28, 2016 · 2 comments
Closed

Crash: NPE in AccountSetupIncoming.getSelectedSecurity() #1877

cketti opened this issue Dec 28, 2016 · 2 comments
Labels
type: bug Something is causing incorrect behavior or errors

Comments

@cketti
Copy link
Member

cketti commented Dec 28, 2016

Via Play Developer Console
App version: 5.200

java.lang.RuntimeException: Unable to start activity ComponentInfo{com.fsck.k9/com.fsck.k9.activity.setup.AccountSetupIncoming}: java.lang.NullPointerException: Attempt to read from field 'com.fsck.k9.mail.ConnectionSecurity com.fsck.k9.activity.setup.ConnectionSecurityHolder.connectionSecurity' on a null object reference
	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2416)
	at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2476)
	at android.app.ActivityThread.-wrap11(ActivityThread.java)
	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1344)
	at android.os.Handler.dispatchMessage(Handler.java:102)
	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)
Caused by: java.lang.NullPointerException: Attempt to read from field 'com.fsck.k9.mail.ConnectionSecurity com.fsck.k9.activity.setup.ConnectionSecurityHolder.connectionSecurity' on a null object reference
	at com.fsck.k9.activity.setup.AccountSetupIncoming.getSelectedSecurity(AccountSetupIncoming.java:645)
	at com.fsck.k9.activity.setup.AccountSetupIncoming.validateFields(AccountSetupIncoming.java:414)
	at com.fsck.k9.activity.setup.AccountSetupIncoming.onPostCreate(AccountSetupIncoming.java:378)
	at android.app.Instrumentation.callActivityOnPostCreate(Instrumentation.java:1188)
	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2398)
	... 9 more
@philipwhiuk
Copy link
Contributor

philipwhiuk commented Dec 28, 2016

Somehow there's no selectedItem ( mSecurityTypeView.getSelectedItem() returns a null ConnectionSecurityHolder). Possibly the right approach is just to set a sane default.

@philipwhiuk philipwhiuk added the type: bug Something is causing incorrect behavior or errors label Dec 29, 2016
cketti added a commit that referenced this issue Jan 8, 2017
@wmontwe
Copy link
Member

wmontwe commented Feb 17, 2025

This is outdated.

@wmontwe wmontwe closed this as completed Feb 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something is causing incorrect behavior or errors
Projects
None yet
Development

No branches or pull requests

3 participants