Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to get avoid assertion failure when loading gtk About dialog box?
    text
    copied!<p>I've programmed a software gui using glade and gtk. The main window has an <strong>About</strong> button. When I click on the button for the first time, the <strong>GtkAboutDialogBox</strong> runs perfectly. The action area is correctly bound to the events. But when I close it and tries again to open the about dialog (<strong>without quiting from the main window</strong>), nothing comes up. And additionally the system thows</p> <pre><code>(tut:5424): GLib-GObject-WARNING **: invalid unclassed pointer in cast to `GtkDialog' (tut:5424): Gtk-CRITICAL **: IA__gtk_dialog_run: assertion `GTK_IS_DIALOG (dialog)' failed (tut:5424): GLib-GObject-WARNING **: invalid unclassed pointer in cast to `GtkWidget' (tut:5424): Gtk-CRITICAL **: IA__gtk_widget_destroy: assertion `GTK_IS_WIDGET (widget)' failed </code></pre> <p>to the shell. What could be wrong with this code?</p> <pre><code>//tut.c //gcc -o tut tut.c $(pkg-config --cflags --libs gtk+-2.0 gmodule-2.0) #include &lt;gtk/gtk.h&gt; GtkBuilder *builder; GtkWidget *window,*window_cnb; GtkAboutDialog *abtwindow; GtkLabel *label; GError *error = NULL; void on_about_clicked() { gtk_dialog_run( GTK_DIALOG(abtwindow) ); gtk_widget_destroy( GTK_WIDGET(abtwindow) ); } int main( int argc,char **argv ) { gtk_init( &amp;argc, &amp;argv ); builder = gtk_builder_new(); if( ! gtk_builder_add_from_file( builder, "my.glade", &amp;error ) ) { g_warning( "%s", error-&gt;message ); g_free( error ); return( 1 ); } window = GTK_WIDGET( gtk_builder_get_object( builder, "window1" ) ); abtwindow = GTK_ABOUT_DIALOG( gtk_builder_get_object( builder, "aboutdialog1" ) ); label = GTK_LABEL( gtk_builder_get_object( builder, "label16" ) ); gtk_builder_connect_signals( builder, NULL ); g_object_unref( G_OBJECT( builder ) ); gtk_widget_show( window ); gtk_main(); return( 0 ); } </code></pre> <p>I use gtkbuilder. How can I fix it?</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload