GNOME Bugzilla – Bug 344826
Gedit crashes when clicking the right mouse button while holding down left button
Last modified: 2007-10-06 13:56:52 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
+ Trace 68829
Thread 1 (Thread -1208240448 (LWP 13088))
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
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)
Upgradet to Gedit 2.14.3 No change in behaviour.
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.
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.
Quote: I included all output from start of the gdm session. I ment gdb, not gdm.
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:
+ Trace 68899
Thread 1 (Thread -1225677120 (LWP 27469))
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.
*** Bug 342708 has been marked as a duplicate of this bug. ***
*** Bug 346650 has been marked as a duplicate of this bug. ***
*** Bug 346972 has been marked as a duplicate of this bug. ***
Are you guys able to reproduce it with gtksourceview test-widget?
<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 ()
+ Trace 69247
Thread 1 (Thread -1225316672 (LWP 3431))
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 ()
+ Trace 69248
Thread 1 (Thread -1225427264 (LWP 20970))
*** Bug 347369 has been marked as a duplicate of this bug. ***
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."
*** Bug 349295 has been marked as a duplicate of this bug. ***
now gedit depends on gtk 2.10 and this crash doesn't happen anymore... I am not sure we can consider it fixed though...
It would be nice to have a fix for 2.14. Was this crash due to a gtk+ bug?
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...
I confirm I cannot reproduce it on gedit 2.15 (with gtk+ 2.10).
*** Bug 354195 has been marked as a duplicate of this bug. ***
seems to work fine for me too with Ubuntu edgy
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. ;-)
*** Bug 357234 has been marked as a duplicate of this bug. ***
*** Bug 360012 has been marked as a duplicate of this bug. ***
It seems this crash can be reproduced on 2.16 too (see bug #366906)
*** Bug 366906 has been marked as a duplicate of this bug. ***
*** Bug 356477 has been marked as a duplicate of this bug. ***
*** Bug 368088 has been marked as a duplicate of this bug. ***
*** Bug 369989 has been marked as a duplicate of this bug. ***
*** Bug 368768 has been marked as a duplicate of this bug. ***
*** Bug 378567 has been marked as a duplicate of this bug. ***
*** Bug 378716 has been marked as a duplicate of this bug. ***
*** Bug 382226 has been marked as a duplicate of this bug. ***
*** Bug 384614 has been marked as a duplicate of this bug. ***
*** Bug 385079 has been marked as a duplicate of this bug. ***
*** Bug 362892 has been marked as a duplicate of this bug. ***
*** Bug 420728 has been marked as a duplicate of this bug. ***
*** Bug 434441 has been marked as a duplicate of this bug. ***
*** Bug 424204 has been marked as a duplicate of this bug. ***
*** Bug 424411 has been marked as a duplicate of this bug. ***
*** Bug 436732 has been marked as a duplicate of this bug. ***
*** Bug 462023 has been marked as a duplicate of this bug. ***
*** Bug 462840 has been marked as a duplicate of this bug. ***
*** Bug 463888 has been marked as a duplicate of this bug. ***
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'?
I'm using 2.19.90 and I'm unable to reproduce. Can this be closed?
*** Bug 456748 has been marked as a duplicate of this bug. ***
Ok, let's close this.
*** Bug 482276 has been marked as a duplicate of this bug. ***