After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 639500 - Crash when trying to open a note from a corrupted file
Crash when trying to open a note from a corrupted file
Status: RESOLVED FIXED
Product: tomboy
Classification: Applications
Component: General
unspecified
Other All
: Normal normal
: ---
Assigned To: Tomboy Maintainers
Tomboy Maintainers
Depends on:
Blocks:
 
 
Reported: 2011-01-14 08:52 UTC by Lukas Vacek
Modified: 2011-06-25 17:58 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Correct exception handling when loading corrupted note files (1.20 KB, patch)
2011-01-14 08:52 UTC, Lukas Vacek
committed Details | Review
Correct exception handling when trying to load files without read permissions (1.21 KB, patch)
2011-01-14 09:16 UTC, Lukas Vacek
committed Details | Review

Description Lukas Vacek 2011-01-14 08:52:40 UTC
Created attachment 178299 [details] [review]
Correct exception handling when loading corrupted note files

Tomboy crashes when it tries to open a damaged note file (which can happen, for example, after a power outage or kernel panic). As all note files are loaded at start-up this can lead to start-up crashes. The user is then obviously only informed that Tomboy has crashed and provided with no more information on how to access her notes.

The attached patch handles System.IO.IOException in NoteManager.LoadNotes() and provides the user with information on the problem and which note is lost.
Comment 1 Lukas Vacek 2011-01-14 09:16:17 UTC
Created attachment 178303 [details] [review]
Correct exception handling when trying to load files without read permissions

The second patch deals in the same manner with the situation when a note file has insufficient permissions. However, this case is much less likely to happen in the wild, so this patch is not really important.
Comment 2 Aaron D Borden 2011-06-25 17:56:10 UTC
Comment on attachment 178299 [details] [review]
Correct exception handling when loading corrupted note files

Looks good thanks
Comment 3 Aaron D Borden 2011-06-25 17:57:10 UTC
Comment on attachment 178303 [details] [review]
Correct exception handling when trying to load files without read permissions

Nice, thanks!
Comment 4 Aaron D Borden 2011-06-25 17:58:45 UTC
commit 5770662522219349b6c38ac8f1774d474c9e72bf
commit c9b2876607185380a39b2d93d367152184b3857b

Thanks for the patches! These will show up in tomboy 1.7.1