Re: TnyAccountTreeModel now uses the new TnyFolderStoreIface API



On Fri, 2006-08-25 at 16:11 +0200, Philip Van Hoof wrote:
> On Fri, 2006-08-25 at 14:09 +0000, Philip Van Hoof wrote:
> > TnyAccountTreeModel now uses the new TnyFolderStoreIface API
> > 
> > because now reference counting is more correct I however found a bug.
> > 
> > If you open a folder, switch offline/online, and then reopen the folder
> > and click a message .. a crash in camel happens IF you use the mmap
> > patch. Else the crash doesn't happen.
> > 
> > I will soon figure out what that is. It's something with the summary
> > being unmapped yet instances of it still being used.
> 
> It's also funny because it seems to be a race condition. Can everybody
> please start testing going offline followed by going online and in both
> contexts opening folders and messages while having your debugger open?

I think I found the problem.

I think it's the message that is still visible in the TnyMsgIface that
causes the unref of the header (when the online/offline switch has
happened and the new message is selected) which causes the final uncache
of the folder too early (the camel stuff is still needed once to do
something for the gtktreeview, like returning a header for the last
time).

I know I don't make a lot sense. But feel free to help me fix it if you
understood what I just wrote ;-)

(gdb) bt
#0  0xb6e79717 in camel_message_info_ptr (mi=0x8368848, id=2) at camel-folder-summary.c:2994
#1  0xb7234b2c in tny_header_get_to (self=0x8619ec8) at tny-header.c:387
#2  0xb7251b57 in tny_header_iface_get_to (self=0x8619ec8) at tny-header-iface.c:350
#3  0xb7247a72 in tny_header_view_set_header (self=0x0, header=0x8619ec8) at tny-header-view.c:73
#4  0xb724be6e in tny_header_view_iface_set_header (self=0x80c2510, header=0x8368848)
    at tny-header-view-iface.c:42
#5  0xb6e5591a in tny_moz_embed_msg_view_set_msg (self=0x80c2498, msg=0x83a3220)
    at tny-moz-embed-msg-view.c:112
#6  0xb724bb6e in tny_msg_view_iface_set_msg (self=0x80c2498, msg=0x8368848) at tny-msg-view-iface.c:86
#7  0x0804c41c in on_header_view_tree_selection_changed (selection=0x0, user_data=0x0)
    at tny-summary-view.c:328
#8  0xb738d423 in IA__g_cclosure_marshal_VOID__VOID (closure=0x8264640, return_value=0x0,
    n_param_values=1, param_values=0xbfaaf75c, invocation_hint=0xbfaaf64c, marshal_data=0x804c36c)
    at gmarshal.c:77
#9  0xb738179f in IA__g_closure_invoke (closure=0x8264640, return_value=0x0, n_param_values=0,
    param_values=0x0, invocation_hint=0x0) at gclosure.c:490
#10 0xb73902ea in signal_emit_unlocked_R (node=0x826b400, detail=0, instance=0x80de580,
    emission_return=0x0, instance_and_params=0xbfaaf75c) at gsignal.c:2438
#11 0xb7391b19 in IA__g_signal_emit_valist (instance=0x80de580, signal_id=203, detail=0,
    var_args=<value optimized out>) at gsignal.c:2197
#12 0xb7391e89 in IA__g_signal_emit (instance=0x0, signal_id=0, detail=0) at gsignal.c:2241
#13 0xb78e0c57 in _gtk_tree_selection_internal_select_node () from /usr/lib/libgtk-x11-2.0.so.0
#14 0xb78f307e in gtk_tree_view_scroll_to_cell () from /usr/lib/libgtk-x11-2.0.so.0
#15 0xb78fb9ca in gtk_tree_view_set_model () from /usr/lib/libgtk-x11-2.0.so.0
#16 0xb782a850 in _gtk_marshal_BOOLEAN__BOXED () from /usr/lib/libgtk-x11-2.0.so.0
#17 0xb738116f in g_type_class_meta_marshal (closure=0x80ab048, return_value=0x0, n_param_values=0,
    param_values=0xbfaafd7c, invocation_hint=0x0, marshal_data=0x0) at gclosure.c:567
#18 0xb738179f in IA__g_closure_invoke (closure=0x80ab048, return_value=0x0, n_param_values=0,
    param_values=0x0, invocation_hint=0x0) at gclosure.c:490
---Type <return> to continue, or q <return> to quit---
#19 0xb73909ce in signal_emit_unlocked_R (node=0x80ab078, detail=0, instance=0x80c8330,
    emission_return=0xbfaaff3c, instance_and_params=0xbfaafd7c) at gsignal.c:2476
#20 0xb7391886 in IA__g_signal_emit_valist (instance=0x80c8330, signal_id=30, detail=0,
    var_args=0xbfaaffc0 "����\b�\f\b0\203\f\b!�\220�0\203\f\b�\206\n\b") at gsignal.c:2207
#21 0xb7391e89 in IA__g_signal_emit (instance=0x0, signal_id=0, detail=0) at gsignal.c:2241
#22 0xb790cc4f in gtk_widget_activate () from /usr/lib/libgtk-x11-2.0.so.0
#23 0xb7828fcd in gtk_propagate_event () from /usr/lib/libgtk-x11-2.0.so.0
#24 0xb78293db in gtk_main_do_event () from /usr/lib/libgtk-x11-2.0.so.0
#25 0xb76ccddc in _gdk_events_queue () from /usr/lib/libgdk-x11-2.0.so.0
#26 0xb727a8c6 in IA__g_main_context_dispatch (context=0x8085050) at gmain.c:1916
#27 0xb727d986 in g_main_context_iterate (context=0x8085050, block=1, dispatch=1, self=0x80861a0)
    at gmain.c:2547
#28 0xb727dca8 in IA__g_main_loop_run (loop=0x8347bf0) at gmain.c:2751
#29 0xb78286d5 in gtk_main () from /usr/lib/libgtk-x11-2.0.so.0
#30 0x0804aec4 in main (argc=1, argv=0xbfab0294) at tny-main.c:115
(gdb)

-- 
Philip Van Hoof, software developer at x-tend 
home: me at pvanhoof dot be 
gnome: pvanhoof at gnome dot org 
work: vanhoof at x-tend dot be 
http://www.pvanhoof.be - http://www.x-tend.be




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]