GNOME Bugzilla – Bug 793745
GLib warnings when using a combobox in a treeview cell
Last modified: 2018-05-02 19:54:26 UTC
I'm getting these warnings when using a combobox in a treeview cell: (combo:1180): GLib-GObject-CRITICAL **: g_object_notify: assertion 'G_IS_OBJECT (object)' failed (combo:1180): GLib-GObject-CRITICAL **: g_object_set: assertion 'G_IS_OBJECT (object)' failed They occure when selecting an item from the combobox. I've traced this down to the combobox object getting freed/finalised too early. The back trace below shows (#0) gtk_combo_box_finalize being called from within (#3) g_signal_emit_valist which is called from (#5) gtk_combo_box_set_active_internal which is calling g_signal_emit (combo_box, combo_box_signals[CHANGED], 0); NOTE: line numbers are incorrect as my sources have had quite a lot of extra debugging included while I've been tracking this down. Thread 1 "combo" hit Breakpoint 1, gtk_combo_box_finalize (object=0x106348) at gtkcombobox.c:4427 4427 { (gdb) bt
+ Trace 238426
A debugging session is active. Inferior 1 [process 2348] will be killed. Quit anyway? (y or n) y Peter Onion
*** This bug has been marked as a duplicate of bug 703511 ***
When you say "a combobox in a treeview cell", can you show a minimal example of how you set the widgets up? Also, are you using the appears-as-list style property?
Created attachment 368822 [details] galde file for combo.c
Created attachment 368823 [details] combo.c that shows the glib warnings
I've attached tvtest.glade and combo.c that show the problem. The warnings appear when selecting an item from the drop down. PeterO
Thanks for those. I don't see any such errors here (although clicking on the item in the popup does not update the value shown in the combobox cell). to rephrase: are you using a GTK+ theme that enforces the appears-as-list style property?
Yes the value doesn't get updated. I originally came across this problem using some python where the text from the entry is expected to be a fraction (eg. 1/5). I produced the C version because I felt it would be more acceptable to report a bug with some C code that with Python code :-) I'm not aware of the "appears-as-list" property so I don't think I'm using it. PeterO
(In reply to Peter.Onion from comment #7) > I'm not aware of the "appears-as-list" property so I don't think I'm using > it. What GTK+ theme are you using? The theme can enforce that style property if it chooses. I keep asking this because a very similar report linked earlier depends on appears-as-list being TRUE.
I don't know what "GTK+ theme" I'm using. I've not set anything about themes so I don't know how to find out. I'm just using what came out of the box on latest Raspbian. Sorry not to me more helpful. PeterO
I just build my code on a MINT-18.2 x86-64 machine and I get the same warnings. PeterO
Which point release of 3.22.x are these systems on? You can get this from your package manager or gtk3-widget-factory => About.
On Raspbian it is 3.22.28 (which I've build from source) On Mint it is 3.18.9 (from the distribution). PeterO
-- GitLab Migration Automatic Message -- This bug has been migrated to GNOME's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/gtk/issues/1037.