After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 337503 - Renaming a folder twice crashes Evolution
Renaming a folder twice crashes Evolution
Status: RESOLVED FIXED
Product: Evolution Exchange
Classification: Deprecated
Component: Connector
2.6.0
Other Linux
: Normal major
: ---
Assigned To: Milan Crha
Ximian Connector QA
: 544109 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2006-04-06 13:59 UTC by Sushma Rai
Modified: 2008-08-14 12:49 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch for the above bug (639 bytes, patch)
2006-07-12 05:40 UTC, Vandana
needs-work Details | Review
proposed eds patch (6.79 KB, patch)
2008-08-08 16:37 UTC, Milan Crha
committed Details | Review

Description Sushma Rai 2006-04-06 13:59:18 UTC
Rename a folder, and rename it once again. Evolution crashes.
Tested for both Calendar and Contacts folders.

(gdb) bt
  • #0 ??
  • #1 ??
  • #2 ??
  • #3 ??
  • #4 __waitpid_nocancel
    from /lib/tls/libpthread.so.0
  • #5 libgnomeui_segv_handle
    at gnome-ui-init.c line 786
  • #6 segv_redirect
    at main.c line 422
  • #7 <signal handler called>
  • #8 strrchr
    from /lib/tls/libc.so.6
  • #9 ??
  • #10 ??
  • #11 xfer_folder
    at exchange-hierarchy-webdav.c line 425
  • #12 exchange_hierarchy_xfer_folder
    at exchange-hierarchy.c line 269
  • #13 exchange_account_xfer_folder
    at exchange-account.c line 572
  • #14 e_exchange_calendar_commit
    at exchange-calendar.c line 452
  • #15 epl_invoke
    at e-plugin.c line 863
  • #16 e_plugin_invoke
    at e-plugin.c line 652
  • #17 ech_commit
    at e-config.c line 1274
  • #18 e_config_commit
    at e-config.c line 1025
  • #19 ec_dialog_response
    at e-config.c line 868
  • #20 IA__g_cclosure_marshal_VOID__INT
    at gmarshal.c line 216
  • #21 IA__g_closure_invoke
    at gclosure.c line 492
  • #22 signal_emit_unlocked_R
    at gsignal.c line 2485
  • #23 IA__g_signal_emit_valist
    at gsignal.c line 2244
  • #24 IA__g_signal_emit
    at gsignal.c line 2288
  • #25 IA__gtk_dialog_response
    at gtkdialog.c line 858
  • #26 action_widget_activated
    at gtkdialog.c line 557
  • #27 IA__g_cclosure_marshal_VOID__VOID
  • #28 IA__g_closure_invoke
    at gclosure.c line 492
  • #29 signal_emit_unlocked_R
    at gsignal.c line 2485
  • #30 IA__g_signal_emit_valist
    at gsignal.c line 2244
  • #31 IA__g_signal_emit
    at gsignal.c line 2288
  • #32 IA__gtk_button_clicked
    at gtkbutton.c line 834
  • #33 gtk_real_button_released
    at gtkbutton.c line 1369
  • #34 IA__g_cclosure_marshal_VOID__VOID
    at gmarshal.c line 77
  • #35 g_type_class_meta_marshal
    at gclosure.c line 569
  • #36 IA__g_closure_invoke
    at gclosure.c line 492
  • #37 signal_emit_unlocked_R
    at gsignal.c line 2415
  • #38 IA__g_signal_emit_valist
    at gsignal.c line 2244
  • #39 IA__g_signal_emit
    at gsignal.c line 2288
  • #40 IA__gtk_button_released
    at gtkbutton.c line 826
  • #41 gtk_button_button_release
    at gtkbutton.c line 1262
  • #42 _gtk_marshal_BOOLEAN__BOXED
    at gtkmarshalers.c line 83
  • #43 g_type_class_meta_marshal
    at gclosure.c line 569
  • #44 IA__g_closure_invoke
    at gclosure.c line 492
  • #45 signal_emit_unlocked_R
    at gsignal.c line 2523
  • #46 IA__g_signal_emit_valist
    at gsignal.c line 2254
  • #47 IA__g_signal_emit
    at gsignal.c line 2288
  • #48 gtk_widget_event_internal
    at gtkwidget.c line 3735
  • #49 IA__gtk_propagate_event
    at gtkmain.c line 2169
  • #50 IA__gtk_main_do_event
    at gtkmain.c line 1406
  • #51 gdk_event_dispatch
    at gdkevents-x11.c line 2291
  • #52 IA__g_main_context_dispatch
    at gmain.c line 1934
  • #53 g_main_context_iterate
    at gmain.c line 2565
  • #54 IA__g_main_loop_run
    at gmain.c line 2769
  • #55 bonobo_main
    at bonobo-main.c line 312
  • #56 main
    at main.c line 610

Comment 1 Vandana 2006-07-12 05:40:31 UTC
Created attachment 68793 [details] [review]
Patch for the above bug
Comment 2 Sankar P 2006-07-13 05:12:04 UTC
You need to create the patch using "cvs diff -up" format

Also, I dont understand how the g_object_unref is not necessary. When we are stealing the old value from the Hashtable and substituting it with the new value, dont we need to unref it to avoid the leak?
Comment 3 Vandana 2006-07-13 06:42:02 UTC
There is a g_object_ref missing somewhere . This should be gthe culprint. Will need to find that out...
Comment 4 Matthew Barnes 2008-03-11 00:51:41 UTC
Bumping version to a stable release.
Comment 5 Bharath Acharya 2008-08-06 08:20:38 UTC
*** Bug 544109 has been marked as a duplicate of this bug. ***
Comment 6 Bharath Acharya 2008-08-06 08:21:42 UTC
(evolution:4275): evolution-exchange-storage-CRITICAL **:
e_folder_get_physical_uri: assertion `E_IS_FOLDER (folder)' failed

Program received signal SIGSEGV, Segmentation fault.

Thread 1 (Thread 0xb6134720 (LWP 4275))

  • #0 strrchr
    from /lib/libc.so.6
  • #1 xfer_folder
    at exchange-hierarchy-webdav.c line 430
  • #2 exchange_hierarchy_xfer_folder
    at exchange-hierarchy.c line 268
  • #3 exchange_account_xfer_folder
    at exchange-account.c line 598
  • #4 e_exchange_calendar_commit
    at exchange-calendar.c line 466
  • #5 epl_invoke
    at e-plugin.c line 1034
  • #6 e_plugin_invoke
    at e-plugin.c line 768
  • #7 ech_commit
    at e-config.c line 1269
  • #8 e_config_commit
    at e-config.c line 1017
  • #9 ec_dialog_response
    at e-config.c line 860
  • #10 g_cclosure_marshal_VOID
    from /usr/lib/libgobject-2.0.so.0
  • #11 g_closure_invoke
    from /usr/lib/libgobject-2.0.so.0
  • #12 ??
    from /usr/lib/libgobject-2.0.so.0
  • #13 g_signal_emit_valist
    from /usr/lib/libgobject-2.0.so.0
  • #14 g_signal_emit
    from /usr/lib/libgobject-2.0.so.0
  • #15 gtk_dialog_response
    from /usr/lib/libgtk-x11-2.0.so.0
  • #16 g_cclosure_marshal_VOID__VOID
    from /usr/lib/libgobject-2.0.so.0
  • #17 g_closure_invoke
    from /usr/lib/libgobject-2.0.so.0
  • #18 ??
    from /usr/lib/libgobject-2.0.so.0
  • #19 g_signal_emit_valist
    from /usr/lib/libgobject-2.0.so.0
  • #20 g_signal_emit
    from /usr/lib/libgobject-2.0.so.0
  • #21 gtk_button_clicked
    from /usr/lib/libgtk-x11-2.0.so.0
  • #22 ??
    from /usr/lib/libgtk-x11-2.0.so.0
  • #23 g_cclosure_marshal_VOID__VOID
    from /usr/lib/libgobject-2.0.so.0
  • #24 ??
    from /usr/lib/libgobject-2.0.so.0
  • #25 g_closure_invoke
    from /usr/lib/libgobject-2.0.so.0
  • #26 ??
    from /usr/lib/libgobject-2.0.so.0
  • #27 g_signal_emit_valist
    from /usr/lib/libgobject-2.0.so.0
  • #28 g_signal_emit
    from /usr/lib/libgobject-2.0.so.0
  • #29 gtk_button_released
    from /usr/lib/libgtk-x11-2.0.so.0
  • #30 ??
    from /usr/lib/libgtk-x11-2.0.so.0
  • #31 ??
    from /usr/lib/libgtk-x11-2.0.so.0
  • #32 ??
    from /usr/lib/libgobject-2.0.so.0
  • #33 g_closure_invoke
    from /usr/lib/libgobject-2.0.so.0
  • #34 ??
    from /usr/lib/libgobject-2.0.so.0
  • #35 g_signal_emit_valist
    from /usr/lib/libgobject-2.0.so.0
  • #36 g_signal_emit
    from /usr/lib/libgobject-2.0.so.0
  • #37 ??
    from /usr/lib/libgtk-x11-2.0.so.0
  • #38 gtk_propagate_event
    from /usr/lib/libgtk-x11-2.0.so.0
  • #39 gtk_main_do_event
    from /usr/lib/libgtk-x11-2.0.so.0
  • #40 ??
    from /usr/lib/libgdk-x11-2.0.so.0
  • #41 g_main_context_dispatch
    from /usr/lib/libglib-2.0.so.0
  • #42 ??
    from /usr/lib/libglib-2.0.so.0
  • #43 g_main_loop_run
    from /usr/lib/libglib-2.0.so.0
  • #44 bonobo_main
    from /usr/lib/libbonobo-2.so.0
  • #45 main
    at main.c line 783

Comment 7 Matthew Barnes 2008-08-06 13:49:10 UTC
Possible dupe of bug #312854.
Comment 8 Milan Crha 2008-08-08 16:37:44 UTC
Created attachment 116161 [details] [review]
proposed eds patch

for evolution-data-server;

It's quite simple for the crash itself, just removed one unref. I also removed code for unused variables and made sure we unref only that what we removed. It wasn't the problem for me, but I believe it's better in this way.

The reason why I just removed that unref in xfer function it that the reference counting seems right to me, as far as I can tell, when removing source from the
hierarchy, it's unreffed at
* exchange-hierarchy-webdav.c::hierarchy_removed_folder: 212 (when removing
  from the hash table)
* exchange-account.c::hierarchy_removed_folder: 461, 462, 464

resulting in 1 ref_count left, which is correct, I think, because it's still shown in the UI in this moment.

When adding folder to the hierarchy, it has been reffed in
* exchange-hierarchy-webdav.c::hierarchy_new_folder: 197
* exchange-account.c::hierarchy_new_folder: 376, 384, 393, 405

Resulting in 6 references. One has been removed a few lines below the add in xfer function, and yet another one when calling properties of the calendar source, in exchange-account.c::exchange_account_rescan_tree:333.

(Line numbers in exchange-account.c are before the patch).

I tried also to get the source's physical_uri before removing it from the hierarchy, but it let to the source being shown in the source selector (the tree) in the UI. When I removed the fresh_folders tracker hash table, which has been there for nothing anyway, then it (seems to me) works better.

One thing is bad, I'm not for 100% sure whether it leaks the source or not. The source ends with ref_count=1 after the xfer function, but I didn't get the response for it to decrease to zero. Maybe more investigation is required here.
Comment 9 Matthew Barnes 2008-08-08 17:01:53 UTC
Wouldn't it be easier to use GDestroyNotify callbacks in the 'folders' hash table so you don't have to unref things manually?
Comment 10 Srinivasa Ragavan 2008-08-11 04:52:10 UTC
Bharath: Ping
Comment 11 Milan Crha 2008-08-12 15:28:53 UTC
(In reply to comment #9)
> Wouldn't it be easier to use GDestroyNotify callbacks in the 'folders' hash
> table so you don't have to unref things manually?

Yes, it can be reworked too, you've right.
Comment 12 Bharath Acharya 2008-08-14 08:14:04 UTC
Patch looked fine to me, but while testing it I renamed a calendar twice and boom it disappeared from the view. Its still there on the server but only a restart would reflect it back in Evolution. Lot other secrets revealed ;) The patch looks ok so this fixed the issue in here but exposed some hidden issues. My guess is some rename fixes which were checked in recently. Patch looks good. Lets handle the regressions seen in a different bug.
Comment 13 Milan Crha 2008-08-14 12:49:40 UTC
Committed to trunk. Committed revision 9349.

I'm sorry to say, but I cannot reproduce the behavior of missing calendar after the second rename on my machine. I recall some strangeness with colors, where sometimes the color has been lost after the rename and sometimes not, but now, I have no color all the time, the item goes away and in next second is back, with new name. It should be fine, I guess. (I have that one as last thing in my list of calendars, so the scrollbar didn't move done after the addition of the calendar, but I doubt it's your issue.)