Bug 3616 - segfault setting up new CM in new userid
Summary: segfault setting up new CM in new userid
Alias: None
Product: Claws Mail
Classification: Unclassified
Component: Other (show other bugs)
Version: 3.14.0
Hardware: PC Linux
: P3 normal
Assignee: users
Depends on:
Reported: 2016-02-10 17:31 CET by Pierre Fortin
Modified: 2016-02-10 23:44 CET (History)
0 users

See Also:

gdb bt full (11.08 KB, text/plain)
2016-02-10 17:31 CET, Pierre Fortin
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Pierre Fortin 2016-02-10 17:31:18 CET
Created attachment 1632 [details]
gdb bt full

In a new userid, setting up CM fresh (no .claws-mail or Mail directories).
Claws Mail version 3.13.2git9

Via wizard, enter name (foo), email address (anything@gmail.com), click auto-configure, enter password and accept all remaining defaults.

Upon clicking Save, I get:
----- on konsole:
$ cm --debug 2>&1 >  cm_new.log

** (cm:17743): WARNING **: failed to open directory: /usr/local/etc/skel/.claws-mail
/home/cm/.claws-mail/clawsrc: fopen: No such file or directory
** Message: filtering log disabled

Segmentation fault

----- end of cm_new.log:
prefs_customheader.c:332:Reading custom header configuration...
folderview.c:332:setting titles...
folderview.c:765:called inc_lock (lock count 1)
folderview.c:766:Setting folder info...
msgcache.c:277:TIMING msgcache_get_msg_list : 0s000ms
folderview.c:792:called inc_unlock (lock count 0)
summaryview.c:1248:called inc_lock (lock count 1)
summaryview.c:1321:empty folder ((nil) (null) (nil) 0)

summaryview.c:1333:called inc_unlock (lock count 0)
summaryview.c:1334:TIMING summary_show : 0s000ms
mh.c:255:mh_get_last_num(): Scanning inbox ...

----- attached gdb just before clicking Save:
(gdb) cont
# clicked Save here
Program received signal SIGSEGV, Segmentation fault.
0x00007f4da77847fe in free () from /lib64/libc.so.6
[Thread 0x7f4d9e470700 (LWP 17747) exited]

Program terminated with signal SIGSEGV, Segmentation fault.
The program no longer exists.
# so no backtrace...

The crash occurs after Mail/{draft,inbox,queue,sent,trash} directories are created; but before the Welcome email is saved therein.

Removed all directories and retried with "gdb cm" -- bt full attached.
Comment 1 users 2016-02-10 18:32:03 CET
Changes related to this bug have been committed.
Please check latest Git and update the bug accordingly.
You can also get the patch from:

++ ChangeLog	2016-02-10 18:32:02.846826828 +0100
Merge: 6b03632 126c9d8
Author: Colin Leroy <colin@colino.net>
Date:   Wed Feb 10 18:32:02 2016 +0100

    Merge branch 'master' of file:///home/git/claws

Author: Andrej Kacian <ticho@claws-mail.org>
Date:   Wed Feb 10 18:30:20 2016 +0100

    Fix a segfault caused by freeing a string on incorrect place.
    Closes bug #3616.
Comment 2 Andrej Kacian 2016-02-10 18:40:39 CET
Sorry about that, that was my mistake.
Comment 3 Pierre Fortin 2016-02-10 21:30:04 CET
Confirmed fixed.