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 344826 - Gedit crashes when clicking the right mouse button while holding down left button
Gedit crashes when clicking the right mouse button while holding down left bu...
Status: RESOLVED FIXED
Product: gedit
Classification: Applications
Component: general
2.16.x
Other All
: Urgent critical
: ---
Assigned To: Gedit maintainers
Gedit maintainers
: Juanen 346650 346972 347369 349295 354195 356477 357234 360012 362892 366906 368088 368768 369989 378567 378716 382226 384614 385079 420728 424204 424411 434441 436732 456748 462023 462840 463888 482276 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2006-06-14 00:26 UTC by Frode Petersen
Modified: 2007-10-06 13:56 UTC
See Also:
GNOME target: ---
GNOME version: 2.15/2.16


Attachments
gdb trace of crashed gedit (18.04 KB, text/plain)
2006-06-14 23:56 UTC, Frode Petersen
Details

Description Frode Petersen 2006-06-14 00:26:53 UTC
Steps to reproduce:
Steps to reproduce the problem:
1. Start selecting text with the mouse (don't release left button)
2. Click right mouse button (release immediately)
3. Release left button (menu disappears)
4. Move mouse (selected area changes size)
5. Click left button below or to the right of the start of selected
area

Actual Results:
Gedit crashes and asks whether it should restart or not


Expected Results:
After step 3: Selected area should be cleared, and mouse movements
should perform as if moved over unselected text

How often does this happen?
Every time

Stack trace:
(gdb) run
Starting program: /usr/bin/gedit
Reading symbols from shared object read from target memory...done.
Loaded system supplied DSO at 0x432e3000
[Thread debugging using libthread_db enabled]
[New Thread -1208240448 (LWP 13088)]

Gtk-ERROR **: file gtktextview.c: line 5670 (gtk_text_view_start_selection_drag): assertion failed: (text_view->selection_drag_handler == 0)
aborting...

Program received signal SIGABRT, Aborted.
[Switching to Thread -1208240448 (LWP 13088)]
0x432e3402 in __kernel_vsyscall ()
(gdb) thread apply all bt

Thread 1 (Thread -1208240448 (LWP 13088))

  • #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_source_view_get_show_line_numbers
    from /usr/lib/libgtksourceview-1.0.so.0
  • #9 gtk_marshal_BOOLEAN__VOID
    from /usr/lib/libgtk-x11-2.0.so.0
  • #10 g_value_set_static_boxed
    from /usr/lib/libgobject-2.0.so.0
  • #11 g_closure_invoke
    from /usr/lib/libgobject-2.0.so.0
  • #12 g_signal_override_class_closure
    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_widget_get_default_style
  • #16 gtk_propagate_event
    from /usr/lib/libgtk-x11-2.0.so.0
  • #17 gtk_main_do_event
    from /usr/lib/libgtk-x11-2.0.so.0
  • #18 gdk_add_client_message_filter
    from /usr/lib/libgdk-x11-2.0.so.0
  • #19 g_main_context_dispatch
    from /usr/lib/libglib-2.0.so.0
  • #20 g_main_context_check
    from /usr/lib/libglib-2.0.so.0
  • #21 g_main_loop_run
    from /usr/lib/libglib-2.0.so.0
  • #22 gtk_main
    from /usr/lib/libgtk-x11-2.0.so.0
  • #23 main
    at gedit.c line 566


Other information:
When marking text using left click and drag: If accidently clicking the
right button, the context menu appears. If right button is clicked and
immediately released, the context menu stays until a menu item is
clicked on, or the text area is left clicked. After this has occured,
the end "handle" of the marked area is not fixed; it still follows the
mouse's movements. 
The effect is that the marked area is increased/decreased when moving
the mouse while no buttons are pressed.
When clicking in the text below or to the right of the start of the
marked area, Gedit crashes. (If clicking to the left or above, area
remains selected and Gedit does not crash.)

Additional Information:
Gedit version 2.14.2
Comment 1 Frode Petersen 2006-06-14 00:34:22 UTC
Oops, here is the correct text of the field "Other information": (Changes marked with 'underscore'.

Other information:
When marking text using left click and drag: If accidently clicking the
right button, the context menu appears. If right button is clicked and
immediately released, the context menu stays 
  _until the left button is released._  
After this, the end "handle" of the marked area is not fixed; it still follows the mouse's movements. 
The effect is that the marked area is increased/decreased when moving
the mouse while no buttons are pressed.
When clicking in the text below or to the right of the start of the
marked area, Gedit crashes. (If clicking to the left or above, area
remains selected and Gedit does not crash.)

Gnome 2.14 (Fedora Core 5)
Comment 2 Frode Petersen 2006-06-14 00:44:00 UTC
Upgradet to Gedit 2.14.3
No change in behaviour.
Comment 3 Fabio Bonelli 2006-06-14 08:44:38 UTC
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.
Comment 4 Frode Petersen 2006-06-14 23:56:58 UTC
Created attachment 67369 [details]
gdb trace of crashed gedit

Trace made while error box is shown (asking whether to restart, quit or inform developers).

I included all output from start of the gdm session. It seems to me that all symbols are loaded, so if this isn't what you asked for, please tell me what I did wrong.
Comment 5 Frode Petersen 2006-06-16 10:24:00 UTC
Quote:
I included all output from start of the gdm session.

I ment gdb, not gdm.
Comment 6 Steve Frécinaux 2006-06-17 21:35:30 UTC
I can reproduce it within gedit but I can't within gtk-demo nor with the test widget from gtksourceview. In both latter cases, the reproduction steps fail when the selection should change despite no button is kept pushed.

I get the same assertion warning as shown is the bug report, coming from GtkTextView:

Gtk-ERROR **: file gtktextview.c: line 5670 (gtk_text_view_start_selection_drag) : assertion failed: (text_view->selection_drag_handler == 0)
aborting...

And here is the backtrace I get:

Thread 1 (Thread -1225677120 (LWP 27469))

  • #0 __kernel_vsyscall
  • #1 raise
    from /lib/tls/i686/cmov/libc.so.6
  • #2 abort
    from /lib/tls/i686/cmov/libc.so.6
  • #3 IA__g_logv
  • #4 IA__g_log
    at gmessages.c line 517
  • #5 IA__g_assert_warning
    at gmessages.c line 552
  • #6 gtk_text_view_starts_display_line
    from /usr/lib/libgtk-x11-2.0.so.0
  • #7 gtk_text_view_starts_display_line
    from /usr/lib/libgtk-x11-2.0.so.0
  • #8 gtk_source_view_button_press_event
    at gtksourceview.c line 2296
  • #9 _gtk_marshal_BOOLEAN__BOXED
    from /usr/lib/libgtk-x11-2.0.so.0
  • #10 g_type_class_meta_marshal
    at gclosure.c line 567
  • #11 IA__g_closure_invoke
    at gclosure.c line 490
  • #12 signal_emit_unlocked_R
    at gsignal.c line 2476
  • #13 IA__g_signal_emit_valist
    at gsignal.c line 2207
  • #14 IA__g_signal_emit
    at gsignal.c line 2241
  • #15 gtk_widget_activate
    from /usr/lib/libgtk-x11-2.0.so.0
  • #16 gtk_propagate_event
    from /usr/lib/libgtk-x11-2.0.so.0
  • #17 gtk_main_do_event
    from /usr/lib/libgtk-x11-2.0.so.0
  • #18 _gdk_events_queue
    from /usr/lib/libgdk-x11-2.0.so.0
  • #19 IA__g_main_context_dispatch
    at gmain.c line 1916
  • #20 g_main_context_iterate
    at gmain.c line 2547
  • #21 IA__g_main_loop_run
    at gmain.c line 2751
  • #22 gtk_main
    from /usr/lib/libgtk-x11-2.0.so.0
  • #23 main
    at ../../gedit/gedit.c line 570

Comment 7 Paolo Maggi 2006-06-20 14:22:06 UTC
I can reproduce this crash on Dapper.
I cannot reproduce it with tomboy or leafpad so it may be due to gtksourceview or gedit itself.

I cannot reproduce it with gtk+/gedit from CVS HEAD.
Comment 8 Paolo Maggi 2006-06-20 14:25:25 UTC
*** Bug 342708 has been marked as a duplicate of this bug. ***
Comment 9 Damien Durand 2006-07-05 14:12:51 UTC
*** Bug 346650 has been marked as a duplicate of this bug. ***
Comment 10 Steve Frécinaux 2006-07-08 10:31:46 UTC
*** Bug 346972 has been marked as a duplicate of this bug. ***
Comment 11 Paolo Maggi 2006-07-08 15:55:51 UTC
Are you guys able to reproduce it with gtksourceview test-widget?
Comment 12 Paolo Maggi 2006-07-08 16:44:50 UTC
<paolo> I can try with it
<paolo> I mean the snippets manager one
<paolo> does not crash in the snippets manager
<paolo> so it should really be gedit
<paolo> do you guys have some program with a text view inside a notebook?
* paolo tries with screem
<paolo> screem is using gtksourceview and does not crash too
<paolo> and it is also using a notebook
<paolo> so problem should be related to gedit-view, gedit-notebook or gedit-window
<paolo> the problem is understanding why gtk_text_view_start_selection_drag is called when in the wrong state
<paolo> any idea on how can I get the -dbg packages for gedit and gtksourceview?

-------------

Backtrace was generated from '/usr/bin/gedit'

(no debugging symbols found)
Using host libthread_db library "/lib/tls/i686/cmov/libthread_db.so.1".
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
[Thread debugging using libthread_db enabled]
[New Thread -1225316672 (LWP 3431)]
0xffffe410 in __kernel_vsyscall ()

Thread 1 (Thread -1225316672 (LWP 3431))

  • #0 __kernel_vsyscall
  • #1 __waitpid_nocancel
    from /lib/tls/i686/cmov/libpthread.so.0
  • #2 libgnomeui_module_info_get
    from /usr/lib/libgnomeui-2.so.0
  • #3 <signal handler called>
  • #4 __kernel_vsyscall
  • #5 raise
    from /lib/tls/i686/cmov/libc.so.6
  • #6 abort
    from /lib/tls/i686/cmov/libc.so.6
  • #7 g_logv
    from /usr/lib/libglib-2.0.so.0
  • #8 g_log
    from /usr/lib/libglib-2.0.so.0
  • #9 g_assert_warning
    from /usr/lib/libglib-2.0.so.0
  • #10 gtk_text_view_start_selection_drag
    at gtktextview.c line 5668
  • #11 gtk_text_view_button_press_event
    at gtktextview.c line 3996
  • #12 gtk_source_view_get_marker_pixbuf
    from /usr/lib/libgtksourceview-1.0.so.0
  • #13 _gtk_marshal_BOOLEAN__BOXED
    at gtkmarshalers.c line 83
  • #14 g_cclosure_new_swap
    from /usr/lib/libgobject-2.0.so.0
  • #15 g_closure_invoke
    from /usr/lib/libgobject-2.0.so.0
  • #16 g_signal_stop_emission
    from /usr/lib/libgobject-2.0.so.0
  • #17 g_signal_emit_valist
    from /usr/lib/libgobject-2.0.so.0
  • #18 g_signal_emit
    from /usr/lib/libgobject-2.0.so.0
  • #19 gtk_widget_event_internal
    at gtkwidget.c line 3751
  • #20 IA__gtk_propagate_event
    at gtkmain.c line 2218
  • #21 IA__gtk_main_do_event
    at gtkmain.c line 1447
  • #22 gdk_event_dispatch
    at gdkevents-x11.c line 2291
  • #23 g_main_context_dispatch
    from /usr/lib/libglib-2.0.so.0
  • #24 g_main_context_check
    from /usr/lib/libglib-2.0.so.0
  • #25 g_main_loop_run
    from /usr/lib/libglib-2.0.so.0
  • #26 IA__gtk_main
    at gtkmain.c line 1026
  • #27 main
  • #0 __kernel_vsyscall

Comment 13 Paolo Maggi 2006-07-08 17:13:25 UTC
New stack trace with all symbols:

---------

Backtrace was generated from '/usr/bin/gedit'

Using host libthread_db library "/lib/tls/i686/cmov/libthread_db.so.1".
[Thread debugging using libthread_db enabled]
[New Thread -1225427264 (LWP 20970)]
0xffffe410 in __kernel_vsyscall ()

Thread 1 (Thread -1225427264 (LWP 20970))

  • #0 __kernel_vsyscall
  • #1 __waitpid_nocancel
    from /lib/tls/i686/cmov/libpthread.so.0
  • #2 libgnomeui_module_info_get
    from /usr/lib/libgnomeui-2.so.0
  • #3 <signal handler called>
  • #4 __kernel_vsyscall
  • #5 raise
    from /lib/tls/i686/cmov/libc.so.6
  • #6 abort
    from /lib/tls/i686/cmov/libc.so.6
  • #7 IA__g_logv
  • #8 IA__g_log
    at gmessages.c line 517
  • #9 IA__g_assert_warning
    at gmessages.c line 552
  • #10 gtk_text_view_start_selection_drag
    at gtktextview.c line 5668
  • #11 gtk_text_view_button_press_event
    at gtktextview.c line 3996
  • #12 gtk_source_view_button_press_event
    at gtksourceview.c line 2121
  • #13 _gtk_marshal_BOOLEAN__BOXED
    at gtkmarshalers.c line 83
  • #14 g_type_class_meta_marshal
    at gclosure.c line 567
  • #15 IA__g_closure_invoke
    at gclosure.c line 490
  • #16 signal_emit_unlocked_R
    at gsignal.c line 2476
  • #17 IA__g_signal_emit_valist
    at gsignal.c line 2207
  • #18 IA__g_signal_emit
    at gsignal.c line 2241
  • #19 gtk_widget_event_internal
    at gtkwidget.c line 3751
  • #20 IA__gtk_propagate_event
    at gtkmain.c line 2218
  • #21 IA__gtk_main_do_event
    at gtkmain.c line 1447
  • #22 gdk_event_dispatch
    at gdkevents-x11.c line 2291
  • #23 IA__g_main_context_dispatch
    at gmain.c line 1916
  • #24 g_main_context_iterate
    at gmain.c line 2547
  • #25 IA__g_main_loop_run
    at gmain.c line 2751
  • #26 IA__gtk_main
    at gtkmain.c line 1026
  • #27 main
    at gedit.c line 566
  • #0 __kernel_vsyscall

Comment 14 Sergej Kotliar 2006-07-13 09:55:16 UTC
*** Bug 347369 has been marked as a duplicate of this bug. ***
Comment 15 Sebastien Bacher 2006-07-28 15:22:17 UTC
ubuntu bug about that: https://launchpad.net/distros/ubuntu/+source/gedit/+bug/52886

"gedit crashes when clicking mouse-buttons in text-section

Gedit 2.14.3:
I wonder if any developer or other user can reproduce this; it happens on 2 of my dapper systems:
1) start gedit
2) put your mouse in the middle of the empty screen
3) don't move your mouse while doing the following steps:
4) push left mouse button & hold
5) push right mouse button, release
6) release left mouse button
7) click left mouse button
gedit crashes! if not, repeat 4-7, but often it's not necessary. Gedit also crashes if you have text in the screen."
Comment 16 Karsten Bräckelmann 2006-07-30 14:23:19 UTC
*** Bug 349295 has been marked as a duplicate of this bug. ***
Comment 17 Paolo Borelli 2006-08-21 10:32:53 UTC
now gedit depends on gtk 2.10 and this crash doesn't happen anymore... I am not sure we can consider it fixed though...
Comment 18 Paolo Maggi 2006-08-21 10:38:27 UTC
It would be nice to have a fix for 2.14.

Was this crash due to a gtk+ bug?
Comment 19 Paolo Borelli 2006-08-21 10:40:27 UTC
well, reading the comments above no, it looks like a gedit bug or a gedit+gtk interaction. However with gtk 2.10 the bug doesn't happen anymore...
Comment 20 Paolo Maggi 2006-08-25 15:41:17 UTC
I confirm I cannot reproduce it on gedit 2.15 (with gtk+ 2.10).
Comment 21 Karsten Bräckelmann 2006-09-04 01:44:34 UTC
*** Bug 354195 has been marked as a duplicate of this bug. ***
Comment 22 Sebastien Bacher 2006-09-07 16:42:23 UTC
seems to work fine for me too with Ubuntu edgy
Comment 23 Frode Petersen 2006-09-08 11:06:19 UTC
I still have Gedit 2.14.3 (2.15 hasn't trickled through the repos yet, FC5), but gtk+ is at 2.10. This combination still has the same behaviour. Could there be changes in API usage in Gedit between 2.14.3 and 2.15 that caused the fix (and indicates where the original error was) ?

I'm just thinking out loud; I have no knowledge of the code. ;-)
Comment 24 Karsten Bräckelmann 2006-09-22 21:19:10 UTC
*** Bug 357234 has been marked as a duplicate of this bug. ***
Comment 25 Karsten Bräckelmann 2006-10-05 21:03:25 UTC
*** Bug 360012 has been marked as a duplicate of this bug. ***
Comment 26 Paolo Maggi 2006-10-29 15:25:48 UTC
It seems this crash can be reproduced on 2.16 too (see bug #366906)
Comment 27 Paolo Maggi 2006-10-29 15:26:45 UTC
*** Bug 366906 has been marked as a duplicate of this bug. ***
Comment 28 Paolo Maggi 2006-10-29 15:49:01 UTC
*** Bug 356477 has been marked as a duplicate of this bug. ***
Comment 29 André Klapper 2006-10-31 16:18:54 UTC
*** Bug 368088 has been marked as a duplicate of this bug. ***
Comment 30 Karsten Bräckelmann 2006-11-03 14:05:57 UTC
*** Bug 369989 has been marked as a duplicate of this bug. ***
Comment 31 Karsten Bräckelmann 2006-11-03 14:06:08 UTC
*** Bug 368768 has been marked as a duplicate of this bug. ***
Comment 32 Susana 2006-11-23 20:42:52 UTC
*** Bug 378567 has been marked as a duplicate of this bug. ***
Comment 33 Susana 2006-11-24 13:37:13 UTC
*** Bug 378716 has been marked as a duplicate of this bug. ***
Comment 34 André Klapper 2006-12-05 23:12:21 UTC
*** Bug 382226 has been marked as a duplicate of this bug. ***
Comment 35 Bruno Boaventura 2006-12-11 14:55:46 UTC
*** Bug 384614 has been marked as a duplicate of this bug. ***
Comment 36 Baptiste Mille-Mathias 2006-12-12 15:07:17 UTC
*** Bug 385079 has been marked as a duplicate of this bug. ***
Comment 37 Sebastien Bacher 2006-12-26 15:12:07 UTC
*** Bug 362892 has been marked as a duplicate of this bug. ***
Comment 38 Pedro Villavicencio 2007-03-22 00:05:31 UTC
*** Bug 420728 has been marked as a duplicate of this bug. ***
Comment 39 palfrey 2007-04-29 22:12:14 UTC
*** Bug 434441 has been marked as a duplicate of this bug. ***
Comment 40 palfrey 2007-05-02 11:40:59 UTC
*** Bug 424204 has been marked as a duplicate of this bug. ***
Comment 41 palfrey 2007-05-02 11:41:43 UTC
*** Bug 424411 has been marked as a duplicate of this bug. ***
Comment 42 Pedro Villavicencio 2007-05-07 23:02:11 UTC
*** Bug 436732 has been marked as a duplicate of this bug. ***
Comment 43 Iestyn Pryce 2007-07-31 08:49:30 UTC
*** Bug 462023 has been marked as a duplicate of this bug. ***
Comment 44 Iestyn Pryce 2007-08-02 16:39:46 UTC
*** Bug 462840 has been marked as a duplicate of this bug. ***
Comment 45 Iestyn Pryce 2007-08-06 12:08:23 UTC
*** Bug 463888 has been marked as a duplicate of this bug. ***
Comment 46 Frode Petersen 2007-08-06 14:12:36 UTC
I was just wondering... I now have Gedit 2.15.9 and the problem seems solved in that version. Should this bug's status be considered changed to 'solved'?
Comment 47 Diego Escalante Urrelo (not reading bugmail) 2007-08-22 01:00:24 UTC
I'm using 2.19.90 and I'm unable to reproduce.
Can this be closed?
Comment 48 Paolo Borelli 2007-09-13 12:31:31 UTC
*** Bug 456748 has been marked as a duplicate of this bug. ***
Comment 49 Paolo Borelli 2007-09-21 18:55:52 UTC
Ok, let's close this.
Comment 50 Susana 2007-10-06 13:56:52 UTC
*** Bug 482276 has been marked as a duplicate of this bug. ***