GNOME Bugzilla – Bug 139679
Gnome terminal crashes when it have to display some non-US characters.
Last modified: 2004-12-22 21:47:04 UTC
Description of Problem: Steps to reproduce the crash: 1. Open terminal 2. Start mc 3. Open a text file 4. Switch to Hungarian keyboard 5. Type characters like: đĐŧeéőúűó Expected Results: The file contains the typed characters How often does this happen? Always, but I cant find any specific character which triggers this. Additional Information:
Thanks for the bug report. Without a stack trace from the crash it's very hard to determine what caused the crash. Please see http://bugzilla.gnome.org/getting-traces.cgi for more information about getting a useful stack trace.
Also, can you attach a string that crashes gnome-terminal (bugzilla does not treat non-ascii characters in comments very nicely...)
Backtrace was generated from '/usr/bin/gnome-terminal' (no debugging symbols found)...Using host libthread_db library "/lib/libthread_db.so.1". (no debugging symbols found)... (no debugging symbols found)...(no debugging symbols found)... (no debugging symbols found)...(no debugging symbols found)... (no debugging symbols found)...(no debugging symbols found)... (no debugging symbols found)...(no debugging symbols found)... (no debugging symbols found)...(no debugging symbols found)... (no debugging symbols found)...(no debugging symbols found)... (no debugging symbols found)...(no debugging symbols found)...[Thread debugging using libthread_db enabled] [New Thread 16384 (LWP 1616)] 0x40cb8137 in waitpid () from /lib/libpthread.so.0
+ Trace 46134
Thread 1 (Thread 16384 (LWP 1616))
I found a simpler way to reproduce the crash, however it's still not too exact: 1, open gnome-terminal 2, enter "setxkbmap hu" 3, press "Alt-Left shift" - this will change the keyboard layout to contain some exotic character, like "æđŁ¶ŧ←" 4, Press fast "rtzrtzrtz..." or "asdfghj" or "uiopuiop". With little "luck" I can crash the terminal in seconds. ("rtzrtzrtz" maps to ˇ¶ŧ←¶ŧ←¶ŧ←", "asdfghj" maps to "æđĐ[]ħí", and "uiopuiop" maps to "€Íøþ€Íøþˇ)
I think it fails at point 3 for me. I don't get any exotic chars at all. Do I need anything special to do this?
Also, if you type 'thread apply all bt' in gdb you'll get backtraces for all threads which can be worthwhile.
Ok, I started gnome-terminal from gdb, the following happened : bash-2.05b$ gdb gnome-terminal GNU gdb 6.0 Copyright 2003 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "i686-pc-linux-gnu"... (no debugging symbols found)...Using host libthread_db library "/lib/libthread_db.so.1". (gdb) run Starting program: /usr/bin/gnome-terminal (no debugging symbols found)...(no debugging symbols found)... (no debugging symbols found)...(no debugging symbols found)... (no debugging symbols found)...(no debugging symbols found)... (no debugging symbols found)...(no debugging symbols found)... (no debugging symbols found)...(no debugging symbols found)... (no debugging symbols found)...(no debugging symbols found)... (no debugging symbols found)...(no debugging symbols found)... (no debugging symbols found)...[Thread debugging using libthread_db enabled] [New Thread 16384 (LWP 6817)] (gnome-terminal:6817): Gtk-WARNING **: Unable to locate theme engine in module_path: "industrial", (gnome-terminal:6817): Gtk-WARNING **: Unable to locate theme engine in module_path: "industrial", (gnome-terminal:6817): Gtk-WARNING **: Unable to locate theme engine in module_path: "industrial", (process:6817): GLib-CRITICAL (recursed) **: file gstring.c: line 672 (g_string_erase): assertion `pos >= 0' failed aborting... Program received signal SIGABRT, Aborted. [Switching to Thread 16384 (LWP 6817)] 0x40e98001 in kill () from /lib/libc.so.6
Looks like you have problems with your theme setup. Do you get these warnings using other apps as well?
Between the crash and the Warning messages the terminal runs fine. Sometimes it's display warning messages about invalid X keycodes. I will check the theme setup, but I don't know what problems can it have, because it looks like it's working :)
Messages about invalid X bytecodes are usually a bad sign... Please try to reproduce this bug with another theme, maybe? The last stack trace seems to point at glib's 139030, but the output from gdb seems to be garbled?
Ok, I changed the theme, but still able to reproduce the crash: (gnome-terminal:1914): Gtk-WARNING **: Unable to locate theme engine in module_path: "smooth", (gnome-terminal:1914): Gtk-WARNING **: Unable to locate theme engine in module_path: "smooth", ** (gnome-terminal:1914): WARNING **: Hiba (Helytelen vagy nem teljes b\x6ajtsorozat vagy sz\x6cles karakter) t\x72rt\x6ent az adatkonverzi\x20 k\x7azben a gyermek sz\x6dm\x72ra, eldobva. ** (gnome-terminal:1914): WARNING **: Hiba (Helytelen vagy nem teljes b\x6ajtsorozat vagy sz\x6cles karakter) t\x72rt\x6ent az adatkonverzi\x20 k\x7azben a gyermek sz\x6dm\x72ra, eldobva. ** (gnome-terminal:1914): WARNING **: Hiba (Helytelen vagy nem teljes b\x6ajtsorozat vagy sz\x6cles karakter) t\x72rt\x6ent az adatkonverzi\x20 k\x7azben a gyermek sz\x6dm\x72ra, eldobva. ** (gnome-terminal:1914): WARNING **: Hiba (Helytelen vagy nem teljes b\x6ajtsorozat vagy sz\x6cles karakter) t\x72rt\x6ent az adatkonverzi\x20 k\x7azben a gyermek sz\x6dm\x72ra, eldobva. ** (gnome-terminal:1914): WARNING **: Hiba (Helytelen vagy nem teljes b\x6ajtsorozat vagy sz\x6cles karakter) t\x72rt\x6ent az adatkonverzi\x20 k\x7azben a gyermek sz\x6dm\x72ra, eldobva. ** (gnome-terminal:1914): WARNING **: Hiba (Helytelen vagy nem teljes b\x6ajtsorozat vagy sz\x6cles karakter) t\x72rt\x6ent az adatkonverzi\x20 k\x7azben a gyermek sz\x6dm\x72ra, eldobva. (process:1914): GLib-CRITICAL (recursed) **: file gstring.c: line 672 (g_string_erase): assertion `pos >= 0' failed aborting... Program received signal SIGABRT, Aborted. [Switching to Thread 16384 (LWP 1914)] 0x40e98001 in kill () from /lib/libc.so.6
You're still using a non-standard theme. Please try Default or Simple or something like that? How have you installed your GNOME packages? Self compiled or packages?
Also, what encoding are you using in your locale?
I compiled from source, as a Gentoo package, I use Hungarian locale, If I switch to Simple theme the crash is still reproducible. $ set | grep "LANG" GDM_LANG=hu_HU LANG=hu_HU LANGUAGE=hu_HU
Hmmm, that does not tell me the locale encoding... The glib bug I was referring above is triggered by warnings output in any encoding other that UTF-8 (which are not valid UTF-8) If your encoding is not UTF-8, then that is probably the cause of this. You probably have a file called /usr/lib/locale/LC_MESSAGES/SYS_LC_MESSAGES in your system, which you could attach; that has hopefully the encoding in it (in a string inside it, but it is a binary file) I don't know of any other way to get the encoding from the locale in you case, sadly.
Finally I recompiled my glibc with debug informations, so the stacktrace : (gdb) bt
+ Trace 46249
Hmm, I had lost this... Looking at this stack trace it is clear that this is a dup of 139030 by way of 139441. Thanks for following this up!
*** This bug has been marked as a duplicate of 139030 ***