thunderbird / thunderbird/thunderbird-android

Crash after log out of a duplicate account and then changing a folder

Open
#6,533 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Kotlin
Stars
14k
Forks
2.8k
Avg merge
3d 3h
Merged PRs (30d)
57

Description

Checklist
  • I have used the search function to see if someone else has already submitted the same bug report.
  • I will describe the problem with as much detail as possible.
App version

6.500-SNAPSHOT

Where did you get the app from?

Other

Android version

8.1

Device model

emulator

Steps to reproduce
  1. Go to the drawer menu
  2. Go to Settings
  3. Go to "export settings"
  4. Select our account option
  5. Click export
  6. Back
  7. Click the "import settings"
  8. Select the file we exported from the previous step
  9. Click Import
  10. Enter the account password
  11. Click ok, and finally, it is successfully imported and goes back to settings
  12. Log out of the old account
  13. return to inbox
  14. select another folder from the drawer menu (for example, Sent)
Expected behavior

The folder opens correctly

Actual behavior

app crashed.

Logs

crash log:

2022-12-19 16:41:30.515 19401-19401/com.fsck.k9.debug E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.fsck.k9.debug, PID: 19401
java.lang.NullPointerException
at com.fsck.k9.activity.MessageList.configureDrawer(MessageList.kt:1325)
at com.fsck.k9.activity.MessageList.initializeFromLocalSearch(MessageList.kt:1304)
at com.fsck.k9.activity.MessageList.performSearch(MessageList.kt:633)
at com.fsck.k9.activity.MessageList.openFolder(MessageList.kt:589)
at com.fsck.k9.ui.K9Drawer.handleItemClickListener(K9Drawer.kt:347)
at com.fsck.k9.ui.K9Drawer.access$handleItemClickListener(K9Drawer.kt:67)
at com.fsck.k9.ui.K9Drawer$1.invoke(K9Drawer.kt:111)
at com.fsck.k9.ui.K9Drawer$1.invoke(K9Drawer.kt:110)
at com.mikepenz.materialdrawer.widget.MaterialDrawerSliderView$createContent$2.invoke(MaterialDrawerSliderView.kt:627)
at com.mikepenz.materialdrawer.widget.MaterialDrawerSliderView$createContent$2.invoke(MaterialDrawerSliderView.kt:603)
at com.mikepenz.fastadapter.FastAdapter$viewClickListener$1.onClick(FastAdapter.kt:119)
at com.mikepenz.fastadapter.utils.EventHookUtilKt.attachToView$lambda$0(EventHookUtil.kt:49)
at com.mikepenz.fastadapter.utils.EventHookUtilKt.$r8$lambda$UfMYnnvsh8Q2M7QQxF9GnPD3K-Y(Unknown Source:0)
at com.mikepenz.fastadapter.utils.EventHookUtilKt$$ExternalSyntheticLambda0.onClick(Unknown Source:4)
at android.view.View.performClick(View.java:6294)
at android.view.View$PerformClick.run(View.java:24770)
at android.os.Handler.handleCallback(Handler.java:790)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6494)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in app/src/main/java/com/fsck/k9/activity/MessageList.kt at lines 1325, 1304, 633, and 589, following the stack trace through folder selection after logout. Reproduce the export/import, logout, and folder-change sequence on the reported Android emulator setup. Done means selecting another folder opens it without a crash.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, kotlin
Domain
mobile-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.