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 335622 - Click Description field causes Evolution to crash.
Click Description field causes Evolution to crash.
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: .General
2.10.x
Other All
: High critical
: ---
Assigned To: gtk-bugs
gtk-bugs
: 329356 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2006-03-23 07:55 UTC by Li Yuan
Modified: 2007-06-15 21:19 UTC
See Also:
GNOME target: ---
GNOME version: 2.15/2.16


Attachments
simple test app that reproduce the problem (1.39 KB, text/plain)
2006-10-10 15:22 UTC, Erwann Chenede
  Details
proposed patch (660 bytes, patch)
2006-10-10 15:23 UTC, Erwann Chenede
none Details | Review

Description Li Yuan 2006-03-23 07:55:39 UTC
1) Launch -> Evolution
2) Goto "Calendars" -> Right click on  the empty field
3) Choose "New Appointment"
4) When a dialog pop-up -> Click on "Time" column
5) Insert "s" into it. -> A notification dialog pop-up
6) Click "OK" -> Click on "Description" box
7) Evolution crash.
Comment 1 Sergej Kotliar 2006-03-23 09:48:07 UTC
This is where this stack trace belongs ;-)
Hope it's useful.

Thread 1 (Thread -1209100096 (LWP 4588))

  • #0 __kernel_vsyscall
  • #1 raise
    from /lib/libc.so.6
  • #2 abort
    from /lib/libc.so.6
  • #3 g_logv
    from /usr/lib/libglib-2.0.so.0
  • #4 g_log
    from /usr/lib/libglib-2.0.so.0
  • #5 g_assert_warning
    from /usr/lib/libglib-2.0.so.0
  • #6 gtk_text_view_new_with_buffer
    from /usr/lib/libgtk-x11-2.0.so.0
  • #7 gtk_text_view_new_with_buffer
    from /usr/lib/libgtk-x11-2.0.so.0
  • #8 gtk_marshal_BOOLEAN__VOID
    from /usr/lib/libgtk-x11-2.0.so.0
  • #9 g_value_set_static_boxed
    from /usr/lib/libgobject-2.0.so.0
  • #10 g_closure_invoke
    from /usr/lib/libgobject-2.0.so.0
  • #11 g_signal_override_class_closure
    from /usr/lib/libgobject-2.0.so.0
  • #12 g_signal_emit_valist
    from /usr/lib/libgobject-2.0.so.0
  • #13 g_signal_emit
    from /usr/lib/libgobject-2.0.so.0
  • #14 gtk_widget_get_default_style
    from /usr/lib/libgtk-x11-2.0.so.0
  • #15 gtk_propagate_event
    from /usr/lib/libgtk-x11-2.0.so.0
  • #16 gtk_main_do_event
    from /usr/lib/libgtk-x11-2.0.so.0
  • #17 gdk_add_client_message_filter
    from /usr/lib/libgdk-x11-2.0.so.0
  • #18 g_main_context_dispatch
    from /usr/lib/libglib-2.0.so.0
  • #19 g_main_context_check
    from /usr/lib/libglib-2.0.so.0
  • #20 g_main_loop_run
    from /usr/lib/libglib-2.0.so.0
  • #21 bonobo_main
    from /usr/lib/libbonobo-2.so.0
  • #22 POA_GNOME_Evolution_DataServer_InterfaceCheck__fini
  • #23 __libc_start_main
    from /lib/libc.so.6
  • #24 ??

Comment 2 Li Yuan 2006-03-24 06:09:17 UTC
this is my trace, a little different:)


  • #0 ??
  • #1 ??
  • #2 ??
  • #3 ??
  • #4 __waitpid_nocancel
    from /lib/tls/libpthread.so.0
  • #5 libgnomeui_segv_handle
    from /home/liyuan/garnome/lib/libgnomeui-2.so.0
  • #6 <signal handler called>
  • #7 ??
  • #8 ??
  • #9 ??
  • #10 ??
  • #11 raise
    from /lib/tls/libc.so.6
  • #12 abort
    from /lib/tls/libc.so.6
  • #13 g_logv
    from /home/liyuan/garnome/lib/libglib-2.0.so.0
  • #14 g_log
    from /home/liyuan/garnome/lib/libglib-2.0.so.0
  • #15 g_assert_warning
    from /home/liyuan/garnome/lib/libglib-2.0.so.0
  • #16 gtk_text_view_start_selection_drag
    from /home/liyuan/garnome/lib/libgtk-x11-2.0.so.0
  • #17 gtk_text_view_button_press_event
    from /home/liyuan/garnome/lib/libgtk-x11-2.0.so.0
  • #18 _gtk_marshal_BOOLEAN__BOXED
    from /home/liyuan/garnome/lib/libgtk-x11-2.0.so.0
  • #19 g_type_class_meta_marshal
    from /home/liyuan/garnome/lib/libgobject-2.0.so.0
  • #20 g_closure_invoke
    from /home/liyuan/garnome/lib/libgobject-2.0.so.0
  • #21 signal_emit_unlocked_R
    from /home/liyuan/garnome/lib/libgobject-2.0.so.0
  • #22 g_signal_emit_valist
    from /home/liyuan/garnome/lib/libgobject-2.0.so.0
  • #23 g_signal_emit
    from /home/liyuan/garnome/lib/libgobject-2.0.so.0
  • #24 gtk_widget_event_internal
    from /home/liyuan/garnome/lib/libgtk-x11-2.0.so.0
  • #25 gtk_propagate_event
    from /home/liyuan/garnome/lib/libgtk-x11-2.0.so.0
  • #26 gtk_main_do_event
    from /home/liyuan/garnome/lib/libgtk-x11-2.0.so.0
  • #27 gdk_event_dispatch
    from /home/liyuan/garnome/lib/libgdk-x11-2.0.so.0
  • #28 g_main_context_dispatch
    from /home/liyuan/garnome/lib/libglib-2.0.so.0
  • #29 g_main_context_iterate
    from /home/liyuan/garnome/lib/libglib-2.0.so.0
  • #30 g_main_loop_run
    from /home/liyuan/garnome/lib/libglib-2.0.so.0
  • #31 bonobo_main
    from /home/liyuan/garnome/lib/libbonobo-2.so.0
  • #32 main
    at main.c line 610

Comment 3 Christian Kirbach 2006-03-25 15:54:04 UTC
unique stack trace

changing product to gtk+

Thanks for the bug report. Unfortunately, that stack trace is not very useful in determining the cause of the crash. Can you get us one with debugging symbols? Please see http://live.gnome.org/GettingTraces for more information on how to do so.

please install gtk+ debugging libraries
Comment 4 Li Yuan 2006-03-27 06:19:30 UTC
First we input a wrong format time in time column, and then clicked on the textview, the gtk_text_view_start_selection_drag was invoked, and an evolution notification dialog pop-up, so textview had no chance to invoke  gtk_text_view_end_selection_drag. So when we click textview again, the gtk_text_view_start_selection_drag will crash because 
g_assert (text_view->selection_drag_handler == 0); failed.
Here is the trace.

  • #0 ??
  • #1 ??
  • #2 ??
  • #3 ??
  • #4 __waitpid_nocancel
    from /lib/tls/libpthread.so.0
  • #5 libgnomeui_segv_handle
    from /home/liyuan/garnome/lib/libgnomeui-2.so.0
  • #6 <signal handler called>
  • #7 ??
  • #8 ??
  • #9 ??
  • #10 ??
  • #11 raise
    from /lib/tls/libc.so.6
  • #12 abort
    from /lib/tls/libc.so.6
  • #13 g_logv
    from /home/liyuan/garnome/lib/libglib-2.0.so.0
  • #14 g_log
    from /home/liyuan/garnome/lib/libglib-2.0.so.0
  • #15 g_assert_warning
    from /home/liyuan/garnome/lib/libglib-2.0.so.0
  • #16 gtk_text_view_start_selection_drag
    at gtktextview.c line 5687
  • #17 gtk_text_view_button_press_event
    at gtktextview.c line 3993
  • #18 _gtk_marshal_BOOLEAN__BOXED
    from /home/liyuan/garnome/lib/libgtk-x11-2.0.so.0
  • #19 g_type_class_meta_marshal
    from /home/liyuan/garnome/lib/libgobject-2.0.so.0
  • #20 g_closure_invoke
    from /home/liyuan/garnome/lib/libgobject-2.0.so.0
  • #21 signal_emit_unlocked_R
    from /home/liyuan/garnome/lib/libgobject-2.0.so.0
  • #22 g_signal_emit_valist
    from /home/liyuan/garnome/lib/libgobject-2.0.so.0
  • #23 g_signal_emit
    from /home/liyuan/garnome/lib/libgobject-2.0.so.0
  • #24 gtk_widget_event_internal
    at gtkwidget.c line 3735
  • #25 IA__gtk_widget_event
    at gtkwidget.c line 3538
  • #26 IA__gtk_propagate_event
    at gtkmain.c line 2175
  • #27 IA__gtk_main_do_event
    at gtkmain.c line 1397
  • #28 gdk_event_dispatch
    at gdkevents-x11.c line 2291
  • #29 g_main_context_dispatch
    from /home/liyuan/garnome/lib/libglib-2.0.so.0
  • #30 g_main_context_iterate
    from /home/liyuan/garnome/lib/libglib-2.0.so.0
  • #31 g_main_loop_run
    from /home/liyuan/garnome/lib/libglib-2.0.so.0
  • #32 bonobo_main
    from /home/liyuan/garnome/lib/libbonobo-2.so.0
  • #33 main
    at main.c line 610

Comment 5 Matthias Clasen 2006-03-27 06:49:46 UTC
Thanks for this analysis. 
We should probably end the drag when we get a grab notify.
Comment 6 Matthias Clasen 2006-03-27 06:52:04 UTC
It actually reveals this bug as a dupe of another bug which is even
cited in the textview sources.

*** This bug has been marked as a duplicate of 74620 ***
Comment 7 padraig.obriain 2006-09-29 14:50:00 UTC
I have reopened the bug because I do not believe it it a dup of 74620.

The button press event causes the dialog to be displayed with the stack trace below and the button release event is sent to the GtkMessageDialog so gtk_text_view_button_release_event is not called.

 fe367c37 pollsys  (81a5650, 7, 8045398, 0)
 fe31c792 poll     (81a5650, 7, 5cc4) + 52
 fe3f1637 g_main_context_iterate (809dd58, 1, 1, 80807d0) + 397
 fe3f1c70 g_main_loop_run (8528460) + 1b8
 fe6b3df1 gtk_dialog_run (8592b28, 8045580, 8571f28, fe90ffd4, fe35f7b1, 804549c) + 135
 fef4946c on_date_entry_focus_out (8390210, 8406f70, 8571190) + 70
 fe723555 _gtk_marshal_BOOLEAN__BOXED (8571f28, 8045580, 2, 804563c, 804559c, 0) + 71
 fe92a41b g_closure_invoke (8571f28, 8045580, 2, 804563c, 804559c) + 107
 fe93e3e7 signal_emit_unlocked_R (81bbf48, 0, 8390210, 80457bc, 804563c) + ab7
 fe93d126 g_signal_emit_valist (8390210, 49, 0, 80458b0) + 662
 fe93d51d g_signal_emit (8390210, 49, 0, 8406f70, 80458d4) + 25
 fe82870a gtk_widget_event_internal (8390210, 8406f70) + 212
 fe828399 gtk_widget_event (8390210, 8406f70) + 99
 fe83421d do_focus_change (8390210, 0) + 75
 fe8345c2 gtk_window_real_set_focus (81fa398, 85158f8, 80f8758) + 106
 fe93f107 g_cclosure_marshal_VOID__OBJECT (81c7520, 0, 2, 8045afc, 8045a5c, fe8344bc) + 5b
 fe92a6fc g_type_class_meta_marshal (81c7520, 0, 2, 8045afc, 8045a5c, 1a0) + 40
 fe92a41b g_closure_invoke (81c7520, 0, 2, 8045afc, 8045a5c) + 107
 fe93e23a signal_emit_unlocked_R (80a26a8, 0, 81fa398, 0, 8045afc) + 90a
 fe93d388 g_signal_emit_valist (81fa398, 82, 0, 8045d68) + 8c4
 fe93d51d g_signal_emit (81fa398, 82, 0, 85158f8) + 25
 fe82fbd4 _gtk_window_internal_set_focus (81fa398, 85158f8) + 50
 fe82907b gtk_widget_real_grab_focus (85158f8, 80f6860) + b7
 fe93e7f1 g_cclosure_marshal_VOID__VOID (81b8978, 0, 1, 8045f3c, 8045e9c, fe828fc4) + 55
 fe92a6fc g_type_class_meta_marshal (81b8978, 0, 1, 8045f3c, 8045e9c, a4) + 40
 fe92a41b g_closure_invoke (81b8978, 0, 1, 8045f3c, 8045e9c) + 107
 fe93e23a signal_emit_unlocked_R (81a3670, 0, 85158f8, 0, 8045f3c) + 90a
 fe93d388 g_signal_emit_valist (85158f8, 37, 0, 80461a8) + 8c4
 fe93d51d g_signal_emit (85158f8, 37, 0) + 25
 fe828f2b gtk_widget_grab_focus (85158f8) + 53
 fe7d05c8 gtk_text_view_button_press_event (85158f8, 85a76a0, 80f6860) + 24
 
Comment 8 André Klapper 2006-10-02 08:46:38 UTC
removing ancient gnome target milestone.
Comment 9 Erwann Chenede 2006-10-10 15:22:37 UTC
Created attachment 74414 [details]
simple test app that reproduce the problem
Comment 10 Erwann Chenede 2006-10-10 15:23:27 UTC
Created attachment 74415 [details] [review]
proposed patch
Comment 11 Erwann Chenede 2006-10-10 15:24:43 UTC
Find attached a simple test app which reproduce the problem experienced in evolution.

To reproduce : 
- click on the textview 
- click Ok in the dialog box 
- click again in the textview

then :

Gtk-ERROR **: file gtktextview.c: line 5665: assertion failed: (text_view->selection_drag_handler == 0)
aborting...
Abort (core dumped)

The problem is that GtkEntry has a callback bound to focus_out_event
which if a condition isn't met popups up a dialog and then sets the focus back
to the GtkEntry.

The problem is that the focus_out event here is generated by a call to 
gtk_widget_grab_focus in gtk_text_view_button_press_event.

So at that stage the textview is in "selection" mode hence 
text_view->selection_drag_handler != 0 but doesn't have the focus anymore.

So the next time the user press on the textview 
gtk_text_view_button_press_event tries to initiate a drag again and 
reaches the g_assert in gtk_text_view_start_selection_drag.

Two possible solutions would be to :
- end the selection when the textview is focused out by the entry focus grab.
  But strangly enough gtk_text_view_focus_out_event isn't called when the entry 
  grabs the focus. 
- end the selection if the textview doesn't the focus anymore in  
  selection_motion_event_handler.

Find attached a patch which implements the second (bandaid) solution.
Comment 12 Matthias Clasen 2006-12-20 20:52:37 UTC
So, it turns out that calling grab_focus from a focus-out event handler is a seriously bad idea.

What I am doing for now is to replace the assert in gtk_text_view_start_selection_drag by an early return. 

There are several bugs open about crashes because people manage to trigger
that assertion.
Comment 13 Matthias Clasen 2006-12-20 20:58:41 UTC
2006-12-20  Matthias Clasen  <mclasen@redhat.com>

        * gtk/gtktextview.c (gtk_text_view_start_selection_drag):
        Silently return if a drag is already in progress, rather
        than asserting.  (#335622, Li Yuan, testcase by Erwann Chenede)

Comment 14 André Klapper 2006-12-22 01:35:46 UTC
i wonder if bug 329356, bug 376779, bug 355701, bug 371288, bug 362892, bug 351671 and bug 344826 are duplicates of this one here?
Comment 15 André Klapper 2007-06-15 21:19:49 UTC
*** Bug 329356 has been marked as a duplicate of this bug. ***