Bug 4072 - Crash when clicking 'reply' or 'reply with quote'
Summary: Crash when clicking 'reply' or 'reply with quote'
Status: RESOLVED FIXED
Alias: None
Product: Claws Mail (GTK 2)
Classification: Unclassified
Component: UI/Actions (show other bugs)
Version: 3.17.0
Hardware: PC Linux
: P3 major
Assignee: users
URL:
Depends on:
Blocks:
 
Reported: 2018-08-17 23:46 UTC by spraywatch
Modified: 2018-08-22 09:05 UTC (History)
0 users

See Also:


Attachments

Description spraywatch 2018-08-17 23:46:26 UTC
It seems, no matter which email, when I click 'reply' or 'reply with quote', Claws Mail crashes and closes its window.

I have startet it in xfce4-terminal and after the crash I see this message:

28559 segmentation fault  claws-mail

I currently use Void Linux with musl libc, not sure if this is the reason.
Before the update to 3.17.0 today, replying worked.

'Reply without quote' still works and opens the compose window.
Comment 1 Andrej Kacian 2018-08-17 23:55:00 UTC
Can you get a GDB backtrace from the crash? See https://www.claws-mail.org/faq/index.php/Debugging_Claws
Comment 2 spraywatch 2018-08-18 01:03:48 UTC
Thread 1 "claws-mail" received signal SIGSEGV, Segmentation fault.
strlen (s=s@entry=0x0) at src/string/strlen.c:15
15	src/string/strlen.c: No such file or directory.
(gdb) thread apply all bt

Thread 4 (LWP 30120):
#0  __cp_end () at src/thread/x86_64/syscall_cp.s:29
#1  0x00007ffff7dba421 in __syscall_cp_c (nr=202, u=<optimized out>, v=<optimized out>, w=<optimized out>, x=<optimized out>, 
    y=<optimized out>, z=0) at src/thread/pthread_cancel.c:35
#2  0x00007ffff7db966c in __timedwait_cp (addr=addr@entry=0x7fffe9d09fd4, val=val@entry=2, clk=clk@entry=0, at=at@entry=0x0, 
    priv=128, priv@entry=1) at src/thread/__timedwait.c:31
#3  0x00007ffff7dba862 in __pthread_cond_timedwait (c=0x5555560d2618, m=0x5555560d25f0, ts=0x0)
    at src/thread/pthread_cond_timedwait.c:105
#4  0x00007ffff4af097b in mailsem_internal_wait () from /lib/libetpan.so.20
#5  0x0000555555819811 in thread_run (data=0x5555560d1f80) at etpan-thread-manager.c:320
#6  0x00007ffff7dbb1eb in start (p=0x7fffe9d13ae8) at src/thread/pthread_create.c:150
#7  0x00007ffff7dc7b71 in __clone () at src/thread/x86_64/clone.s:21
Backtrace stopped: frame did not save the PC

Thread 3 (LWP 30119):
#0  __cp_end () at src/thread/x86_64/syscall_cp.s:29
#1  0x00007ffff7dba421 in __syscall_cp_c (nr=7, u=<optimized out>, v=<optimized out>, w=<optimized out>, x=<optimized out>, 
    y=<optimized out>, z=0) at src/thread/pthread_cancel.c:35
#2  0x00007ffff7da99ef in poll (fds=<optimized out>, n=<optimized out>, timeout=<optimized out>) at src/select/poll.c:10
#3  0x00007ffff5dfc0f9 in ?? () from /lib/libglib-2.0.so.0
#4  0x00007ffff5dfc492 in g_main_loop_run () from /lib/libglib-2.0.so.0
#5  0x00007ffff662cac6 in ?? () from /lib/libgio-2.0.so.0
#6  0x00007ffff5e241d5 in ?? () from /lib/libglib-2.0.so.0
#7  0x00007ffff7dbb1eb in start (p=0x7ffff7e79ae8) at src/thread/pthread_create.c:150
#8  0x00007ffff7dc7b71 in __clone () at src/thread/x86_64/clone.s:21
Backtrace stopped: frame did not save the PC

Thread 2 (LWP 30118):
#0  __cp_end () at src/thread/x86_64/syscall_cp.s:29
Comment 3 Andrej Kacian 2018-08-18 08:43:23 UTC
What you pasted seems incomplete. The crash happened in thread number 1 (see first line), but only traces from threads 3 and 4 are here, and an incomplete one from thread 2. Are you sure there was no more output?
Comment 4 spraywatch 2018-08-18 09:03:24 UTC
sorry. you are right, there is more. i have run the procedure again:

Thread 1 "claws-mail" received signal SIGSEGV, Segmentation fault.
strlen (s=s@entry=0x0) at src/string/strlen.c:15
15	src/string/strlen.c: No such file or directory.
(gdb) thread apply all bt

Thread 4 (LWP 1988):
#0  __cp_end () at src/thread/x86_64/syscall_cp.s:29
#1  0x00007ffff7dba421 in __syscall_cp_c (nr=202, u=<optimized out>, 
    v=<optimized out>, w=<optimized out>, x=<optimized out>, 
    y=<optimized out>, z=0) at src/thread/pthread_cancel.c:35
#2  0x00007ffff7db966c in __timedwait_cp (addr=addr@entry=0x7fffe9d09fd4, 
    val=val@entry=2, clk=clk@entry=0, at=at@entry=0x0, priv=128, priv@entry=1)
    at src/thread/__timedwait.c:31
#3  0x00007ffff7dba862 in __pthread_cond_timedwait (c=0x5555560dfa58, 
    m=0x5555560dfa30, ts=0x0) at src/thread/pthread_cond_timedwait.c:105
#4  0x00007ffff4af097b in mailsem_internal_wait () from /lib/libetpan.so.20
#5  0x0000555555819811 in thread_run (data=0x5555560db8e0)
    at etpan-thread-manager.c:320
#6  0x00007ffff7dbb1eb in start (p=0x7fffe9d13ae8)
    at src/thread/pthread_create.c:150
#7  0x00007ffff7dc7b71 in __clone () at src/thread/x86_64/clone.s:21
Backtrace stopped: frame did not save the PC

Thread 3 (LWP 1987):
#0  __cp_end () at src/thread/x86_64/syscall_cp.s:29
#1  0x00007ffff7dba421 in __syscall_cp_c (nr=7, u=<optimized out>, 
    v=<optimized out>, w=<optimized out>, x=<optimized out>, 
---Type <return> to continue, or q <return> to quit---
    z=0) at src/thread/pthread_cancel.c:35
#2  0x00007ffff7da99ef in poll (fds=<optimized out>, n=<optimized out>, timeout=<optimized out>) at src/select/poll.c:10
#3  0x00007ffff5dfc006 in ?? () from /lib/libglib-2.0.so.0
#4  0x00007ffff5dfc392 in g_main_loop_run () from /lib/libglib-2.0.so.0
#5  0x00007ffff662bea6 in ?? () from /lib/libgio-2.0.so.0
#6  0x00007ffff5e23e65 in ?? () from /lib/libglib-2.0.so.0
#7  0x00007ffff7dbb1eb in start (p=0x7ffff7e79ae8) at src/thread/pthread_create.c:150
#8  0x00007ffff7dc7b71 in __clone () at src/thread/x86_64/clone.s:21
Backtrace stopped: frame did not save the PC

Thread 2 (LWP 1986):
#0  __cp_end () at src/thread/x86_64/syscall_cp.s:29
#1  0x00007ffff7dba421 in __syscall_cp_c (nr=7, u=<optimized out>, v=<optimized out>, w=<optimized out>, x=<optimized out>, y=<optimized out>, z=0) at src/thread/pthread_cancel.c:35
#2  0x00007ffff7da99ef in poll (fds=<optimized out>, n=<optimized out>, timeout=<optimized out>) at src/select/poll.c:10
#3  0x00007ffff5dfc006 in ?? () from /lib/libglib-2.0.so.0
#4  0x00007ffff5dfc12c in g_main_context_iteration () from /lib/libglib-2.0.so.0
#5  0x00007ffff5dfc171 in ?? () from /lib/libglib-2.0.so.0
#6  0x00007ffff5e23e65 in ?? () from /lib/libglib-2.0.so.0
#7  0x00007ffff7dbb1eb in start (p=0x7ffff7e98ae8) at src/thread/pthread_create.c:150
#8  0x00007ffff7dc7b71 in __clone () at src/thread/x86_64/clone.s:21
Backtrace stopped: frame did not save the PC

Thread 1 (LWP 1982):
#0  strlen (s=s@entry=0x0) at src/string/strlen.c:15
#1  0x0000555555682b28 in account_signatures_matchlist_nchar_found (str=str@entry=0x7ffffffecc40 "https://www.thewildbeast.co.uk/claws-mail/bugzilla/show_bug.cgi?id=4072\n", 
    format=format@entry=0x555555883f2a "%\n") at account.c:1998
#2  0x000055555577f2ef in quote_fmt_show_msg (msginfo=<optimized out>, body=<optimized out>, quoted=quoted@entry=1, signature=signature@entry=0, quote_str=0x7fffffffc800 "> ") at quote_fmt_parse.y:500
#3  0x00005555557828d5 in quote_fmtparse () at quote_fmt_parse.y:820
#4  0x000055555569e299 in compose_quote_fmt (compose=compose@entry=0x555556181fa0, msginfo=0x555556181d00, fmt=fmt@entry=0x7ffff3252d20 "On %d\\n%f wrote:\\n\\n%q\\n%X", qmark=qmark@entry=0x7ffff3252d00 "> ", 
    body=body@entry=0x555556178740 "https://www.thewildbeast.co.uk/claws-mail/bugzilla/show_bug.cgi?id=4072\n\n--- Comment #3 from Andrej Kacian <andrej@kacian.sk> ---\nWhat you pasted seems incomplete. The crash happened in thread number "..., rewrap=rewrap@entry=0, need_unescape=1, err_msg=0x555555861898 "The body of the \"Reply\" template has an error at line %d.") at compose.c:3119
#5  0x00005555556b1c64 in compose_generic_reply (msginfo=msginfo@entry=0x555556181d00, quote_mode=quote_mode@entry=COMPOSE_QUOTE_FORCED, 
    body=body@entry=0x555556178740 "https://www.thewildbeast.co.uk/claws-mail/bugzilla/show_bug.cgi?id=4072\n\n--- Comment #3 from Andrej Kacian <andrej@kacian.sk> ---\nWhat you pasted seems incomplete. The crash happened in thread number "..., followup_and_reply_to=0, to_sender=0, to_ml=<optimized out>, to_all=0) at compose.c:1660
#6  0x00005555556b2205 in compose_reply (to_all=0, to_ml=<optimized out>, to_sender=0, 
    body=0x555556178740 "https://www.thewildbeast.co.uk/claws-mail/bugzilla/show_bug.cgi?id=4072\n\n--- Comment #3 from Andrej Kacian <andrej@kacian.sk> ---\nWhat you pasted seems incomplete. The crash happened in thread number "..., quote_mode=COMPOSE_QUOTE_FORCED, msginfo=0x555556181d00) at compose.c:1478
#7  compose_reply_mode (mode=mode@entry=COMPOSE_REPLY_WITH_QUOTE, msginfo_list=msginfo_list@entry=0x555556173c10, 
    body=body@entry=0x555556178740 "https://www.thewildbeast.co.uk/claws-mail/bugzilla/show_bug.cgi?id=4072\n\n--- Comment #3 from Andrej Kacian <andrej@kacian.sk> ---\nWhat you pasted seems incomplete. The crash happened in thread number "...) at compose.c:1355
#8  0x00005555556b2b89 in compose_reply_mode (
    body=0x555556178740 "https://www.thewildbeast.co.uk/claws-mail/bugzilla/show_bug.cgi?id=4072\n\n--- Comment #3 from Andrej Kacian <andrej@kacian.sk> ---\nWhat you pasted seems incomplete. The crash happened in thread number "..., msginfo_list=0x555556173c10, mode=COMPOSE_REPLY_WITH_QUOTE) at compose.c:12150
#9  compose_reply_from_messageview_real (msgview=msgview@entry=0x555555f69f40, msginfo_list=msginfo_list@entry=0x555556173c40, action=action@entry=1, opening_multiple=opening_multiple@entry=0)
    at compose.c:12150
#10 0x00005555556b48f5 in compose_reply_from_messageview (msgview=msgview@entry=0x555555f69f40, msginfo_list=msginfo_list@entry=0x555556173c40, action=action@entry=1) at compose.c:12199
#11 0x00005555557a8022 in toolbar_reply (data=<optimized out>, action=1) at toolbar.c:2989
#12 0x00007ffff60d537d in g_closure_invoke () from /lib/libgobject-2.0.so.0
#13 0x00007ffff60e80f3 in ?? () from /lib/libgobject-2.0.so.0
#14 0x00007ffff60f1062 in g_signal_emit_valist () from /lib/libgobject-2.0.so.0
#15 0x00007ffff60f1b84 in g_signal_emit_by_name () from /lib/libgobject-2.0.so.0
#16 0x00007ffff60d537d in g_closure_invoke () from /lib/libgobject-2.0.so.0
#17 0x00007ffff60e80f3 in ?? () from /lib/libgobject-2.0.so.0
#18 0x00007ffff60f1062 in g_signal_emit_valist () from /lib/libgobject-2.0.so.0
---Type <return> to continue, or q <return> to quit---
#19 0x00007ffff60f16af in g_signal_emit () from /lib/libgobject-2.0.so.0
#20 0x00007ffff7395a05 in ?? () from /lib/libgtk-x11-2.0.so.0
#21 0x00007ffff60d537d in g_closure_invoke () from /lib/libgobject-2.0.so.0
#22 0x00007ffff60e8296 in ?? () from /lib/libgobject-2.0.so.0
#23 0x00007ffff60f1062 in g_signal_emit_valist () from /lib/libgobject-2.0.so.0
#24 0x00007ffff60f16af in g_signal_emit () from /lib/libgobject-2.0.so.0
#25 0x00007ffff7394989 in ?? () from /lib/libgtk-x11-2.0.so.0
#26 0x00007ffff743a3ab in ?? () from /lib/libgtk-x11-2.0.so.0
#27 0x00007ffff60d537d in g_closure_invoke () from /lib/libgobject-2.0.so.0
#28 0x00007ffff60e7924 in ?? () from /lib/libgobject-2.0.so.0
#29 0x00007ffff60f0723 in g_signal_emit_valist () from /lib/libgobject-2.0.so.0
#30 0x00007ffff60f16af in g_signal_emit () from /lib/libgobject-2.0.so.0
#31 0x00007ffff755035c in ?? () from /lib/libgtk-x11-2.0.so.0
#32 0x00007ffff743864c in gtk_propagate_event () from /lib/libgtk-x11-2.0.so.0
#33 0x00007ffff7438a4b in gtk_main_do_event () from /lib/libgtk-x11-2.0.so.0
#34 0x00007ffff70b153c in ?? () from /lib/libgdk-x11-2.0.so.0
#35 0x00007ffff5dfbdfe in g_main_context_dispatch () from /lib/libglib-2.0.so.0
#36 0x00007ffff5dfc098 in ?? () from /lib/libglib-2.0.so.0
#37 0x00007ffff5dfc392 in g_main_loop_run () from /lib/libglib-2.0.so.0
#38 0x00007ffff7437a77 in gtk_main () from /lib/libgtk-x11-2.0.so.0
#39 0x000055555567d08c in main (argc=<optimized out>, argv=<optimized out>) at main.c:1624
(gdb)
Comment 5 users 2018-08-18 09:36:04 UTC
Changes related to this bug have been committed.
Please check latest Git and update the bug accordingly.
You can also get the patch from:
http://git.claws-mail.org/

++ ChangeLog	2018-08-18 09:36:04.421217416 +0200
http://git.claws-mail.org/?p=claws.git;a=commitdiff;h=14802883a28b9c526ddadf3b5c269b3f3f06f725
Merge: 1e58fd7 e0a319b
Author: Colin Leroy <colin@colino.net>
Date:   Sat Aug 18 09:36:03 2018 +0200

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

http://git.claws-mail.org/?p=claws.git;a=commitdiff;h=e0a319b4b672c592f9824509d948914a4d167a1e
Author: wwp <subscript@free.fr>
Date:   Sat Aug 18 09:34:09 2018 +0200

    Fix for Bug 4072: Crash when clicking 'reply' or 'reply with quote'
    Wrong '%
' format causes a crash in g_strdup_printf.
Comment 6 spraywatch 2018-08-18 13:19:36 UTC
I have git cloned the claws repo and compiled it. It installed to /usr/local/bin/claws-mail.

Then I opened this claws-mail and tried the reply-buttons. No crash.
Comment 7 wwp 2018-08-18 13:49:12 UTC
Thanks for testing!
Comment 8 spraywatch 2018-08-22 09:01:24 UTC
In which version will this fix be included?

Just see that in Void Linux, the reply button still causes a crash, at least on my machine:

➜  ~ xbps-query -s claws-mail
[*] claws-mail-3.17.0_2     The user-friendly, lightweight, and fast email c...
[*] claws-mail-dbg-3.17.0_2 The user-friendly, lightweight, and fast email c...

I don't know if Void has not yet packaged the new version, or if claws-mail does not yet have a new version... 

Just waiting for the fixed version.
Comment 9 wwp 2018-08-22 09:05:32 UTC
The fix is in the sources in git repository. It's not yet part of a released version. Either wait for the next version to be released and be packaged in your distro, or build from the sources in git.

Note You need to log in before you can comment on or make changes to this bug.