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 151486 - GtkComboBoxEntry crashes with no model
GtkComboBoxEntry crashes with no model
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: GtkComboBox
2.4.x
Other All
: High major
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2004-08-31 08:24 UTC by Martyn Russell
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Martyn Russell 2004-08-31 08:24:31 UTC
I have found a way to reproduce a crash with the GtkComboBoxEntry using Gtk
2.4.0 (on Fedora Core 2) and 2.4.7 (on Windows).

If you use Glade and create a simple dialog with some widgets you can
demonstrate this bug.

I use a GtkHBox with a size of 3.  I then add some buttons in the top and the
GtkComboBoxEntry in the middle.  I select one of the buttons with the mouse, and
then use the arrow keys (left or right to make sure it is moving between the 
widgets OK) and move down to the GtkComboBoxEntry.  The moment I press UP to
move back to the buttons, Glade crashes.

I have used Glade for this example, because the same thing happens in my
application and it is easier to reproduce using Glade.

It turns out, if you have test data in the GtkComboBoxEntry this doesn't occur
at all.  If you don't you will get this error in your application when you press
UP (which I believe tries to use an entry in the model):

<...>

Gtk: ** CRITICAL **  file gtkliststore.c: line 570
(gtk_list_store_get_value): assertion `GTK_LIST_STORE
(tree_model)->stamp == iter->stamp' failed
GLib-GObject: ** WARNING **  gtype.c:3350: type id `0' is invalid
GLib-GObject: ** WARNING **  can't peek value table for type `<invalid>'
which is not currently referenced

<...>

I have tried creating creating an empty GtkListStore and assigning it to the
GtkComboBoxEntry too, but get the same result.

Pressing DOWN in my application doesn't have the same result, probably because
focus is switched to another widget.
Comment 1 Matthias Clasen 2004-09-01 05:35:17 UTC
I believe I recently fixed this on HEAD:

Thu Aug 26 23:58:11 2004  Matthias Clasen  <maclas@gmx.de>

	* gtk/gtkcombobox.c (gtk_combo_box_key_press): Don't crash
	if model is not set. Noted by Mariano Suarez-Alvarez.

Please reopen if you still see this after this change, or if you see it with 2.4.x