Bug #6884 2006-03-26 10:09

berli

mouse drag&drop broken

When I select some text, and at the same time double-click and move the mouse (needs some practice..), the mouse freezes with the drag&drop selection cursor. I also can't click outside the window or anything. Keyboard keeps working, so I can continue editing with the keyboard, and exit CB with Alt-F4 - at which point the mouse starts working again.

This is rather annyoing, since of course I never do it on purpose, but after some time of editing, it always happens.

One way to work around this would be if you can provide an option to disable the selection drag&drop (or if there is, I didn't find it..) - I never voluntarily want to use it anyway. Also, most other editors don't have such a (rather weird IMO) feature - but anyway, this report is about the bug with it.

Assuming this has more to do with the underlying editing component or window manager than CB, here's the version information from Debian's reportbug:

ii  libc6-dev                     2.3.6-4    GNU C Library: Development Librari
ii  libwxgtk2.6-0                 2.6.1.2    wxWidgets Cross-platform C++ GUI t
ii  wx2.6-headers                 2.6.1.2    wxWidgets Cross-platform C++ GUI t
ii  libatk1.0-0               1.11.3-1       The ATK accessibility toolkit
ii  libc6                     2.3.6-4        GNU C Library: Shared libraries an
ii  libesd-alsa0 [libesd0]    0.2.36-3       Enlightened Sound Daemon (ALSA) -
ii  libexpat1                 1.95.8-3.1     XML parsing C library - runtime li
ii  libgcc1                   1:4.0.3-1      GCC support library
ii  libglib2.0-0              2.10.1-2       The GLib library of C routines
ii  libglu1-xorg [libglu1]    6.9.0.dfsg.1-5 Mesa OpenGL utility library [X.Org
ii  libgtk2.0-0               2.8.13-1       The GTK+ graphical user interface
ii  libjpeg62                 6b-12          The Independent JPEG Group's JPEG
ii  libpango1.0-0             1.12.0-2       Layout and rendering of internatio
ii  libpng12-0                1.2.8rel-5     PNG library - runtime
ii  libstdc++6                4.0.3-1        The GNU Standard C++ Library v3
ii  libtiff4                  3.8.0-3        Tag Image File Format (TIFF) libra
ii  xlibmesa-gl [libgl1]      6.9.0.dfsg.1-5 Mesa 3D graphics library [X.Org]
ii  zlib1g                    1:1.2.3-11     compression library - runtime
Category
Application::Error
Group
 
Status
Closed
Close date
2006-05-09 12:02
Assigned to
 
ID_24639 2006-03-26 14:14

Umm what version of C::B RC2?

If so get this nightly build.

http://forums.codeblocks.org/index.php?topic=2705.0

Also, you need wx2.6.2. You have wx2.6.1. I think the problem is that you have an old wx version.

mandrav 2006-03-26 15:05

This is a known scintilla/wxscintilla (editor) bug under gtk.

berli 2006-03-27 01:45
Ok, I upgraded now to CB from SVN, and WX 2.6.3 (SVN), and it seems like the freeze bug is indeed "gone" there, instead of freezing, CB simlpy aborts now. Since I'm already here, this is the backtrace I got:

#0  0xb728e7c7 in raise () from /lib/tls/libc.so.6
#1  0xb729006b in abort () from /lib/tls/libc.so.6
#2  0xb72c5545 in __fsetlocking () from /lib/tls/libc.so.6
#3  0xb72cbb97 in malloc_usable_size () from /lib/tls/libc.so.6
#4  0xb72cc032 in free () from /lib/tls/libc.so.6
#5  0xb747d5b1 in operator delete () from /usr/lib/libstdc++.so.6
#6  0xb747d60d in operator delete[] () from /usr/lib/libstdc++.so.6
#7  0xb7716197 in source_drag_data_get () from /usr/local/lib/libwx_gtk2u_core-2.6.so.0
#8  0xb700ca3d in _gtk_marshal_VOID__OBJECT_BOXED_UINT_UINT () from /usr/lib/libgtk-x11-2.0.so.0
#9  0xb6d16cb9 in g_closure_invoke () from /usr/lib/libgobject-2.0.so.0
#10 0xb6d26c0a in g_signal_stop_emission () from /usr/lib/libgobject-2.0.so.0
#11 0xb6d28490 in g_signal_emit_valist () from /usr/lib/libgobject-2.0.so.0
#12 0xb6d2baf0 in g_signal_emit_by_name () from /usr/lib/libgobject-2.0.so.0
#13 0xb6f8f86e in _gtk_drag_source_handle_event () from /usr/lib/libgtk-x11-2.0.so.0
#14 0xb700c1f6 in _gtk_marshal_VOID__BOXED_UINT_UINT () from /usr/lib/libgtk-x11-2.0.so.0
#15 0xb6d16cb9 in g_closure_invoke () from /usr/lib/libgobject-2.0.so.0
#16 0xb6d26c0a in g_signal_stop_emission () from /usr/lib/libgobject-2.0.so.0
#17 0xb6d28490 in g_signal_emit_valist () from /usr/lib/libgobject-2.0.so.0
#18 0xb6d2baf0 in g_signal_emit_by_name () from /usr/lib/libgobject-2.0.so.0
#19 0xb7051854 in _gtk_selection_notify () from /usr/lib/libgtk-x11-2.0.so.0
#20 0xb7051ac2 in gtk_selection_convert () from /usr/lib/libgtk-x11-2.0.so.0
#21 0xb6f8aa31 in gtk_drag_get_data () from /usr/lib/libgtk-x11-2.0.so.0
#22 0xb7716be2 in target_drag_drop () from /usr/local/lib/libwx_gtk2u_core-2.6.so.0
#23 0xb700ad2c in _gtk_marshal_BOOLEAN__OBJECT_INT_INT_UINT () from /usr/lib/libgtk-x11-2.0.so.0
#24 0xb6d16cb9 in g_closure_invoke () from /usr/lib/libgobject-2.0.so.0
#25 0xb6d26c0a in g_signal_stop_emission () from /usr/lib/libgobject-2.0.so.0
#26 0xb6d281fe in g_signal_emit_valist () from /usr/lib/libgobject-2.0.so.0
#27 0xb6d2baf0 in g_signal_emit_by_name () from /usr/lib/libgobject-2.0.so.0
#28 0xb6f8fc3b in _gtk_drag_source_handle_event () from /usr/lib/libgtk-x11-2.0.so.0
#29 0xb6f8d22d in gtk_drag_set_default_icon () from /usr/lib/libgtk-x11-2.0.so.0
#30 0xb6f8d2ce in gtk_drag_set_default_icon () from /usr/lib/libgtk-x11-2.0.so.0
#31 0xb6f8d2ce in gtk_drag_set_default_icon () from /usr/lib/libgtk-x11-2.0.so.0
#32 0xb6f8d2ce in gtk_drag_set_default_icon () from /usr/lib/libgtk-x11-2.0.so.0
#33 0xb6f8d2ce in gtk_drag_set_default_icon () from /usr/lib/libgtk-x11-2.0.so.0
#34 0xb6f8d2ce in gtk_drag_set_default_icon () from /usr/lib/libgtk-x11-2.0.so.0
#35 0xb6f8d2ce in gtk_drag_set_default_icon () from /usr/lib/libgtk-x11-2.0.so.0
#36 0xb6f8d2ce in gtk_drag_set_default_icon () from /usr/lib/libgtk-x11-2.0.so.0
#37 0xb6f8d2ce in gtk_drag_set_default_icon () from /usr/lib/libgtk-x11-2.0.so.0
#38 0xb6f8d409 in _gtk_drag_dest_handle_event () from /usr/lib/libgtk-x11-2.0.so.0
#39 0xb700911c in gtk_main_do_event () from /usr/lib/libgtk-x11-2.0.so.0
#40 0xb722634a in _gdk_events_queue () from /usr/lib/libgdk-x11-2.0.so.0
#41 0xb6ca211c in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#42 0xb6ca55ab in g_main_context_check () from /usr/lib/libglib-2.0.so.0
#43 0xb6ca5a87 in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#44 0xb7007985 in gtk_main_iteration () from /usr/lib/libgtk-x11-2.0.so.0
#45 0xb7716943 in wxDropSource::DoDragDrop () from /usr/local/lib/libwx_gtk2u_core-2.6.so.0
#46 0xb7b2d7e6 in ScintillaWX::StartDrag (this=0x8cff0b0) at src/ScintillaWX.cpp:249
#47 0xb7b55c02 in Editor::ButtonDown (this=0x8cff0b0, pt={x = 188, y = 312}, curTime=64934, shift=false, ctrl=false,
    alt=false) at src/scintilla/src/Editor.cxx:5132
#48 0xb7be2532 in ScintillaBase::ButtonDown (this=0x8cff0b0, pt={x = 188, y = 312}, curTime=0, shift=false, ctrl=false,
    alt=false) at src/scintilla/src/ScintillaBase.cxx:424
#49 0xb7b2b4b8 in ScintillaWX::DoLeftButtonDown (this=0x8cff0b0, pt={x = 188, y = 312}, curTime=0, shift=false,
    ctrl=false, alt=false) at src/ScintillaWX.cpp:804
#50 0xb7b36c12 in wxScintilla::OnMouseLeftDown (this=0x8cfe870, evt=@0x0) at src/wxscintilla.cpp:2949
#51 0xb74ea5f5 in wxAppConsole::HandleEvent () from /usr/local/lib/libwx_baseu-2.6.so.0
#52 0xb757c2f3 in wxEvtHandler::ProcessEventIfMatches () from /usr/local/lib/libwx_baseu-2.6.so.0
#53 0xb757c4ff in wxEventHashTable::HandleEvent () from /usr/local/lib/libwx_baseu-2.6.so.0
#54 0xb757c6df in wxEvtHandler::ProcessEvent () from /usr/local/lib/libwx_baseu-2.6.so.0
#55 0xb757c67e in wxEvtHandler::ProcessEvent () from /usr/local/lib/libwx_baseu-2.6.so.0
#56 0xb757c67e in wxEvtHandler::ProcessEvent () from /usr/local/lib/libwx_baseu-2.6.so.0
#57 0xb772d262 in gtk_window_button_press_callback () from /usr/local/lib/libwx_gtk2u_core-2.6.so.0
#58 0xb700a820 in _gtk_marshal_BOOLEAN__BOXED () from /usr/lib/libgtk-x11-2.0.so.0
#59 0xb6d16cb9 in g_closure_invoke () from /usr/lib/libgobject-2.0.so.0
#60 0xb6d26c0a in g_signal_stop_emission () from /usr/lib/libgobject-2.0.so.0
#61 0xb6d281fe in g_signal_emit_valist () from /usr/lib/libgobject-2.0.so.0
#62 0xb6d287f9 in g_signal_emit () from /usr/lib/libgobject-2.0.so.0
#63 0xb70fbf44 in gtk_widget_activate () from /usr/lib/libgtk-x11-2.0.so.0
#64 0xb7008c4d in gtk_propagate_event () from /usr/lib/libgtk-x11-2.0.so.0
#65 0xb70090c3 in gtk_main_do_event () from /usr/lib/libgtk-x11-2.0.so.0
#66 0xb722634a in _gdk_events_queue () from /usr/lib/libgdk-x11-2.0.so.0
#67 0xb6ca211c in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#68 0xb6ca55ab in g_main_context_check () from /usr/lib/libglib-2.0.so.0
#69 0xb6ca5907 in g_main_loop_run () from /usr/lib/libglib-2.0.so.0
#70 0xb7008261 in gtk_main () from /usr/lib/libgtk-x11-2.0.so.0
#71 0xb7717f78 in wxEventLoop::Run () from /usr/local/lib/libwx_gtk2u_core-2.6.so.0
#72 0xb77a77e9 in wxAppBase::MainLoop () from /usr/local/lib/libwx_gtk2u_core-2.6.so.0
---Type <return> to continue, or q <return> to quit---
#73 0xb77a78e1 in wxAppBase::OnRun () from /usr/local/lib/libwx_gtk2u_core-2.6.so.0
#74 0x08064485 in CodeBlocksApp::OnRun (this=0x0) at app.cpp:455
#75 0xb75215ea in wxEntry () from /usr/local/lib/libwx_baseu-2.6.so.0
#76 0xb75216a6 in wxEntry () from /usr/local/lib/libwx_baseu-2.6.so.0
#77 0x080626aa in main (argc=2, argv=0x0) at app.cpp:90


I can try compiling a version with full debug info, and try without plugins..

To reproduce, I simply took a file (first a big C++ file, then a file with just a single "a" in it) as start, and then clicked and drag&dropped like mad. Both times I suceeded after about 5-10 seconds.
pecan 2006-05-07 23:07

Please see proposed Patch 1037 and discussion at

http://forums.codeblocks.org/index.php?topic=2777.msg24196;topicseen#msg24196

pecan

mandrav 2006-05-09 12:02

Should be fixed with patch 1037 (applied earlier today).