-
-
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
Fix for Uncaught Exception and Crash, Lost Messages in Unsynchronized Local-Only Folders #8655
base: main
Are you sure you want to change the base?
Conversation
Fixed uncaught exception which, under a certain edge case (Issue thunderbird#7688) starring or unstarring a message explicitly in Message View after moving it offline may cause the app to crash. - Catch exception in queueSetFlag created in call to pendingSetFlag.create() - Mimics behavior of starring/unstarring a message in List View
Added verification for moving messages into other folders (in response to Issue thunderbird#823) - Currently, users can move messages into local-only folders which don't exist server-side, may end up with messages stuck in these local folders and effectively lost - When online, refresh the folder list prior to moving; prevent messages ending up in "dead" unsynced folders which do not exist server-side - When offline, provide the user with a warning saying that "ThunderBird is not connected to the Internet. Any changes you make now may not be synced properly." - Users may proceed anyways, cancel the move/copy/draft/archive/spam operation, or "don't show again" and always proceed anyways
Added verification for moving messages into other folders (in response to Issue thunderbird#823) - Currently, users can move messages into local-only folders which don't exist server-side, may end up with messages stuck in these local folders and effectively lost - When online, refresh the folder list prior to moving; prevent messages ending up in "dead" unsynced folders which do not exist server-side - When offline, provide the user with a warning saying that "ThunderBird is not connected to the Internet. Any changes you make now may not be synced properly." - Users may proceed anyways, cancel the move/copy/draft/archive/spam operation, or "don't show again" and always proceed anyways
Thank you for working on fixing these issues ❤️ Issues #7688 and #823 are somewhat related because the underlying cause is that pending commands reference server IDs (UIDs) of messages, and sometimes those aren't known to the app yet. Unfortunately, this pull request is only addressing the symptoms, not the cause. Sometimes this can be a good first step, because often this can be done much faster than changing the architecture to avoid the bug. But that is exactly what the "Cannot copy or move message that is not synchronized with the server" message already is. It avoids performing an operation that can't be performed because of missing information. Adding a much more complicated mechanism (distinguishing between online and offline) to avoid showing that message some of the time, is not the solution. We want the user to be able to perform the operation in all cases. As I mentioned before, a proper fix is quite a bit of work and requires a good understanding of the inner workings of the app. It's not a good project to get started as a new contributor. What you could do, is avoid calling |
These are our fixes to address issues #7688 and #823
Uncaught Exception, Crash: Issue #7688
Problem:
Solution:
queueSetFlag()
to avoid the crash; this is how it is handled in List View.runInBackground()
"Lost" Messages in Unsynchronized, Local-Only Folders: Issue #823
Problem:
Solution:
Authors: @dnicules @gkhourii