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 661997 - Gtk crashes when changing the TreeView model while rubber banding is still active
Gtk crashes when changing the TreeView model while rubber banding is still ac...
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: GtkTreeView
2.24.x
Other Linux
: Normal normal
: ---
Assigned To: gtktreeview-bugs
gtktreeview-bugs
Depends on:
Blocks:
 
 
Reported: 2011-10-17 13:25 UTC by Thomas Perl
Modified: 2011-11-09 07:53 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
gdb backtrace of example application (3.28 KB, text/plain)
2011-10-17 13:29 UTC, Thomas Perl
Details
example application to reproduce the crash (python/pygtk) (1.01 KB, text/x-python)
2011-10-17 13:31 UTC, Thomas Perl
Details
gdb backtrace of example application (pygobject/gtk3 version) (3.80 KB, text/plain)
2011-10-17 13:41 UTC, Thomas Perl
Details
gtk3 example application (using python/pygobject) (1.12 KB, text/x-python)
2011-10-17 13:43 UTC, Thomas Perl
Details
c example (gtk3) (1.58 KB, text/x-csrc)
2011-10-17 14:16 UTC, Thomas Perl
Details
gdb backtrace of C example (gtk3) (5.21 KB, text/plain)
2011-10-17 14:17 UTC, Thomas Perl
Details

Description Thomas Perl 2011-10-17 13:25:32 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
Comment 1 Thomas Perl 2011-10-17 13:29:19 UTC
Created attachment 199212 [details]
gdb backtrace of example application
Comment 2 Thomas Perl 2011-10-17 13:31:40 UTC
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.
Comment 3 Thomas Perl 2011-10-17 13:41:50 UTC
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).
Comment 4 Thomas Perl 2011-10-17 13:43:10 UTC
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].
Comment 5 Thomas Perl 2011-10-17 14:16:58 UTC
Created attachment 199216 [details]
c example (gtk3)

C example, compile with:

gcc -g `pkg-config --cflags --libs gtk+-3.0` -o rubberbanding rubberbanding.c
Comment 6 Thomas Perl 2011-10-17 14:17:42 UTC
Created attachment 199217 [details]
gdb backtrace of C example (gtk3)

And here is the full gdb backtrace of the C example without any Python.
Comment 7 Kristian Rietveld 2011-11-09 07:53:22 UTC
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.