GNOME Bugzilla – Bug 325965
Maildir subfolders (not mail folder) have 'mark messages as read', selecting it crashes evolution
Last modified: 2013-09-13 00:49:51 UTC
Steps to reproduce: 1. Create a tree with maildir folders, with subfolders - for example ~/mail/lists/evolution 2. Configure evolution to use ~/mail/ as maildir folders, so that lists is shown as subfolder of the account 3. Right click on the folder and select 'mark messages as read' -> evolution crashes Stack trace: Other information: I think this menu item just should not be visible for subfolders which are not maildir folders. Indeed, 'Folder' menu does not allow this operation if the submenu is selected.
Hi Hile, thanks for the bug report. Can you please provide us with a stack trace? Please see http://live.gnome.org/GettingTraces for more information on how to do so. Thanks very much in advance.
Created attachment 56910 [details] Stack trace of the crash
Evolution build in your box doest seem to have debugging information. Install 'Evolution' & 'Evolution data server' rpms with debugging info and then paste stack traces of evolution.
OK, I finally ran this under gdb and found the problem myself. Interesting parts from backtrace:
+ Trace 69072
mm contents: p {struct _get_folder_msg} mm $12 = {msg = {msg = {ln = {next = 0x8102154, prev = 0x8102150}, reply_port = 0x8102150}, ops = 0xb34dc80c, seq = 1567, cancel = 0x0, ex = { id = CAMEL_EXCEPTION_SYSTEM, desc = 0x857ce18 "'Kansiota '/home/hile/private/mail/Lists' ei voida avata: se ei maildir-muotoinen hakemisto."}, priv = 0x84f3040}, uri = 0x85603a8 "maildir:/home/hile/private/mail#Lists", flags = 0, folder = 0x0, done = 0xacf03e33 <mar_got_folder>, data = 0x0 ------ This triggers a trivial bug in mark-all-read.c() function mar_got_folder(), because folder pointer is NULL and this is before checking if folder is NULL: store = folder->parent_store; Attached is a trivial patch to avoid the crash. Note that this does not fix the original problem, just prevents the crash. We really should either hide this menu entry altogether for subfolders in a maildir tree which themselves are not maildir folders. Note as well that this bug only happened for subfolders in maildir tree which themselves were not maildir folders, just part of subtree. Sorry if this information was left out in earlier reports... I.e., this bug can be fixed in userland by running following command in any problematic folder in maildir tree: mkdir new tmp cur
Created attachment 68028 [details] [review] Trivial patch to fix the crash This is a trivial fix to the original crash itself. It may not fix side-effects of the problem in calling programs, and there is no feedback for user about failed operation or anything - code had even earlier a 'FIXME' comment to do something sensible if this happens.
Set target milestone and bump priority.
Looks fine to me.
Committed to head. Needs to go to stable as well.
Fixed to stable.