GNOME Bugzilla – Bug 662261
floating point exception when no canberra-gtk-module is loaded
Last modified: 2011-10-28 14:55:50 UTC
/* gcc -Wall vte.c `pkg-config --cflags --libs gtk+-3.0 vte-2.90` */ #include <gtk/gtk.h> #include <vte/vte.h> int main(int argc, char* argv[]) { gtk_init(&argc, &argv); GtkWidget* terminal = vte_terminal_new(); GtkWidget* window = gtk_window_new(GTK_WINDOW_TOPLEVEL); gtk_container_add(GTK_CONTAINER(window), GTK_WIDGET(terminal)); gtk_widget_show_all(window); gtk_main(); return 0; } This simple code generates a floating point exception: $ ./a.out Floating point exception $ gdb a.out GNU gdb (GDB) 7.3.1 Copyright (C) 2011 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-unknown-linux-gnu". For bug reporting instructions, please see: <http://www.gnu.org/software/gdb/bugs/>... Reading symbols from /home/speps/a.out...(no debugging symbols found)...done. (gdb) run Starting program: /home/speps/a.out [Thread debugging using libthread_db enabled] Program received signal SIGFPE, Arithmetic exception. 0x00007ffff7b6e73e in _vte_draw_set_text_font () from /usr/lib/libvte2_90.so.9 (gdb) bt
+ Trace 228865
draw->font->width seems to be 0, causing a division by zero. Running with GTK_MODULES=canberra-gtk-module ./a.out instead, works fine as expected. You'll not notice this in a gnome environment cause the canberra module is loaded by default.
Works here.
I'm not the only one that confirms this behaviour http://oproj.tuxfamily.org/bts/index.php?do=details&task_id=3&string=&project=2&search_name=&type%5B0%5D=&sev%5B0%5D=&pri%5B0%5D=&due%5B0%5D=&reported%5B0%5D=&cat%5B0%5D=&status%5B0%5D=&percent%5B0%5D=&opened=&dev=&closed=&duedatefrom=&duedateto=&changedfrom=&changedto=&openedfrom=&openedto=&closedfrom=&closedto= @Christian Persch Did you try executing from within a clean x session (no gnome)? $ xinit ./a.out -- :1 # should fail $ GTK_MODULES=canberra-gtk-module xinit ./a.out -- :1 # should work Be sure there is no camberra-gtk-module loaded by default (you can check with strace or other tools).
Yes, I made sure that the canberra module was not loaded (checking /proc/$pid/maps).