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 334464 - Copy-paste of calendar events causes Evolution to lock up
Copy-paste of calendar events causes Evolution to lock up
Status: RESOLVED NOTGNOME
Product: evolution
Classification: Applications
Component: Calendar
2.6.x (obsolete)
Other Linux
: Normal critical
: ---
Assigned To: evolution-calendar-maintainers
Evolution QA team
Depends on:
Blocks:
 
 
Reported: 2006-03-13 19:35 UTC by Luke Hutchison
Modified: 2013-09-13 00:47 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch for Evolution 2.7.90 (584 bytes, patch)
2006-07-29 07:15 UTC, Matthew Barnes
reviewed Details | Review
Patch for Evolution 2.6.2 (582 bytes, patch)
2006-07-29 07:22 UTC, Matthew Barnes
reviewed Details | Review

Description Luke Hutchison 2006-03-13 19:35:20 UTC
Copy-paste of calendar events causes Evolution to lock up.  This was the case in at least Evo 2.5.90 to 2.5.92.

Restarting Evo usually shows the pasted event in the correct place, but you have to kill Evo and restart to actually see it.
Comment 1 André Klapper 2006-03-21 00:31:21 UTC
cannot reproduce this, how exactly do you copy and paste? which view are you in?
Comment 2 André Klapper 2006-03-21 00:32:06 UTC
Also, can you provide us with a stack trace? Please see http://live.gnome.org/GettingTraces for more information on how to do so.
Thanks in advance.
Comment 3 Luke Hutchison 2006-03-21 02:34:50 UTC
Regular calendar day view, create an event called "Test" then right-click on the event and go "Copy", then click elsewhere on the same day and right-click then go "Paste".  Locks up 100% of the time.  With Evo locked up, attaching gdb gives the following:

(gdb) thread apply all bt

Thread 1 (Thread -1208948544 (LWP 7069))

  • #0 ??
  • #1 __lll_mutex_lock_wait
    from /lib/libc.so.6
  • #2 _L_lock_43
    from /lib/libc.so.6
  • #3 ptmalloc_lock_all
    from /lib/libc.so.6
  • #4 fork
    from /lib/libc.so.6
  • #5 fork
    from /lib/libpthread.so.0
  • #6 gnome_init_with_popt_table
    from /usr/lib/libgnomeui-2.so.0
  • #7 <signal handler called>
  • #8 ??
  • #9 raise
    from /lib/libc.so.6
  • #10 abort
    from /lib/libc.so.6
  • #11 __libc_message
    from /lib/libc.so.6
  • #12 _int_free
    from /lib/libc.so.6
  • #13 free
    from /lib/libc.so.6
  • #14 icalvalue_free
    at icalvalue.c line 611
  • #15 icalproperty_free
    at icalproperty.c line 234
  • #16 icalcomponent_free
    at icalcomponent.c line 240
  • #17 free_icalcomponent
    at e-cal-component.c line 300
  • #18 e_cal_component_finalize
    at e-cal-component.c line 389
  • #19 IA__g_object_unref
    at gobject.c line 1762
  • #20 e_calendar_view_add_event
    at e-calendar-view.c line 394
  • #21 clipboard_get_text_cb
    at e-calendar-view.c line 827
  • #22 request_text_received_func
    at gtkclipboard.c line 952
  • #23 selection_received
    at gtkclipboard.c line 864
  • #24 _gtk_marshal_VOID__BOXED_UINT
  • #25 IA__g_closure_invoke
    at gclosure.c line 490
  • #26 signal_emit_unlocked_R
    at gsignal.c line 2438
  • #27 IA__g_signal_emit_valist
    at gsignal.c line 2197
  • #28 IA__g_signal_emit_by_name
    at gsignal.c line 2265
  • #29 gtk_selection_retrieval_report
    at gtkselection.c line 2447
  • #30 IA__gtk_selection_convert
    at gtkselection.c line 965
  • #31 IA__gtk_clipboard_request_contents
    at gtkclipboard.c line 916
  • #32 IA__gtk_clipboard_request_text
    at gtkclipboard.c line 988
  • #33 e_calendar_view_paste_clipboard
    at e-calendar-view.c line 857
  • #34 on_paste
    at e-calendar-view.c line 1571
  • #35 ep_activate
    at e-popup.c line 304
  • #36 IA__g_cclosure_marshal_VOID__VOID
    at gmarshal.c line 77
  • #37 IA__g_closure_invoke
    at gclosure.c line 490
  • #38 signal_emit_unlocked_R
    at gsignal.c line 2438
  • #39 IA__g_signal_emit_valist
    at gsignal.c line 2197
  • #40 IA__g_signal_emit
    at gsignal.c line 2241
  • #41 IA__gtk_widget_activate
    at gtkwidget.c line 3763
  • #42 IA__gtk_menu_shell_activate_item
    at gtkmenushell.c line 1057
  • #43 gtk_menu_shell_button_release
    at gtkmenushell.c line 663
  • #44 gtk_menu_button_release
    at gtkmenu.c line 2571
  • #45 _gtk_marshal_BOOLEAN__BOXED
    at gtkmarshalers.c line 83
  • #46 g_type_class_meta_marshal
    at gclosure.c line 567
  • #47 IA__g_closure_invoke
    at gclosure.c line 490
  • #48 signal_emit_unlocked_R
    at gsignal.c line 2476
  • #49 IA__g_signal_emit_valist
    at gsignal.c line 2207
  • #50 IA__g_signal_emit
    at gsignal.c line 2241
  • #51 gtk_widget_event_internal
    at gtkwidget.c line 3732
  • #52 IA__gtk_propagate_event
    at gtkmain.c line 2185
  • #53 IA__gtk_main_do_event
    at gtkmain.c line 1422
  • #54 gdk_event_dispatch
    at gdkevents-x11.c line 2291
  • #55 IA__g_main_context_dispatch
    at gmain.c line 1916
  • #56 g_main_context_iterate
    at gmain.c line 2547
  • #57 IA__g_main_loop_run
    at gmain.c line 2751
  • #58 bonobo_main
    from /usr/lib/libbonobo-2.so.0
  • #59 main
    at main.c line 611
  • #60 __libc_start_main
    from /lib/libc.so.6
  • #61 _start

Comment 4 André Klapper 2006-03-21 03:02:40 UTC
hmm, still cannot reproduce this - today's evo2.5.92cvs-head on suse9.3 here. how do you set up that appointment? directly in the day view by typing, or do you use the appointment editor?

could be an e-d-s crash.
Comment 5 Luke Hutchison 2006-03-21 03:27:41 UTC
# rpm -q evolution evolution-data-server
evolution-2.6.0-1
evolution-data-server-1.5.92-1

(from FC5)

I set up an appointment by clicking on an empty place on the calendar, then typing.

The weird thing is that it says "<signal handler called>" but it's just frozen, no segfault.  I don't think I've seen that before...

It looks like it's trying to free a null value or something.  Yes, looks more like e-d-s.
Comment 6 André Klapper 2006-03-21 04:22:47 UTC
err.. is it really intended to use a stable evo release (2.6.0) together with an unstable e-d-s release (1.5.92)? this sinÄt good at all, update e-d-s to 1.6.0.
Comment 7 Luke Hutchison 2006-03-21 05:33:00 UTC
I'm using what has been available in Rawhide for more than a week.  There is a mismatch in the version numbers there.  I'm assuming that is intentional.
Comment 8 Luke Hutchison 2006-03-21 05:35:21 UTC
In fact I just checked and FC5 *ships* with the above RPM versions.
Comment 9 brianherman 2006-04-17 23:15:09 UTC
The windows clipboard has annoyances also!
Comment 10 Poornima 2006-07-05 11:44:09 UTC
Luke: Is this still happening ? I tried on 'Personal', 'Groupwise' and 'Exchange' calendar, it is not reproducible in Evolution 2.6.2.
Comment 11 Karsten Bräckelmann 2006-07-05 11:57:40 UTC
Without that code being changed, there is absolutely no point in asking if it still happens and setting it to NEEDINFO.

Detailed Description given, good stacktrace. REOPENing.


(Please don't resort to NEEDINFO'ing bugs, rather than working at the code.)
Comment 12 Karsten Bräckelmann 2006-07-05 12:03:02 UTC
That said, can't reproduce this issue either. WORKSFORME following the given details.
Comment 13 Luke Hutchison 2006-07-05 17:29:22 UTC
Yes, I still have 100% reproducibility with:

$ rpm -q evolution evolution-data-server
evolution-2.6.2-1.fc5.5
evolution-data-server-1.6.2-1.fc5.1

Do you want another stack trace for this version, or is the one above close enough?

Comment 14 Matthew Barnes 2006-07-29 07:02:41 UTC
I believe I have a solution for this.

This same bug is filed downstream in Red Hat's Bugzilla:
http://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=167157

This one was a beast to track down, but in e_calendar_view_add_event() we have this logic (slightly reformatted):

    uid = NULL;
    if (e_cal_create_object (client, e_cal_component_get_icalcomponent (comp),
                             &uid, NULL)) {
            if (uid) {
                    e_cal_component_set_uid (comp, uid);
                    g_free (uid);
            }

            ...
    }

The string 'uid' is owned by 'client', so we have no business freeing it here.  Removing the g_free() call eliminates the crash on paste.
Comment 15 Matthew Barnes 2006-07-29 07:15:22 UTC
Created attachment 69862 [details] [review]
Patch for Evolution 2.7.90
Comment 16 Matthew Barnes 2006-07-29 07:22:43 UTC
Created attachment 69864 [details] [review]
Patch for Evolution 2.6.2
Comment 17 Chenthill P 2006-08-02 06:41:52 UTC
The memory for the uid is owned by the caller. You can see that the uid which is received from e_cal_create_object is not freed in ECal anywhere. 

The uid has been duped in e-cal.c : cal_object_created_cb and has not been freed anywhere. It is asssigned to the uid passed by the caller at e-cal.c: e_cal_create_object: 4349
if (uid)
 *uid = our_op->uid;
So the caller is responsible for free'ing it.

The traces definitely show that there is a crash. Unfortunately, am not able to reproduce the issue. 
Comment 18 Matthew Barnes 2006-08-02 23:47:15 UTC
Chen, thanks for the clarification.  I think I have it now.

Luke indicated that he's using Fedora, so I had a look at the patches we have downstream.  I found that we are still including patches from bug #309079 in evolution-data-server, even though Harish rejected them.  In particular, have a look at attachment #48376 [details].

So my patch was simply masking the problem.  I didn't realize that ownership of the string is transferred to the caller.

This is clearly a downstream bug, so I think this bug can be closed here.

Luke, please see [1] for further updates on this issue.

[1] http://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=167157
Comment 19 André Klapper 2006-08-03 21:20:32 UTC
mbarnes: okay, thanks for the feedback.