-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
[Regression] Crash on screen rotation when composing email #8606
Comments
Did not happen on any previously installed versions |
No trace of the email in the drafts folder no matter how long I have been composing it. |
This looks like https://play.google.com/console/u/0/developers/8696262544613553264/app/4975953188383066626/vitals/crashes/2a699b05ac02e9bc21e271535ff9e2a7/details?days=28&versionCode=5&isUserPerceived=true , thank you for providing STR. @cketti could you take a look? |
I'm not able to reproduce this crash with the given information. @xandro0777: Can you provide more details? What email address do you enter in step 2? Where's the cursor when you rotate the device? Can you record a video of such a crash? |
On November 26, 2024 12:35:07 PM UTC, cketti ***@***.***> wrote:
I'm not able to reproduce this crash with the given information.
@xandro0777: Can you provide more details? What email address do you enter in step 2?
Many Emails chosen from popup after entering two or more chars. However, this wont be the most important detail, the crash happened also after composing subject and a longer text, with or without images. I gave above description as a minimal description that caused trouble but in real life it always happened after a while when composing the body
Somewhere in the forums I read a similar report, also with stacktrace and it was also Android 13. Maybe something specific about Android 13 but it did work reliably for a very long time.
Where's the cursor when you rotate the device? Can you record a video of such a crash?
Probably irrelevant but mostly at the last line of the email body I was just composing.
|
This could be related
https://forum.k9mail.app/t/crash-when-rotating-device-while-composing/10666
|
From the data we have via Google Play this crash does not seem to be limited to Android 13. However, it isn't reported nearly enough for this to happen on every device rotation when composing a message (which explains my trouble reproducing the crash). In order to fix the crash, we need to be able to reproduce it on one of our test devices or an emulator. So someone needs to provide instructions on how to reliably reproduce this crash. Please don't make any assumptions about what information is or isn't relevant. Include as much detail as possible. A video could be useful because it shows the user interaction as it happened without omitting any seemingly unimportant details. |
Just tried: reply to this GitHub message, rotate left 90°, rotate back 90°.
K9Mail didn't crash but the email to be composed disappeared.. so entering the address apparently isn't the culprit.
Description can't get simpler. Tried Gboard and OpenBoard both with similar results but maybe the keyboard used may be important?
Also there might be some underreporting because sometimes the App completely crashes, sometimes only the composed message disappears.
|
Trying the previously mentioned reply and rotate a few times I got these results: once App crashed immediately after the device was rotated 90° counterclockwise - the screen was not rotated at all.
A few times the App didn't crash but after the device was rotated back and forth 90° (and screen and keyboard rotated) the draft was gone.
|
To be more precise, sometimes I get a popup saying K9Mail has stopped .. wait or close but if that happens whatever I do the App disappears. It seems to be unresponsive for a while until this popup appears but once the popup appears the app disappears no matter what I do.
Tried to reproduce many more times. Sometimes it just works as expected a few times in a row, sometimes it crashes a few times in a row and sometimes the draft simply disappears.
Absolutely no idea which circumstances could trigger the difference
…On November 26, 2024 1:04:11 PM UTC, cketti ***@***.***> wrote:
From the data we have via Google Play this crash does not seem to be limited to Android 13. However, it isn't reported nearly enough for this to happen on every device rotation when composing a message (which explains my trouble reproducing the crash).
In order to fix the crash, we need to be able to reproduce it on one of our test devices or an emulator. So someone needs to provide instructions on how to reliably reproduce this crash. Please don't make any assumptions about what information is or isn't relevant. Include as much detail as possible. A video could be useful because it shows the user interaction as it happened without omitting any seemingly unimportant details.
--
Reply to this email directly or view it on GitHub:
#8606 (comment)
You are receiving this because you were mentioned.
Message ID: ***@***.***>
|
Would sending more stack traces help?
|
More stack traces are unlikely to help. The stack trace we have shows that none of our code is directly involved in the crash. It's most likely a bug in Android that Thunderbird for Android is triggering. However, without knowing what triggers the bug we don't know how to work around it. Similarly, without knowing how to trigger the bug, Google will have a hard time fixing the bug in Android. |
Can I do anything with adb?
The forum entry I mentioned previously says something about v 8.0b3 iirc. What did change there on the k9 side? Or probably a little earlier..
It worked rock solid for several years.
|
There has been more than a couple of Android bugs relating to screen rotation. The last one in Android 11 was triggered only in presence of keyboard interaction and I suspect keyboard interaction in this case too
|
Previously mentioned keyboard interaction hypothesis checked:
1. Go to Github message
2. Tap reply
3. Pop down keyboard
4. Rotate
5. Crash
I guess yet another nice theory proven wrong?
…On November 27, 2024 2:31:39 PM UTC, cketti ***@***.***> wrote:
More stack traces are unlikely to help. The stack trace we have shows that none of our code is directly involved in the crash. It's most likely a bug in Android that Thunderbird for Android is triggering. However, without knowing what triggers the bug we don't know how to work around it. Similarly, without knowing how to trigger the bug, Google will have a hard time fixing the bug in Android.
--
Reply to this email directly or view it on GitHub:
#8606 (comment)
You are receiving this because you were mentioned.
Message ID: ***@***.***>
|
I'm finally able to reproduce this error. It depends on the length of the email address and the available display space. Steps to reproduce:
I haven't figured out yet what exactly is causing the crash. It might be a combination of us doing uncommon things to render the email address views and a bug in Android. |
It also (sometimes) happens when I reply to this GitHub message, in that case the To field displays "+1". Sometimes the App doesn't crash completely but the message to be composed disappears.
|
I came to report this same bug. I'm running on a Galaxy S23 Ultra, Android 14. The same bug exists in K-9 Mail, but now I've upgraded to Thunderbird. It fails on all compose actions: new mail, Reply All, edit a Draft. It either goes back to the Inbox, or crashes completely, when you rotate from portrait to landscape and back. However, this only happens if your recipient list has more than 1 address. This is likely why the bug has existed for so long and doesn't seem to be repeatable. Now you have the missing piece of info! (Oh, I see someone says it also fails if a single recipient address is long.) |
I can confirm this issue on my device:
TL;DRMessage draft is discarded when going to landscape and back to portrait, but currently only for one specific mail in inbox. DescriptionNoticed this behaviour just now and I'm pretty sure not having seen this just months prior. Why I'm sure about this? Since I'm rather pedantic about newlines in emails, when I write on my phone, I tilt it into landscape mode to break all lines to near equal lengths and then send it. Today I had to answer a mail (just one recipient) and this issue happened to me twice. The first time I believed I had accidentally pressed the back button and discarded my draft. Second time I was extra cautious and after polishing my text I tilted my phone back to portrait mode and was immediatelly brought back to the email I was about to answer to. It seemed as if the intent (not sure if that's the right term, not a mobile dev) for answering to the message was simply closed, no toast message about a discarded message draft as normally. No saved draft in the drafts folder. I'm using Thunderbird for roughly half a year now and noticed this just now. I'm definetely sure not having noticed this behaviour with K9Mail before, but I'm unable to narrow it down to a specific update or change of Thunderbird in the past (if it's at all a regression in Thunderbird), as I can't recall when was the last time that I typed a somewhat longer text on my phone. However, it only happens with one specific email in my inbox. I have multiple accounts configured in Thunderbird and it doesn't matter whether I open it from that account's inbox or from within the combined inbox. Drafting always breaks on that particular mail when going to landscape and back to portrait. Plus, it doesn't matter if the cursor is in the message or address/subject fields, end result remains. Have yet to figure out what's so special about that one email. |
While searching for other emails which trigger the aforementioned behaviour (of which I found two more), I noticed another inconsistency, which might be related to this – or not 🤷🏻♂️ Normally, while replying to an email and clicking the back button, you get a toast message saying "message discarded". Then, with some emails (I haven't figured out yet what's special about them), I get an extra modal dialog asking whether I am sure to discard my draft. And then again, yet on some other mails, I get a toast message when hitting back while in portrait mode but get the extra modal when going to landscape and then back into portrait. It's as if some internal state change is triggered when transitioning between screen orientations that causes this erratic notification/confirmation behaviour. Perhaps on that special set of emails, Thunderbird tries to show the user a modal confirmation dialog when rotating the screen for whatever reason, but it can't, and so it instead bails out with closing the whole intent? Just a wild guess… |
If it can't be fixed quickly - please implement "save-draft-before-rotation", periodic draft saving or something like that.
Lost already a few thousands of lines of freshly written text without trace.
|
My previous comment was wrong. It definitely seems to be triggered by the length of the email address. My testing shows 22 characters is OK, 23 or more fail. This is including the entire address: recipient name, "@" symbol, and full domain name. I'm using a Galaxy S23 Ultra with Android 14. I definitely had this error using the latest version of K9 before I switched to TB a week or so ago. |
We already have reliable steps to reproduce this crash (see #8606 (comment)). Please don't add more comments trying to speculate what is causing this. It's not helping, but only adding noise. However, if you're a developer and know how to track down what exactly is causing the crash and can figure out how it can be avoided, please feel free to investigate this issue. |
Checklist
App
Thunderbird for Android
App version
8.1
Where did you get the app from?
F-Droid
Android version
13
Device model
Realme
Steps to reproduce
Sometimes, instead of crashing the draft disappears and the App returns to unified mailbox
Expected behavior
Don't crash
Actual behavior
Crash or composed email lost without trace
Logs
No response
The text was updated successfully, but these errors were encountered: