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

Bug #1061554 reported by Laurent Bonnaud on 2012-10-04
124
This bug affects 23 people
Affects Status Importance Assigned to Milestone
gtk+3.0 (Ubuntu)
Low
Unassigned

Bug Description

All GTK3/GNOME3 software I tried (gedit, evince, evolution, ...) display the following error message:

$ gedit

(gedit:5387): Gdk-CRITICAL **: gdk_error_trap_pop_internal: assertion `trap != NULL' failed

ProblemType: Bug
DistroRelease: Ubuntu 12.10
Package: libgtk-3-0 3.6.0-0ubuntu2
ProcVersionSignature: Ubuntu 3.5.0-16.15-lowlatency 3.5.4
Uname: Linux 3.5.0-16-lowlatency i686
ApportVersion: 2.6.1-0ubuntu1
Architecture: i386
Date: Thu Oct 4 13:56:41 2012
EcryptfsInUse: Yes
SourcePackage: gtk+3.0
UpgradeStatus: No upgrade log present (probably fresh install)

Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in gtk+3.0 (Ubuntu):
status: New → Confirmed
Jean-Philippe Orsini (jfi) wrote :

gedit, evince, update-manager, and psensor is displaying this warning (I did not test evolution which is not installed on my computer).

Sebastien Bacher (seb128) wrote :

Thank you for your bug report, can you use gdb to get a backtrace of the warning?

Changed in gtk+3.0 (Ubuntu):
status: Confirmed → Incomplete
importance: Undecided → Low

Here is a debugging session with a backtrace:

$ gdb gedit
GNU gdb (GDB) 7.5-ubuntu
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "i686-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /usr/bin/gedit...(no debugging symbols found)...done.
(gdb) break gdk_error_trap_pop_internal
Function "gdk_error_trap_pop_internal" not defined.
Make breakpoint pending on future shared library load? (y or [n]) y
Breakpoint 1 (gdk_error_trap_pop_internal) pending.
(gdb) run
Starting program: /usr/bin/gedit
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/i386-linux-gnu/libthread_db.so.1".
[New Thread 0xb6894b40 (LWP 12098)]
[New Thread 0xb5effb40 (LWP 12099)]
[New Thread 0xb54ffb40 (LWP 12100)]

Breakpoint 1, gdk_error_trap_pop_internal (need_code=need_code@entry=0) at /build/buildd/gtk+3.0-3.6.0/./gdk/gdkdisplay.c:2131
2131 /build/buildd/gtk+3.0-3.6.0/./gdk/gdkdisplay.c: No such file or directory.
(gdb) bt
#0 gdk_error_trap_pop_internal (need_code=need_code@entry=0) at /build/buildd/gtk+3.0-3.6.0/./gdk/gdkdisplay.c:2131
#1 0xb78fe7a7 in gdk_error_trap_pop_ignored () at /build/buildd/gtk+3.0-3.6.0/./gdk/gdkdisplay.c:2179
#2 0xb7efe9a0 in window_is_xembed (w=<optimized out>, d=<optimized out>) at canberra-gtk-module.c:386
#3 dispatch_sound_event (d=0x8337f40) at canberra-gtk-module.c:472
#4 dispatch_queue () at canberra-gtk-module.c:833
#5 idle_cb (userdata=0x0) at canberra-gtk-module.c:841
#6 0xb78f5ebe in gdk_threads_dispatch (data=data@entry=0x83f3430) at /build/buildd/gtk+3.0-3.6.0/./gdk/gdk.c:788
#7 0xb7353c30 in g_idle_dispatch (source=source@entry=0x8317050, callback=0xb78f5e80 <gdk_threads_dispatch>, user_data=0x83f3430)
    at /build/buildd/glib2.0-2.34.0/./glib/gmain.c:4806
#8 0xb73569e3 in g_main_dispatch (context=0x81188e0) at /build/buildd/glib2.0-2.34.0/./glib/gmain.c:2715
#9 g_main_context_dispatch (context=context@entry=0x81188e0) at /build/buildd/glib2.0-2.34.0/./glib/gmain.c:3219
#10 0xb7356d80 in g_main_context_iterate (context=0x81188e0, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>)
    at /build/buildd/glib2.0-2.34.0/./glib/gmain.c:3290
#11 0xb73571db in g_main_loop_run (loop=loop@entry=0x83f21f0) at /build/buildd/glib2.0-2.34.0/./glib/gmain.c:3484
#12 0xb7b0bf75 in gtk_main () at /build/buildd/gtk+3.0-3.6.0/./gtk/gtkmain.c:1163
#13 0x08066f20 in main ()

affects: gtk+3.0 (Ubuntu) → ubuntu
Changed in ubuntu:
status: Incomplete → Confirmed
funicorn (funicorn) wrote :

The same bug exists on Ubuntu 12.10 with libgtk-3-0 3.6.0-ubuntu3.1.
Thanks god I thought it's only me since I hardly find any similar bug report on this issue.

funicorn (funicorn) wrote :

Here is gdb output on gedit

$ gdb gedit
GNU gdb (GDB) 7.5-ubuntu
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /usr/bin/gedit...(no debugging symbols found)...done.
(gdb) break gdk_error_trap_pop_internal
Function "gdk_error_trap_pop_internal" not defined.
Make breakpoint pending on future shared library load? (y or [n]) y
Breakpoint 1 (gdk_error_trap_pop_internal) pending.
(gdb) run
Starting program: /usr/bin/gedit
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7fffee41f700 (LWP 19817)]
[New Thread 0x7fffe7fff700 (LWP 19818)]
[New Thread 0x7fffe77fe700 (LWP 19819)]
[New Thread 0x7fffde6b6700 (LWP 19822)]

(gedit:19814): Gtk-CRITICAL **: gtk_list_store_set_column_types: assertion `priv->columns_dirty == 0' failed

(gedit:19814): Gdk-CRITICAL **: gdk_error_trap_pop_internal: assertion `trap != NULL' failed
[New Thread 0x7fffd1445700 (LWP 19894)]

--------------------------------------------------------------------------------------------------------------------------------------------------------------------
And on leafpad:

$ gdb leafpad
GNU gdb (GDB) 7.5-ubuntu
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /usr/bin/leafpad...(no debugging symbols found)...done.
(gdb) break gdk_error_trap_pop_internal
Function "gdk_error_trap_pop_internal" not defined.
Make breakpoint pending on future shared library load? (y or [n]) y
Breakpoint 1 (gdk_error_trap_pop_internal) pending.
(gdb) run
Starting program: /usr/bin/leafpad
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7fffef61a700 (LWP 20029)]
[New Thread 0x7fffee7e5700 (LWP 20030)]
[New Thread 0x7fffedfe4700 (LWP 20031)]

(leafpad:20026): Gdk-CRITICAL **: IA__gdk_error_trap_pop: assertion `gdk_error_traps != NULL' failed
[New Thread 0x7fffd4738700 (LWP 20034)]

b49P23TIvg (b49p23tivg) wrote :

I just reinstalled gtk+3. All my gtk programs get this error. This short program causes the error:
/*
  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_show(w);
  gtk_main();
  return 0;
}

b49P23TIvg (b49p23tivg) wrote :

It also happens with gtk 2, but I can't tell which version of gdk is used with either. See post 6,7. I had to install gtk2 to make the computer vision code work.

http://forums.devshed.com/python-programming-11/sudoku-solver-school-project-error-help-934125.html

b49P23TIvg (b49p23tivg) wrote :

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

Affects me on raring as well.

Soo-Hyun Choi (s.choi) wrote :

Affects me on raring, too.

This bug no longer exists in saucy with the GTK3 package from the Gnome3 PPA:

Package: libgtk-3-0
Version: 3.10.6-0ubuntu2~saucy1

Changed in ubuntu:
status: Confirmed → Fix Released
Mathew Hodson (mhodson) on 2015-02-06
affects: ubuntu → gtk+3.0 (Ubuntu)

I have this problem on Linux Mint 19.1, which is based on Ubuntu 18.04.1 (although admittedly I am running the alpha of Mint 19.2).

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers