Write a reply in email thread that has multiple replys, turn phone in landscape mode and all you wrote disappears or K9 crasches
Checklist
- [x] I have used the search function to see if someone else has already submitted the same bug report.
- [x] I will describe the problem with as much detail as possible.
App
Thunderbird for Android
App version
20.1
Where did you get the app from?
F-Droid
Android version
Android 16
Device model
Samsung Galaxy Flip 6
Steps to reproduce
- Press reply to email
- Start writing
- If you now turn the phone to landscape mode all you wrote disappears and you are back to the original email
- It's also possible that K9 crashes or asks you to clear the app cache
- It happens only when there are multiple replys in the email, like when you email to a support get an answer, reply to it get an answer reply again....
Expected behavior
When turning phone to landscape mode, I thought I could continue to write my message and when turning back to horizontal, same thing.
Actual behavior
This bug has been present I K9 mail as long I remember. It's not affected when normally replying to a email, but when you continue the email thread. Fot example, I had to contact a product support, wrote a email and sended it. Got a reply, and replyed back by pressing the reply button, wrote my message and sended it. Got again a reply to that message, pressed the reply button and wrote my message. Now before sending the email, I turned the phone to landscape mode and back up horizontal. All I wrote disappeared, and I was back in the original message. This is easy to reproduce, it happens every time. Notice, replying to the first incoming email does not do that behavior. I'm not sure if if it needs be a replay to a replay or more, but it's a bug. When you have written a long reply and mistakenly turn your phone to landscape mode, everything disappears and can not be find anywhere
Logs
No response
I can reproduce a very similar issue on a Xiaomi Redmi Note 14 5G running Android 16 / HyperOS 3.0.301.0.
In my case, it does NOT require a long email thread or multiple replies. It also happens when replying directly to a single received email.
Steps to reproduce:
- Open a received email.
- Tap Reply and start writing.
- Rotate the phone from portrait to landscape. The compose screen remains open and the text is still there.
- Rotate the phone back from landscape to portrait.
- Thunderbird leaves the compose screen and returns to the original email.
- The written reply is lost.
I reproduced this deliberately after having it happen accidentally several times while writing longer replies.
Device: Xiaomi Redmi Note 14 5G
OS: Android 16 / HyperOS 3.0.301.0
Thunderbird: 20.0
Additional reproduction case:
I can also reproduce the issue when starting the reply in landscape orientation.
Steps:
- Open a received email while the phone is in landscape orientation.
- Tap Reply and start writing.
- Rotate the phone to portrait.
- Thunderbird leaves the compose screen and returns to the original email.
- The written reply is lost.
So, in this case, it is not necessary to rotate twice or return to the original orientation. A single orientation change while composing is enough to trigger the issue.
During some of my tests, Thunderbird also crashed completely and HyperOS showed the "Thunderbird keeps stopping" crash dialog. However, I have not been able to reproduce that crash consistently, so I am not sure yet if it is triggered by exactly the same sequence.
Device: Xiaomi Redmi Note 14 5G
Android: 16
OS: HyperOS 3.0.301.0
Thunderbird: 20.0
I have been able to replicate the issue.
TB Android v24.0b1 & v23.0 on Android 16
The cause seems specifically related to long email addresses. In my case the address wraps over more than one line. It's not limited to the reply-to field or screen rotation, though screen rotation is an easy way to observe the crash. I do not observe the issue when the address is short, irrespective of the field its in.
Steps to reproduce
- Compose a new email
- Paste this email address in the To: field. [email protected]
- Tap the subject field to allow the email address to tokenize.
- Rotate screen horizontal, then vertical.
- Observe crash / compose screen closes.
- See log of this below.
Alternative way to create the same crash.
- Receive an email with a similar long address in the Reply-To field: In my case I have the DVLA address above.
- Open the email
- Select "Edit as new message"
- Press back and discard the draft message
- Select "Edit as new message" again.
- Observe crash and force close.
I am also able to recreate the crash method @rmamail highlights by pressing reply, then rotating screen. In each case the same crash error is recorded in the debug log.
FATAL EXCEPTION: main Process: net.thunderbird.android.beta, PID: 9490 java.lang.IndexOutOfBoundsException: 2, 0
--------- beginning of crash 09-10 14:06:41.282 9490 9490 E AndroidRuntime: FATAL EXCEPTION: main 09-10 14:06:41.282 9490 9490 E AndroidRuntime: Process: net.thunderbird.android.beta, PID: 9490 09-10 14:06:41.282 9490 9490 E AndroidRuntime: java.lang.IndexOutOfBoundsException: 2, 0 09-10 14:06:41.282 9490 9490 E AndroidRuntime: at android.text.PackedIntVector.getValue(PackedIntVector.java:76) 09-10 14:06:41.282 9490 9490 E AndroidRuntime: at android.text.DynamicLayout.getLineStart(DynamicLayout.java:1172) 09-10 14:06:41.282 9490 9490 E AndroidRuntime: at android.text.Layout.drawText(Layout.java:793) 09-10 14:06:41.282 9490 9490 E AndroidRuntime: at android.widget.Editor.drawHardwareAcceleratedInner(Editor.java:2428) 09-10 14:06:41.282 9490 9490 E AndroidRuntime: at android.widget.Editor.drawHardwareAccelerated(Editor.java:2341) 09-10 14:06:41.282 9490 9490 E AndroidRuntime: at android.widget.Editor.drawLayout(Editor.java:2272) 09-10 14:06:41.282 9490 9490 E AndroidRuntime: at android.widget.Editor.onDraw(Editor.java:2263) 09-10 14:06:41.282 9490 9490 E AndroidRuntime: at android.widget.TextView.onDraw(TextView.java:9504) 09-10 14:06:41.282 9490 9490 E AndroidRuntime: at android.view.View.draw(View.java:25658) 09-10 14:06:41.282 9490 9490 E AndroidRuntime: at android.view.View.updateDisplayListIfDirty(View.java:24444) 09-10 14:06:41.282 9490 9490 E AndroidRuntime: at android.view.View.draw(View.java:25366) 09-10 14:06:41.282 9490 9490 E AndroidRuntime: at android.view.ViewGroup.drawChild(ViewGroup.java:4701) 09-10 14:06:41.282 9490 9490 E AndroidRuntime: at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4442) 09-10 14:06:41.282 9490 9490 E AndroidRuntime: at android.view.View.updateDisplayListIfDirty(View.java:24435) 09-10 14:06:41.282 9490 9490 E AndroidRuntime: at android.view.View.draw(View.java:25366) 09-10 14:06:41.282 9490 9490 E AndroidRuntime: at android.view.ViewGroup.drawChild(ViewGroup.java:4701) 09-10 14:06:41.282 9490 9490 E AndroidRuntime: at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4442) 09-10 14:06:41.282 9490 9490 E AndroidRuntime: at android.view.View.draw(View.java:25661) 09-10 14:06:41.282 9490 9490 E AndroidRuntime: at android.view.View.updateDisplayListIfDirty(View.java:24444) 09-10 14:06:41.282 9490 9490 E AndroidRuntime: at android.view.View.draw(View.java:25366) 09-10 14:06:41.282 9490 9490 E AndroidRuntime: at android.view.ViewGroup.drawChild(ViewGroup.java:4701) 09-10 14:06:41.282 9490 9490 E AndroidRuntime: at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4442) 09-10 14:06:41.282 9490 9490 E AndroidRuntime: at android.view.View.updateDisplayListIfDirty(View.java:24435) 09-10 14:06:41.282 9490 9490 E AndroidRuntime: at android.view.View.draw(View.java:25366) 09-10 14:06:41.282 9490 9490 E AndroidRuntime: at android.view.ViewGroup.drawChild(ViewGroup.java:4701) 09-10 14:06:41.282 9490 9490 E AndroidRuntime: at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4442) 09-10 14:06:41.282 9490 9490 E AndroidRuntime: at android.view.View.draw(View.java:25661) 09-10 14:06:41.282 9490 9490 E AndroidRuntime: at android.widget.ScrollView.draw(ScrollView.java:2078) 09-10 14:06:41.282 9490 9490 E AndroidRuntime: at android.view.View.updateDisplayListIfDirty(View.java:24444) 09-10 14:06:41.282 9490 9490 E AndroidRuntime: at android.view.View.draw(View.java:25366) 09-10 14:06:41.282 9490 9490 E AndroidRuntime: at android.view.ViewGroup.drawChild(ViewGroup.java:4701) 09-10 14:06:41.282 9490 9490 E AndroidRuntime: at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4442) 09-10 14:06:41.282 9490 9490 E AndroidRuntime: at android.view.View.updateDisplayListIfDirty(View.java:24435) 09-10 14:06:41.282 9490 9490 E AndroidRuntime: at android.view.View.draw(View.java:25366) 09-10 14:06:41.282 9490 9490 E AndroidRuntime: at android.view.ViewGroup.drawChild(ViewGroup.java:4701) 09-10 14:06:41.282 9490 9490 E AndroidRuntime: at androidx.coordinatorlayout.widget.CoordinatorLayout.drawChild(CoordinatorLayout.java:1319) 09-10 14:06:41.282 9490 9490 E AndroidRuntime: at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4442) 09-10 14:06:41.282 9490 9490 E AndroidRuntime: at android.view.View.updateDisplayListIfDirty(View.java:24435) 09-10 14:06:41.282 9490 9490 E AndroidRuntime: at android.view.View.draw(View.java:25366) 09-10 14:06:41.282 9490 9490 E AndroidRuntime: at android.view.ViewGroup.drawChild(ViewGroup.java:4701) 09-10 14:06:41.282 9490 9490 E AndroidRuntime: at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4442) 09-10 14:06:41.282 9490 9490 E AndroidRuntime: at android.view.View.updateDisplayListIfDirty(View.java:24435) 09-10 14:06:41.282 9490 9490 E AndroidRuntime: at android.view.View.draw(View.java:25366) 09-10 14:06:41.282 9490 9490 E AndroidRuntime: at android.view.ViewGroup.drawChild(ViewGroup.java:4701) 09-10 14:06:41.282 9490 9490 E AndroidRuntime: at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4442) 09-10 14:06:41.282 9490 9490 E AndroidRuntime: at android.view.View.updateDisplayListIfDirty(View.java:24435) 09-10 14:06:41.282 9490 9490 E AndroidRuntime: at android.view.View.draw(View.java:25366) 09-10 14:06:41.282 9490 9490 E AndroidRuntime: at android.view.ViewGroup.drawChild(ViewGroup.java:4701) 09-10 14:06:41.282 9490 9490 E AndroidRuntime: at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4442) 09-10 14:06:41.282 9490 9490 E AndroidRuntime: at android.view.View.updateDisplayListIfDirty(View.java:24435) 09-10 14:06:41.282 9490 9490 E AndroidRuntime: at android.view.View.draw(View.java:25366) 09-10 14:06:41.282 9490 9490 E AndroidRuntime: at android.view.ViewGroup.drawChild(ViewGroup.java:4701) 09-10 14:06:41.282 9490 9490 E AndroidRuntime: at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4442) 09-10 14:06:41.282 9490 9490 E AndroidRuntime: at android.view.View.updateDisplayListIfDirty(View.java:24435) 09-10 14:06:41.282 9490 9490 E AndroidRuntime: at android.view.View.draw(View.java:25366) 09-10 14:06:41.282 9490 9490 E AndroidRuntime: at android.view.ViewGroup.drawChild(ViewGroup.java:4701) 09-10 14:06:41.282 9490 9490 E AndroidRuntime: at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4442) 09-10 14:06:41.282 9490 9490 E AndroidRuntime: at android.view.View.draw(View.java:25661) 09-10 14:06:41.282 9490 9490 E AndroidRuntime: at com.android.internal.policy.DecorView.draw(DecorView.java:904) 09-10 14:06:41.282 9490 9490 E AndroidRuntime: at android.view.View.updateDisplayListIfDirty(View.java:24444) 09-10 14:06:41.282 9490 9490 E AndroidRuntime: at android.view.ThreadedRenderer.updateViewTreeDisplayList(ThreadedRenderer.java:718) 09-10 14:06:41.282 9490 9490 E AndroidRuntime: at android.view.ThreadedRenderer.updateRootDisplayList(ThreadedRenderer.java:724) 09-10 14:06:41.282 9490 9490 E AndroidRuntime: at android.view.ThreadedRenderer.draw(ThreadedRenderer.java:834) 09-10 14:06:41.282 9490 9490 E AndroidRuntime: at android.view.ViewRootImpl.draw(ViewRootImpl.java:6684) 09-10 14:06:41.282 9490 9490 E AndroidRuntime: at android.view.ViewRootImpl.performDraw(ViewRootImpl.java:6294) 09-10 14:06:41.282 9490 9490 E AndroidRuntime: at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:5109) 09-10 14:06:41.283 9490 9490 E AndroidRuntime: at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:3519) 09-10 14:06:41.283 9490 9490 E AndroidRuntime: at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:11957) 09-10 14:06:41.283 9490 9490 E AndroidRuntime: at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1852) 09-10 14:06:41.283 9490 9490 E AndroidRuntime: at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1861) 09-10 14:06:41.283 9490 9490 E AndroidRuntime: at android.view.Choreographer.doCallbacks(Choreographer.java:1373) 09-10 14:06:41.283 9490 9490 E AndroidRuntime: at android.view.Choreographer.doFrame(Choreographer.java:1230) 09-10 14:06:41.283 9490 9490 E AndroidRuntime: at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:1835) 09-10 14:06:41.283 9490 9490 E AndroidRuntime: at android.os.Handler.handleCallback(Handler.java:1027) 09-10 14:06:41.283 9490 9490 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:108) 09-10 14:06:41.283 9490 9490 E AndroidRuntime: at android.os.Looper.loopOnce(Looper.java:298) 09-10 14:06:41.283 9490 9490 E AndroidRuntime: at android.os.Looper.loop(Looper.java:408) 09-10 14:06:41.283 9490 9490 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:9964) 09-10 14:06:41.283 9490 9490 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method) 09-10 14:06:41.283 9490 9490 E AndroidRuntime: at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:613) 09-10 14:06:41.283 9490 9490 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1074) --------- beginning of system
Could this crash be triaged?
I've been unable to reproduce this crash in K-9 version 23.1 from F-Droid on a Moto Razr, Android 16. Debug builds fresh off main for both Thunderbird and K-9 (version 25) also seem to work seamlessly. We had some issues in the past with this, but I believe we've had updates to address it, storing the contents of the message, rather than trying to preserve them in memory. Has anyone been able to reproduce this on a more recent build?
I've also tested on daily 25.0a1 (downloaded today) and 24.0b2 and reliably reproduce the crash. Let me know what additional information is needed.
This is one of the top crashes. For 23.1 it appears that the #2, #3, and #4 top crashes have the same crash signatures and similar stack traces.
Hi all,
I was able to reproduce the issue by executing the "Alternative way" that @platform34 reported. Unfortunately, I wasn't able to reproduce it in other ways.
I'm preparing a fix for that issue targeting that scenario, and a PR will be submitted soon. I hope that fixes the first scenario as well.
I think this report on the K9 forum is also an example of the same issue. https://forum.k9mail.app/t/lost-draft-message/14602
I am using version 24.0. I was replying to a message; I had written most of the outgoing message when I rotated my device for a second. The screen flipped to horizontal, and when it returned to vertical, the original message was on the screen like I had never hit Reply. I checked the Drafts folder, but it wasn’t in there. I had to start composing all over again.
I think the user is experiencing the reply composition window crashing and closing as reported on this bug report.
18. I think this report on the K9 forum is also an example of the same issue. https://forum.k9mail.app/t/lost-draft-message/14602
I am using version 24.0. I was replying to a message; I had written most of the outgoing message when I rotated my device for a second. The screen flipped to horizontal, and when it returned to vertical, the original message was on the screen like I had never hit Reply. I checked the Drafts folder, but it wasn’t in there. I had to start composing all over again.I think the user is experiencing the reply composition window crashing and closing as reported on this bug report.
Thanks, that was useful. I was also able to reproduce the issue this way. I'll create a PR with the fix.