Bug 3860 - crash after changing/applying themes several times
Summary: crash after changing/applying themes several times
Status: REOPENED
Alias: None
Product: Claws Mail (GTK 2)
Classification: Unclassified
Component: Other (show other bugs)
Version: 3.17.0
Hardware: PC Linux
: P3 normal
Assignee: users
URL:
Depends on:
Blocks:
 
Reported: 2017-08-10 08:56 UTC by Ricardo Mones
Modified: 2018-06-14 14:38 UTC (History)
0 users

See Also:


Attachments

Description Ricardo Mones 2017-08-10 08:56:09 UTC
When compiled with SVG support, the apply button on themes preferences is re-enabled after changing any SVG related checkbox, so user can view the result on UI. The second time it crashes with the following backtrace:

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff3f7c85d in g_type_check_instance_is_fundamentally_a ()
   from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
(gdb) bt
#0  0x00007ffff3f7c85d in g_type_check_instance_is_fundamentally_a ()
   from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#1  0x00007ffff3f5caf5 in g_object_unref ()
   from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#2  0x000000000049a2d7 in foldersel_reflect_prefs_pixmap_theme ()
    at foldersel.c:388
#3  0x00000000004cab68 in reflect_prefs_timeout_cb (data=<optimized out>)
    at mainwindow.c:2335
#4  0x00007ffff3c7f123 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#5  0x00007ffff3c7e6aa in g_main_context_dispatch ()
   from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#6  0x00007ffff3c7ea60 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#7  0x00007ffff3c7ed82 in g_main_loop_run ()
   from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#8  0x00007ffff70753b7 in gtk_main ()
   from /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#9  0x000000000044b854 in main (argc=<optimized out>, argv=<optimized out>)
    at main.c:1607
(gdb)

Steps to reproduce:
1. Open themes' preferences
2. Change theme
3. Apply
4. Modify SVG options, e.g. disable "Automatic" scaling and change value of DPI
5. Apply

This happen with both pixmap and scalable themes, so it seems not related with SVG support, though you have to have it enabled to be able to trigger it.

Short term fix would be to disable the possibility of re-applying themes without leaving the preferences dialog. Long term would be investigate what's happening with the pixmaps and why this low level function is crashing.
Comment 1 Ricardo Mones 2018-06-14 14:35:55 UTC
I've just got more segfaults when changing/applying themes, though admitedly this time I had to use the apply button more than two times, backtrace follows:

Thread 1 "claws-mail" received signal SIGSEGV, Segmentation fault.
0x00007ffff3f7c85d in g_type_check_instance_is_fundamentally_a ()
   from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
(gdb) bt full
#0  0x00007ffff3f7c85d in g_type_check_instance_is_fundamentally_a ()
   from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
No symbol table info available.
#1  0x00007ffff3f5caf5 in g_object_unref () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
No symbol table info available.
#2  0x000000000060f99c in row_delete (ctree=0xa98400, ctree_row=0xfd30a0) at gtkcmctree.c:2610
        clist = 0xa98400
        i = <optimized out>
#3  0x000000000060fa0c in tree_delete_row (ctree=<optimized out>, node=0x19fdec0, data=<optimized out>)
    at gtkcmctree.c:2455
No locals.
#4  0x00000000006181ce in gtk_cmctree_post_recursive (ctree=ctree@entry=0xa98400, node=0x19fdec0, 
    func=func@entry=0x60fa00 <tree_delete_row>, data=data@entry=0x0) at gtkcmctree.c:3293
        work = <optimized out>
        tmp = <optimized out>
#5  0x00000000006181b5 in gtk_cmctree_post_recursive (ctree=ctree@entry=0xa98400, 
    node=node@entry=0x197fb00, func=func@entry=0x60fa00 <tree_delete_row>, data=data@entry=0x0)
    at gtkcmctree.c:3288
        work = <optimized out>
        tmp = 0x0
#6  0x000000000061847f in real_clear (clist=0xa98400) at gtkcmctree.c:3253
        ctree = 0xa98400
        work = 0xfec940
        ptr = 0x197fb00
#7  0x000000000063c323 in gtk_sctree_clear (clist=0xa98400) at gtksctree.c:775
        sctree = <optimized out>
#8  0x00000000004a0a46 in folderview_set (folderview=0xce1060) at folderview.c:794
        ctree = 0xa98400
        mainwin = 0xb0aec0
        sel_item = 0x0
        op_item = 0x0
#9  0x00000000004a2d30 in folderview_set_all () at folderview.c:814
        list = <optimized out>
#10 folderview_reflect_prefs () at folderview.c:2821
        update_font = 1
        folderview = 0xce1060
        item = 0x0
        pos = <optimized out>
        height = 0
#11 0x00000000004cb757 in reflect_prefs_timeout_cb (data=<optimized out>) at mainwindow.c:2334
        pixmap_theme_changed = <optimized out>
        cur = 0xc58540
        mainwin = 0xb0aec0
        pixmap = <optimized out>
#12 0x00007ffff3c7f123 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
No symbol table info available.
#13 0x00007ffff3c7e6aa in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
No symbol table info available.
#14 0x00007ffff3c7ea60 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
No symbol table info available.
#15 0x00007ffff3c7ed82 in g_main_loop_run () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
No symbol table info available.
#16 0x00007ffff72ad3b7 in gtk_main () from /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
No symbol table info available.
#17 0x000000000044c56c in main (argc=<optimized out>, argv=<optimized out>) at main.c:1624
        connection = 0xaa61f8
        error = 0x0
        userrc = <optimized out>
        mainwin = 0xb0aec0
        folderview = 0xce1060
        icon = 0xad7aa0
        crash_file_present = <optimized out>
        num_folder_class = <optimized out>
        asked_for_migration = <optimized out>
        start_done = <optimized out>
        plug_list = <optimized out>
        never_ran = <optimized out>
        mainwin_shown = <optimized out>
        ret = <optimized out>
        start = {tv_sec = 1528979257, tv_usec = 518499}
        end = {tv_sec = 1528979259, tv_usec = 807435}
        diff = {tv_sec = 2, tv_usec = 288936}
        timing_name = 0x66d0d5 "startup"
        __FUNCTION__ = "main"
(gdb)

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