title: Gtk-Critical **: gtk_widget_show assertion GTK_IS_WIDGET(WIDGET)
body: <p>I'm getting started with Gtk+, I'm following this tutorial how to make first application, but when I try to run the executable, I get this error:</p>
  
  <pre><code>Gtk-Critical **: gtk_widget_show assertion GTK_IS_WIDGET(WIDGET)
  </code></pre>
  
  <p>I can see on google a lot of people with same error, but I can't see the reply with how to fix this.. </p>
  
  <p>My C Code: </p>
  
  <pre><code>#include &lt;stdlib.h&gt;
  #include &lt;gtk/gtk.h&gt;
  
  GtkBuilder *builder;
  GtkWidget *app;
  
  G_MODULE_EXPORT
  void on_app_destroy (void)
  {
  gtk_main_quit ();
  }
  
  G_MODULE_EXPORT
  void on_menu_quit_activate (void)
  {
  gtk_main_quit ();
  exit(EXIT_SUCCESS);
  }
  
  int main (int argc, char *argv[])
  {
  /* Initialize GTK+ */
  g_log_set_handler ("Gtk", G_LOG_LEVEL_WARNING, (GLogFunc) gtk_false, NULL);
  gtk_init (&amp;argc, &amp;argv);
  g_log_set_handler ("Gtk", G_LOG_LEVEL_WARNING, g_log_default_handler, NULL);
  
  builder = gtk_builder_new ();
  gtk_builder_add_from_file (builder, "tut.glade", NULL);
  app = GTK_WIDGET (gtk_builder_get_object (builder, "app"));
  gtk_builder_connect_signals (builder, NULL);
  
  g_object_unref (G_OBJECT (builder));
  
  /* Enter the main loop */
  gtk_widget_show (app);
  gtk_main ();
  return 0;
  }
  </code></pre>
  
  <p>glad file:</p>
  
  <pre><code>&lt;?xml version="1.0"?&gt;
  &lt;glade-interface&gt;
    &lt;!-- interface-requires gtk+ 2.16 --&gt;
    &lt;!-- interface-naming-policy project-wide --&gt;
    &lt;widget class="GtkWindow" id="window1"&gt;
      &lt;child&gt;
        &lt;widget class="GtkFixed" id="fixed1"&gt;
          &lt;property name="visible"&gt;True&lt;/property&gt;
          &lt;child&gt;
            &lt;widget class="GtkButton" id="button1"&gt;
              &lt;property name="label" translatable="yes"&gt;button&lt;/property&gt;
              &lt;property name="width_request"&gt;113&lt;/property&gt;
              &lt;property name="height_request"&gt;42&lt;/property&gt;
              &lt;property name="visible"&gt;True&lt;/property&gt;
              &lt;property name="can_focus"&gt;True&lt;/property&gt;
              &lt;property name="receives_default"&gt;True&lt;/property&gt;
            &lt;/widget&gt;
            &lt;packing&gt;
              &lt;property name="x"&gt;149&lt;/property&gt;
              &lt;property name="y"&gt;69&lt;/property&gt;
            &lt;/packing&gt;
          &lt;/child&gt;
        &lt;/widget&gt;
      &lt;/child&gt;
    &lt;/widget&gt;
    &lt;widget class="GtkWindow" id="window2"&gt;
      &lt;child&gt;
        &lt;placeholder/&gt;
      &lt;/child&gt;
    &lt;/widget&gt;
  &lt;/glade-interface&gt;
  </code></pre>
  
  <p>compile options:</p>
  
  <pre><code>`pkg-config --cflags --libs gtk+-2.0` -export-dynamic
  </code></pre>
  
  <p>Linker settings: </p>
  
  <pre><code>-export-dynamic
  </code></pre>
  
  <p>My IDE: Code::Blocks, compiler: GNUC C Compiler</p>
  
  <p>How to fix this? Thanks in advance.</p>