In this program the window appears at the 4th gtk_main_iteration_do(FALSE);
At iteration 50 I clicked the little x icon to close the window.

/*
  compilation:
  $ a=./c && gcc $a.c $( pkg-config --cflags gtk+-3.0 ) $( pkg-config --libs 
gtk+-3.0 ) -o $a && $a
*/
#include<gtk/gtk.h>
int main(int ac,char**av) {
  GtkWidget*w;
  gtk_init(&ac,&av);
  w = gtk_window_new(GTK_WINDOW_TOPLEVEL);
  g_signal_connect(w,"destroy",G_CALLBACK(gtk_main_quit),NULL);
  gtk_widget_set_size_request(w,100,100);
  gtk_widget_show(w);
  if (!TRUE)
    gtk_main();
  else {
    int i;
    for (i = 1; ; ++i) {
      printf("%4d ",i);
      fflush(stdout);
      gtk_main_iteration_do(FALSE);
      sleep(2);
    }
  }
  return 0;
}



OUTPUT from this program (run with emacs compile command):

-*- mode: compilation; default-directory: "/tmp/" -*-
Compilation started at Fri Nov 16 11:17:07

a=./c && gcc $a.c $( pkg-config --cflags gtk+-3.0 ) $( pkg-config --libs 
gtk+-3.0 ) -o $a && $a
   1    2    3    4    5    6    7    8    9   10   11   12   13   14   15   16 
  17   18 
(c:13232): Gdk-CRITICAL **: gdk_error_trap_pop_internal: assertion `trap != 
NULL' failed
  19   20   21   22   23   24   25   26   27   28   29   30   31   32   33   34 
  35   36   37   38   39   40   41   42   43   44   45   46   47   48   49   50 
(c:13232): Gtk-CRITICAL **: gtk_main_quit: assertion `main_loops != NULL' failed
  51   52 /bin/bash: line 1: 13232 Killed                  $a

Compilation exited abnormally with code 137 at Fri Nov 16 11:18:51

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1061554

Title:
  assertion failure `trap != NULL' displayed by all GTK3 software

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+bug/1061554/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to