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 311141 - GtkComboBox crash in list_popup_resize_idle after destroy
GtkComboBox crash in list_popup_resize_idle after destroy
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: GtkComboBox
2.7.x
Other All
: Normal critical
: ---
Assigned To: gtk-bugs
gtk-bugs
: 312872 438153 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2005-07-21 12:35 UTC by Robert Ögren
Modified: 2007-05-16 14:05 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Testcase (2.31 KB, text/plain)
2005-07-21 12:38 UTC, Robert Ögren
Details

Description Robert Ögren 2005-07-21 12:35:23 UTC
With latest GTK+ HEAD from anoncvs, I get a reproducible crash in
list_popup_resize_idle if appears_as_list is true for the combo box, and the
model for the combo box is cleared just before the combo is destroyed.

The problem is that the combo is destroyed before the idle function is called,
but there is no code that protects against this so the idle function works on a
stale pointer.

The crash occured for me on Windows XP with the ms-windows theme and GIMP, but
the problem looks platform-independent. I'll attach a simple test program that
probably will crash on other platforms as well.
Comment 1 Robert Ögren 2005-07-21 12:38:15 UTC
Created attachment 49510 [details]
Testcase

Steps to reproduce:
1. Compile and run the attached testcase
2. Click the "Create popup" button
3. Click the "Close me" button in the new window that appeared in step 2
4. The program should crash
Comment 2 Matthias Clasen 2005-07-22 03:38:32 UTC
2005-07-21  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkcombobox.c (gtk_combo_box_list_destroy): Cleanup
	a possible resize idle.  (#311141, Robert Ögren)
Comment 3 Robert Ögren 2005-08-21 16:30:34 UTC
This problem affects the 2-6 branch as well, see bug #312872 (on win32). Is it
too late to backport the fix to that branch?

As said in that bug, there exists a workaround - edit out the appears-as-list
line from the ms-windows gtkrc.
Comment 4 Robert Ögren 2005-08-21 16:36:21 UTC
*** Bug 312872 has been marked as a duplicate of this bug. ***
Comment 5 Matthias Clasen 2005-08-22 14:28:23 UTC
2005-08-22  Matthias Clasen  <mclasen@redhat.com>

	Backport from 2.8.
	
	* gtk/gtkcombobox.c (gtk_combo_box_list_destroy): Cleanup
	a possible resize idle.  (#311141, Robert Ögren)
Comment 6 Sven Neumann 2007-05-16 14:05:23 UTC
*** Bug 438153 has been marked as a duplicate of this bug. ***