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 325965 - Maildir subfolders (not mail folder) have 'mark messages as read', selecting it crashes evolution
Maildir subfolders (not mail folder) have 'mark messages as read', selecting ...
Status: RESOLVED FIXED
Product: evolution
Classification: Applications
Component: Mailer
2.8.x (obsolete)
Other All
: Normal normal
: ---
Assigned To: evolution-mail-maintainers
Evolution QA team
Depends on:
Blocks:
 
 
Reported: 2006-01-06 10:08 UTC by Ilkka Tuohela
Modified: 2013-09-13 00:49 UTC
See Also:
GNOME target: ---
GNOME version: 2.15/2.16


Attachments
Stack trace of the crash (4.41 KB, text/plain)
2006-01-07 09:54 UTC, Ilkka Tuohela
  Details
Trivial patch to fix the crash (910 bytes, patch)
2006-06-26 13:11 UTC, Ilkka Tuohela
committed Details | Review

Description Ilkka Tuohela 2006-01-06 10:08:27 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.
Comment 1 André Klapper 2006-01-06 12:27:14 UTC
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.
Comment 2 Ilkka Tuohela 2006-01-07 09:54:32 UTC
Created attachment 56910 [details]
Stack trace of the crash
Comment 3 Poornima 2006-05-02 09:30:24 UTC
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.
Comment 4 Ilkka Tuohela 2006-06-26 13:08:53 UTC
OK, I finally ran this under gdb and found the problem myself.

Interesting parts from backtrace:
  • #0 mar_got_folder
    at mark-all-read.c line 74
  • #1 get_folder_got
    at mail-ops.c line 1229

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
Comment 5 Ilkka Tuohela 2006-06-26 13:11:08 UTC
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.
Comment 6 Harish Krishnaswamy 2006-08-09 08:45:39 UTC
Set target milestone and bump priority.
Comment 7 Srinivasa Ragavan 2007-05-08 04:48:45 UTC
Looks fine to me.
Comment 8 Srinivasa Ragavan 2007-05-14 03:56:40 UTC
Committed to head. Needs to go to stable as well.
Comment 9 Srinivasa Ragavan 2007-05-27 18:23:41 UTC
Fixed to stable.