Skip to content

Crash when opening a thread - IndexOutOfBoundsException #9470

@krzysdz

Description

@krzysdz

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

Thunderbird for Android

App version

12.0b1

Where did you get the app from?

Other

Android version

13 (xiaomi.eu 14.0.3.0.TJUMIXM)

Device model

Xiaomi POCO X3 Pro (global)

Steps to reproduce

  1. Make sure that "Threaded view" in "General settings" -> "Display" is enabled
  2. Click on a message thread in any folder in any account (doesn't matter if it's a regular or "Unified" account)

Expected behavior

A message list with messages from the selected thread opens.

Actual behavior

App crashes on folderId = search.folderIds[0], because folderIds is empty (see log below).

Logs

[2025-07-18 13:47:05.570 Uid(value=10012):21172:21172 E/AndroidRuntime]
FATAL EXCEPTION: main
Process: net.thunderbird.android.beta, PID: 21172
java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
	at java.util.ArrayList.get(ArrayList.java:437)
	at com.fsck.k9.activity.MessageList.configureDrawer(MessageList.kt:1508)
	at com.fsck.k9.activity.MessageList.initializeFromLocalSearch(MessageList.kt:1472)
	at com.fsck.k9.activity.MessageList.showThread(MessageList.kt:1259)
	at com.fsck.k9.ui.messagelist.MessageListFragment.onMessageClicked(MessageListFragment.kt:664)
	at com.fsck.k9.ui.messagelist.MessageListAdapter.messageClickedListener$lambda$12(MessageListAdapter.kt:196)
	at com.fsck.k9.ui.messagelist.MessageListAdapter.$r8$lambda$XacPqseepY5pvvIbl17RaYQDtNw(MessageListAdapter.kt:0)
	at com.fsck.k9.ui.messagelist.MessageListAdapter$$ExternalSyntheticLambda0.onClick(R8$$SyntheticClass:0)
	at android.view.View.performClick(Unknown Source:17)
	at android.view.View.performClickInternal(Unknown Source:3)
	at android.view.View.-$$Nest$mperformClickInternal(Unknown Source:0)
	at android.view.View$PerformClick.run(Unknown Source:8)
	at android.os.Handler.handleCallback(Unknown Source:2)
	at android.os.Handler.dispatchMessage(Unknown Source:4)
	at android.os.Looper.loopOnce(Unknown Source:182)
	at android.os.Looper.loop(Unknown Source:82)
	at android.app.ActivityThread.main(Unknown Source:123)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(Unknown Source:11)
	at com.android.internal.os.ZygoteInit.main(Unknown Source:312)

Metadata

Metadata

Assignees

Labels

type: crashIssues that involve fixing a crash or ANR

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions