[gtkada] Problem using Gtk_Label

Roger Mc Murtrie rogermc at grapevine.com.au
Tue Feb 2 02:40:15 CET 2016


Problem solved.
I'm new to GtkAda so on a steep learning curve.
I had placed the statement aLabel := gtk_label_new; before initializing GtkAda with Gtk.Main.Init!
regards,
Roger



> On 1 Feb 2016, at 7:15 PM, Emmanuel Briot <briot at adacore.com> wrote:
> 
>> Im trying to use labels under GtkAda  but the following declaration and assignment in my program compiles and builds OK.
>> aLabel	: Gtk_Label;
>> 
>> aLabel := gtk_label_new;
>> with no other references to aLabel.
>> 
>> When I run the program it crashes with:
>> (process:10666): GLib-GObject-CRITICAL **: g_object_get_qdata: assertion 'G_IS_OBJECT (object)' failed
>> 
>> (process:10666): GLib-GObject-CRITICAL **: g_object_set_qdata_full: assertion 'G_IS_OBJECT (object)' failed
> 
> There is no way we can help without a reproducer here.
> This is an operation that works in general, of course, and we don't know the rest of your code and whether this
> single statement is responsible for the failure.
> You could try using a debugger and checking that gtk_label_new is indeed called.
> 
> regards
> Emmanuel
> 



More information about the gtkada mailing list