GNOME Bugzilla – Bug 661997
Gtk crashes when changing the TreeView model while rubber banding is still active
Last modified: 2011-11-09 07:53:22 UTC
Gtk Version: 2.24.4-3 (from Debian) Description: Gtk+ crashes when changing the model of a GtkTreeView while the user is still rubber-banding a selection. How to reproduce: 1. Create a GtkTreeView 2. set the selection mode to GTK_SELECTION_MULTIPLE 3. Enable rubber banding (set rubber banding True) 4. Update the model in the background (e.g. g_timeout_add()) 5. Start rubber banding and keep the mouse button pressed Expected outcome: - Rubber banding is aborted - The new model is shown in the GtkTreeView Actual outcome: - The application crashes Related links: - https://bugs.gpodder.org/show_bug.cgi?id=1142 - http://forums.gentoo.org/viewtopic-t-806344.html
Created attachment 199212 [details] gdb backtrace of example application
Created attachment 199213 [details] example application to reproduce the crash (python/pygtk) This is the example application that can reproduce the crash. This is written in Python/PyGTK for simplicity, but the bug is not related to Python or PyGTK - it's a Gtk bug; one could port this example to the Gtk C API and have the same result. A C++ example (gtkmm) can be found at the following URL: http://forums.gentoo.org/viewtopic-t-806344.html I can provide a C example if it's really needed, but the PyGTK application attached here should be enough to reproduce and debug the problem.
Created attachment 199214 [details] gdb backtrace of example application (pygobject/gtk3 version) It turns out that Gtk3 (tested with version 3.0.12-2 from Debian) is also affected by this bug. Attached the backtrace of the same example, ported to PyGObject (will also attach example code).
Created attachment 199215 [details] gtk3 example application (using python/pygobject) This example uses PyGObject bindings/GI to reproduce the same bug in Gtk3. Again, this example could be ported to C if need be - just for simplicity, I'm using Python here. The backtrace of running this application and reproducing the bug can be found in attachment 199214 [details].
Created attachment 199216 [details] c example (gtk3) C example, compile with: gcc -g `pkg-config --cflags --libs gtk+-3.0` -o rubberbanding rubberbanding.c
Created attachment 199217 [details] gdb backtrace of C example (gtk3) And here is the full gdb backtrace of the C example without any Python.
Thomas, thanks for the very complete bug report and especially the C testcase. The bug was easy the fix, I've pushed a fix on master, gtk-3-2 and gtk-2-24.