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 669121 - gtk_combo_box_text_get_active_text critical
gtk_combo_box_text_get_active_text critical
Status: RESOLVED DUPLICATE of bug 612396
Product: gtk+
Classification: Platform
Component: Widget: GtkComboBox
3.2.x
Other Linux
: Normal critical
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2012-01-31 16:33 UTC by Dan Sagunov
Modified: 2012-02-08 08:30 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Dan Sagunov 2012-01-31 16:33:47 UTC
Call to gtk_combo_box_text_get_active_text from "changed" callback gives a critical error:
Gtk-CRITICAL **: gtk_combo_box_text_get_active_text: assertion `text_column >= 0' failed
Comment 1 Dan Sagunov 2012-02-03 19:03:59 UTC
I found that this bug was in gtkmm. Here is a link to mail about it:
http://mail.gnome.org/archives/gtkmm-list/2011-June/msg00066.html
Comment 2 Murray Cumming 2012-02-06 08:20:26 UTC
Do you have a simple-as-possible test case?
Comment 3 Murray Cumming 2012-02-06 08:21:02 UTC
Also, what version of gtkmm are you using?
Comment 4 Dan Sagunov 2012-02-06 13:11:40 UTC
(In reply to comment #2)
> Do you have a simple-as-possible test case?

Yes, I can.
GTKBuilder (.ui) file:
...
<object class="GtkComboBoxText" id="combobox1">
    ...
    <signal name="changed" handler="changed_callback" swapped="no"/>
    ...
</object>
...
Callback:
void changed_callback(GtkComboBoxText *widget, gpointer user_data) {
  ...
  printf("%s", gtk_combo_box_text_get_active_text(widget));
  ...
}
Comment 5 Dan Sagunov 2012-02-06 13:12:29 UTC
(In reply to comment #3)
> Also, what version of gtkmm are you using?

I am not using gtkmm. I said that same bug was found and corrected in gtkmm.
Comment 6 Murray Cumming 2012-02-06 13:14:50 UTC
Please provide a simple-as-possible test case that can be compiled and run.

However, what version of GTK+ are you using? I suspect that the problem might have been fixed already here: Bug #612396#c65
Comment 7 Dan Sagunov 2012-02-06 13:51:54 UTC
(In reply to comment #6)
> Please provide a simple-as-possible test case that can be compiled and run.
> 
> However, what version of GTK+ are you using? I suspect that the problem might
> have been fixed already here: Bug #612396#c65

I am using version 3.2.3.
Here is simple-as-possible code tarball: http://dl.dropbox.com/u/17502574/gtk3-bug.tar.gz
Comment 8 Dan Sagunov 2012-02-08 06:51:06 UTC
It seems to be a GtkBuilder bug. With "entry-text-column" property it works perfectly.
Comment 9 Murray Cumming 2012-02-08 08:24:20 UTC
> It seems to be a GtkBuilder bug. With "entry-text-column" property it works
perfectly.

Glade triggered it, but the fix was made in GTK+.

> I suspect that the problem might
> > have been fixed already here: Bug #612396#c65
> 
> I am using version 3.2.3.
> Here is simple-as-possible code tarball:
> http://dl.dropbox.com/u/17502574/gtk3-bug.tar.gz

Note that you need a \n in your printf string to actually print the message out.

I cannot reproduce the problem with gtk+ from git master (3.3.15) in jhbuild. I can reproduce it with gtk+ 3.2.0 (the Ubuntu Oneiric packaged version), as expected.

gtk+ 3.2.3 was released before the fix in Bug #612396#c65 was made, so I guess you need a new stable tarball release.

Closing as a duplicate. I will request a new tarball release in the original bug report.

*** This bug has been marked as a duplicate of bug 612396 ***
Comment 10 Dan Sagunov 2012-02-08 08:30:55 UTC
(In reply to comment #9)
> Note that you need a \n in your printf string to actually print the message
> out.
Yes, I know, but printf was needed to invoke critical error.

Thank you for reply. I am waiting for new tarball.