Bug 2277 - Segfault when loading inbox for the first time
Summary: Segfault when loading inbox for the first time
Status: RESOLVED FIXED
Alias: None
Product: Claws Mail (GTK 2)
Classification: Unclassified
Component: Folders/IMAP (show other bugs)
Version: 3.7.7
Hardware: PC Linux
: P3 critical
Assignee: users
URL:
Depends on:
Blocks:
 
Reported: 2010-10-03 01:07 UTC by Reed Loden
Modified: 2010-10-04 09:01 UTC (History)
1 user (show)

See Also:


Attachments

Description Reed Loden 2010-10-03 01:07:06 UTC
I'm getting a segfault every time I try to load my INBOX over IMAP. It'll do the "Opening Folder INBOX..." thing and the progress bar for my mail, but once it gets close to the end (loading the last ~50 message block), it segfaults.

Program received signal SIGSEGV, Segmentation fault.
g_relation_index (relation=0xffffffffe010c350, field=0, hash_func=0x4406e8 <g_direct_hash@plt>, key_equal_func=0x441608 <g_direct_equal@plt>)
    at /build/buildd/glib2.0-2.26.0/glib/grel.c:275
275	/build/buildd/glib2.0-2.26.0/glib/grel.c: No such file or directory.
	in /build/buildd/glib2.0-2.26.0/glib/grel.c

I did a quick look for dupes, but I didn't see any, so apologies if this is already filed or known.

Random info:
* Claws Mail 3.7.6cvs50 (latest checkout from CVS) -- default configure options
* Ubuntu 10.10 RC
* GTK+ 2.22

gdb `bt full` output:
(gdb) bt full
#0  g_relation_index (relation=0xffffffffe010c350, field=0, hash_func=0x4406e8 <g_direct_hash@plt>, key_equal_func=0x441608 <g_direct_equal@plt>)
    at /build/buildd/glib2.0-2.26.0/glib/grel.c:275
        __PRETTY_FUNCTION__ = "g_relation_index"
#1  0x00000000004b29c5 in syncronize_flags (item=0xd5a030, msglist=0xe50350) at folder.c:1898
        relation = 0xffffffffe010c350
        ret = <value optimized out>
        cur = <value optimized out>
#2  0x00000000004b4a3b in folder_item_scan_full (item=0xd5a030, filtering=<value optimized out>) at folder.c:2301
        tmp_list = 0xe50350
        folder = <value optimized out>
        folder_list = 0xe59210
        cache_list = <value optimized out>
        folder_list_cur = 0x0
        cache_list_cur = 0x0
        new_list = 0xe590b0
        exists_list = <value optimized out>
        elem = <value optimized out>
        newmsg_list = 0xe587b0
        newcnt = <value optimized out>
        totalcnt = <value optimized out>
        markedcnt = <value optimized out>
        unreadmarkedcnt = 0
        repliedcnt = 1
        forwardedcnt = 18702
        lockedcnt = 0
        ignoredcnt = 15044784
        watchedcnt = 0
        cache_max_num = 0
        folder_max_num = 18702
        cache_cur_num = 2147483647
        folder_cur_num = <value optimized out>
        update_flags = 0
        old_uids_valid = 1
        subject_table = 0xd4d1e0
#3  0x00000000004b2dd3 in folder_item_read_cache (item=0xd5a030) at folder.c:2627
        unreadcnt = 0
        unreadmarkedcnt = 0
        lockedcnt = <value optimized out>
        msginfo = <value optimized out>
        cur = <value optimized out>
        markedcnt = <value optimized out>
        repliedcnt = <value optimized out>
        watchedcnt = 0
        list = 0x7fffffff5290
        newcnt = 32767
        forwardedcnt = <value optimized out>
        ignoredcnt = 4294922864
        cache_file = 0xe47710 "/home/reed/.claws-mail/imapcache/mail.palantir.com/reed/INBOX/.claws_cache"
        mark_file = 0xe565a0 "/home/reed/.claws-mail/imapcache/mail.palantir.com/reed/INBOX/.claws_mark"
        tags_file = 0xdfd900 "/home/reed/.claws-mail/tagsdb/#imap/Palantir/INBOX/.claws_tags"
        start = {tv_sec = 1286060278, tv_usec = 169301}
        end = {tv_sec = 13946736, tv_usec = 0}
        __FUNCTION__ = "folder_item_read_cache"
#4  0x00000000004b5427 in folder_item_scan_full (item=0xd5a030, filtering=<value optimized out>) at folder.c:2137
        folder = 0xd49b10
        folder_list = 0xe01f20
        cache_list = <value optimized out>
        folder_list_cur = <value optimized out>
        cache_list_cur = <value optimized out>
        new_list = 0x7ffff32f3050
        exists_list = <value optimized out>
        elem = <value optimized out>
        newmsg_list = <value optimized out>
        newcnt = <value optimized out>
        totalcnt = <value optimized out>
        markedcnt = <value optimized out>
        unreadmarkedcnt = 1
        repliedcnt = 1
        forwardedcnt = 10437184
        lockedcnt = 0
        ignoredcnt = 4079956048
        watchedcnt = 11820016
        cache_max_num = 0
        folder_max_num = 10437184
        cache_cur_num = <value optimized out>
        folder_cur_num = <value optimized out>
        update_flags = 1
        old_uids_valid = 1
        subject_table = 0xd4cf70
#5  0x00000000004bc94d in folder_item_process_open (item=0xd5a030) at folder.c:1974
No locals.
#6  folder_item_open (item=0xd5a030) at folder.c:2009
        start = {tv_sec = 1286060269, tv_usec = 37104}
        end = {tv_sec = 0, tv_usec = 0}
        __FUNCTION__ = "folder_item_open"
#7  0x00000000004c019c in folderview_selected (ctree=0xa3e250, row=0xccb520, column=-1, folderview=0xb7d010) at folderview.c:2195
        can_select = 0
        opened = <value optimized out>
        item = 0xd5a030
        buf = 0xd49960 "\001"
        res = <value optimized out>
        old_opened = 0x0
        start = {tv_sec = 1286060269, tv_usec = 21354}
        end = {tv_sec = 13947120, tv_usec = 12310368}
        __FUNCTION__ = "folderview_selected"
#8  0x00007ffff32c4a6e in g_closure_invoke (closure=0xbbd760, return_value=0x0, n_param_values=3, param_values=0xd4d0f0, invocation_hint=0x7fffffff7510)
    at /build/buildd/glib2.0-2.26.0/gobject/gclosure.c:766
        marshal = 0
        marshal_data = 0x56e4
        __PRETTY_FUNCTION__ = "g_closure_invoke"
#9  0x00007ffff32da4d7 in signal_emit_unlocked_R (node=0xa38860, detail=<value optimized out>, instance=<value optimized out>, 
    emission_return=<value optimized out>, instance_and_params=<value optimized out>) at /build/buildd/glib2.0-2.26.0/gobject/gsignal.c:3252
        tmp = <value optimized out>
        handler = 0xb7d870
        accumulator = 0x0
        emission = {next = 0x7fffffffda90, instance = 0xa3e250, ihint = {signal_id = 175, detail = 0, run_type = G_SIGNAL_RUN_FIRST}, state = EMISSION_RUN, 
          chain_type = 4}
        class_closure = 0xa32600
        handler_list = 0xb7d870
        return_accu = <value optimized out>
        accu = {g_type = 0, data = {{v_int = 0, v_uint = 0, v_long = 0, v_ulong = 0, v_int64 = 0, v_uint64 = 0, v_float = 0, v_double = 0, 
              v_pointer = 0x0}, {v_int = 0, v_uint = 0, v_long = 0, v_ulong = 0, v_int64 = 0, v_uint64 = 0, v_float = 0, v_double = 0, v_pointer = 0x0}}}
        signal_id = 175
        max_sequential_handler_number = <value optimized out>
        return_value_altered = 1
#10 0x00007ffff32db996 in g_signal_emit_valist (instance=0xa3e250, signal_id=<value optimized out>, detail=0, var_args=0x7fffffff7700)
    at /build/buildd/glib2.0-2.26.0/gobject/gsignal.c:2983
        signal_return_type = 4
        param_values = <value optimized out>
        node = 0xa38860
        i = <value optimized out>
        n_params = <value optimized out>
        __PRETTY_FUNCTION__ = "g_signal_emit_valist"
#11 0x00007ffff32dbf53 in g_signal_emit (instance=0xffffffffe010c350, signal_id=0, detail=4458216) at /build/buildd/glib2.0-2.26.0/gobject/gsignal.c:3040
        var_args = {{gp_offset = 40, fp_offset = 48, overflow_arg_area = 0x7fffffff77e0, reg_save_area = 0x7fffffff7720}}
#12 0x00000000005f884a in gtk_cmctree_select (ctree=0xa3e250, node=0xccb520) at gtkcmctree.c:4556
No locals.
#13 0x00000000005ff2a9 in real_unselect_all (clist=0xa3e250) at gtkcmctree.c:3536
        ctree = 0xa3e250
        node = <value optimized out>
        list = <value optimized out>
#14 0x000000000062a11f in gtk_sctree_real_unselect_all (clist=0xa3e250) at gtksctree.c:1918
        should_freeze = 0
#15 0x000000000060e931 in gtk_cmclist_unselect_all (clist=0xa3e250) at gtkcmclist.c:3581
No locals.
#16 0x0000000000627399 in select_row (sctree=0xa3e250, row=1, col=3, state=<value optimized out>, _node=0x0) at gtksctree.c:1505
        range = 0
        additive = 0
#17 0x00000000006297ea in gtk_sctree_button_press (widget=<value optimized out>, event=0xd1e840) at gtksctree.c:1680
        clist = 0xa3e250
        on_row = 1
        row = 1
        col = 3
        retval = <value optimized out>
#18 0x00007ffff70979d8 in _gtk_marshal_BOOLEAN__BOXED (closure=0x9f4140, return_value=0x7fffffffdae0, n_param_values=<value optimized out>, 
    param_values=0xd5b290, invocation_hint=<value optimized out>, marshal_data=0x629220) at /build/buildd/gtk+2.0-2.22.0/gtk/gtkmarshalers.c:86
        data1 = 0xa3e250
        data2 = 0x4406e8
        v_return = <value optimized out>
        __PRETTY_FUNCTION__ = "_gtk_marshal_BOOLEAN__BOXED"
#19 0x00007ffff32c4a6e in g_closure_invoke (closure=0x9f4140, return_value=0x7fffffffdae0, n_param_values=2, param_values=0xd5b290, 
    invocation_hint=0x7fffffffdaa0) at /build/buildd/glib2.0-2.26.0/gobject/gclosure.c:766
        marshal = 0
        marshal_data = 0x56e4
        __PRETTY_FUNCTION__ = "g_closure_invoke"
#20 0x00007ffff32da120 in signal_emit_unlocked_R (node=0x9f41b0, detail=<value optimized out>, instance=<value optimized out>, 
    emission_return=<value optimized out>, instance_and_params=<value optimized out>) at /build/buildd/glib2.0-2.26.0/gobject/gsignal.c:3290
        accumulator = 0x9f4210
        emission = {next = 0x0, instance = 0xa3e250, ihint = {signal_id = 33, detail = 0, run_type = G_SIGNAL_RUN_LAST}, state = EMISSION_RUN, 
          chain_type = 10724848}
        class_closure = 0x9f4140
        handler_list = 0xb9cec0
        return_accu = <value optimized out>
        accu = {g_type = 20, data = {{v_int = 0, v_uint = 0, v_long = 0, v_ulong = 0, v_int64 = 0, v_uint64 = 0, v_float = 0, v_double = 0, 
              v_pointer = 0x0}, {v_int = 0, v_uint = 0, v_long = 0, v_ulong = 0, v_int64 = 0, v_uint64 = 0, v_float = 0, v_double = 0, v_pointer = 0x0}}}
        signal_id = 33
        max_sequential_handler_number = 10437136
        return_value_altered = 1
#21 0x00007ffff32db7db in g_signal_emit_valist (instance=0xa3e250, signal_id=<value optimized out>, detail=0, var_args=0x7fffffffdc90)
    at /build/buildd/glib2.0-2.26.0/gobject/gsignal.c:2993
        return_value = {g_type = 20, data = {{v_int = 0, v_uint = 0, v_long = 0, v_ulong = 0, v_int64 = 0, v_uint64 = 0, v_float = 0, v_double = 0, 
              v_pointer = 0x0}, {v_int = 0, v_uint = 0, v_long = 0, v_ulong = 0, v_int64 = 0, v_uint64 = 0, v_float = 0, v_double = 0, v_pointer = 0x0}}}
        error = <value optimized out>
        signal_return_type = 20
        param_values = <value optimized out>
        node = 0x9f41b0
        i = <value optimized out>
        n_params = <value optimized out>
        __PRETTY_FUNCTION__ = "g_signal_emit_valist"
#22 0x00007ffff32dbf53 in g_signal_emit (instance=0xffffffffe010c350, signal_id=0, detail=4458216) at /build/buildd/glib2.0-2.26.0/gobject/gsignal.c:3040
        var_args = {{gp_offset = 32, fp_offset = 48, overflow_arg_area = 0x7fffffffdd70, reg_save_area = 0x7fffffffdcb0}}
#23 0x00007ffff71b06df in gtk_widget_event_internal (widget=0xa3e250, event=0xd1e840) at /build/buildd/gtk+2.0-2.22.0/gtk/gtkwidget.c:4985
        signal_num = <value optimized out>
        return_val = 0
#24 0x00007ffff708fe73 in IA__gtk_propagate_event (widget=0xa3e250, event=0xd1e840) at /build/buildd/gtk+2.0-2.22.0/gtk/gtkmain.c:2465
        tmp = 0x0
        handled_event = 10740304
        __PRETTY_FUNCTION__ = "IA__gtk_propagate_event"
#25 0x00007ffff7090f4b in IA__gtk_main_do_event (event=0xd1e840) at /build/buildd/gtk+2.0-2.22.0/gtk/gtkmain.c:1665
        event_widget = 0xa3e250
        grab_widget = 0xa3e250
        window_group = 0xc9a360
        rewritten_event = 0x0
        tmp_list = <value optimized out>
        __PRETTY_FUNCTION__ = "IA__gtk_main_do_event"
#26 0x00007ffff6d0a74c in gdk_event_dispatch (source=<value optimized out>, callback=<value optimized out>, user_data=<value optimized out>)
    at /build/buildd/gtk+2.0-2.22.0/gdk/x11/gdkevents-x11.c:2377
        display = <value optimized out>
        event = <value optimized out>
#27 0x00007ffff2c07342 in g_main_dispatch (context=0x9d3180) at /build/buildd/glib2.0-2.26.0/glib/gmain.c:2149
        dispatch = 0x7ffff6d0a700 <gdk_event_dispatch>
        user_data = 0x0
        callback = 0
        cb_funcs = 0x0
        cb_data = 0x0
        current_source_link = {data = 0x9d3090, next = 0x0}
        source = 0x9d3090
        current = 0xc2abb0
        i = 0
#28 g_main_context_dispatch (context=0x9d3180) at /build/buildd/glib2.0-2.26.0/glib/gmain.c:2702
No locals.
#29 0x00007ffff2c0b2a8 in g_main_context_iterate (context=0x9d3180, block=<value optimized out>, dispatch=<value optimized out>, self=<value optimized out>)
    at /build/buildd/glib2.0-2.26.0/glib/gmain.c:2780
        max_priority = 2147483647
        timeout = 500
        some_ready = 1
        nfds = 10
        allocated_nfds = -222199408
        fds = <value optimized out>
        __PRETTY_FUNCTION__ = "g_main_context_iterate"
#30 0x00007ffff2c0b7b5 in g_main_loop_run (loop=0xceb040) at /build/buildd/glib2.0-2.26.0/glib/gmain.c:2988
        self = 0x99bfb0
        __PRETTY_FUNCTION__ = "g_main_loop_run"
#31 0x00007ffff70913e7 in IA__gtk_main () at /build/buildd/gtk+2.0-2.22.0/gtk/gtkmain.c:1237
        tmp_list = 0xa04890
        functions = 0x0
        init = 0xa505c0
        loop = <value optimized out>
#32 0x00000000004f4d76 in main (argc=1, argv=0x7fffffffe368) at main.c:1661
        connection = 0xa22368
        error = 0x0
        nm_proxy = 0xa04890
        mainwin = 0xa505c0
        folderview = 0xb7d010
        icon = 0xa32de0
        crash_file_present = <value optimized out>
        asked_for_migration = <value optimized out>
        start_done = <value optimized out>
        plug_list = 0x0
        never_ran = <value optimized out>
        start = {tv_sec = 1286060265, tv_usec = 18255}
        end = {tv_sec = 1286060266, tv_usec = 322120}
        __FUNCTION__ = "main"
Comment 1 Michael Rasmussen 2010-10-03 01:33:04 UTC
Could this have something to do with it?

Warning

g_relation_index has been deprecated since version 2.26 and should not be used in newly-written code. Rarely used API

Creates an index on the given field. Note that this must be called before any records are added to the GRelation.
Comment 2 users 2010-10-03 13:47:35 UTC
Changes related to this bug have been committed.
Please check latest CVS and update the bug accordingly.
You can also get the patch from:
http://www.colino.net/claws-mail/

2010-10-03 [colin]	3.7.6cvs53

	* src/folder.c
	* src/folder.h
	* src/imap.c
	* src/mh.c
	* src/procmsg.c
		Get rid of GRelation which were, mostly, used as
		GHashTables. Probably fixes bug #2277, 'Segfault when
		loading inbox for the first time'
Comment 3 Reed Loden 2010-10-03 22:34:41 UTC
Thanks, Colin. I can confirm 3.7.6cvs53 works for me. :)
Comment 4 Colin Leroy 2010-10-04 09:01:35 UTC
Thanks for the feedback.

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