GNOME Bugzilla – Bug 588678
pango crash: install a new theme from gnome-appearance-properties
Last modified: 2009-07-15 19:49:01 UTC
Steps to reproduce: 1. open gnome-appearance-properties 2. install black-white_2-Style icons theme 3. gnome-appearance-properties crash Stack trace: Distribution: Gentoo Base System release 2.0.1 Gnome Release: 2.26.3 2009-07-14 (Gentoo) BugBuddy Version: 2.26.0 System: Linux 2.6.30-gentoo-r2 #6 SMP Tue Jul 14 03:26:55 CEST 2009 x86_64 X Vendor: The X.Org Foundation X Vendor Release: 10602000 Selinux: No Accessibility: Disabled GTK+ Theme: BlackRain Icon Theme: gnome GTK+ Modules: canberra-gtk-module, gnomebreakpad Memory status: size: 322437120 vsize: 322437120 resident: 25313280 share: 14319616 rss: 25313280 rss_rlim: 18446744073709551615 CPU usage: start_time: 1247562181 rtime: 47 utime: 43 stime: 4 cutime:0 cstime: 0 timeout: 0 it_real_value: 0 frequency: 100 Backtrace was generated from '/usr/bin/gnome-appearance-properties' [Thread debugging using libthread_db enabled] [New Thread 0x7f3f499d1740 (LWP 18123)] [New Thread 0x7f3f3b7e5910 (LWP 18130)] 0x00007f3f483bca6f in __libc_waitpid (pid=18131, stat_loc=0x7fffab3f55b0, options=0) at ../sysdeps/unix/sysv/linux/waitpid.c:41 in ../sysdeps/unix/sysv/linux/waitpid.c
+ Trace 216468
Thread 1 (Thread 0x7f3f499d1740 (LWP 18123))
----------- .xsession-errors --------------------- ** (evolution:17722): DEBUG: mailto URL command: evolution %s ** (evolution:17722): DEBUG: mailto URL program: evolution gnome-session[7676]: WARNING: Could not connect to ConsoleKit: Could not get owner of name 'org.freedesktop.ConsoleKit': no such name gnome-session[7676]: WARNING: Could not connect to ConsoleKit: Could not get owner of name 'org.freedesktop.ConsoleKit': no such name (gnome-appearance-properties:18124): Gtk-WARNING **: Impossible de trouver le moteur de thème dans module_path : « hcengine » (gnome-appearance-properties:18124): Gtk-WARNING **: Impossible de trouver le moteur de thème dans module_path : « hcengine » (gnome-appearance-properties:18124): Gtk-WARNING **: Impossible de trouver le moteur de thème dans module_path : « hcengine » (gnome-appearance-properties:18124): Gtk-WARNING **: Impossible de trouver le moteur de thème dans module_path : « hcengine » (gnome-appearance-properties:18123): Pango-WARNING **: shaping failure, expect ugly output. shape-engine='BasicEngineFc', font='DejaVu Sans Bold 12', text='' 41 ../sysdeps/unix/sysv/linux/waitpid.c: No such file or directory. -------------------------------------------------- Other information: Hi, When I try to install black-white_2-Style icons theme, or a Gtk theme (like Overglossed theme) gnome-appearance-properties crash. Apparently due to pango_shape function (pango/shape.c line 120 from pango tarball), due to this line "last_cluster = glyphs->log_clusters[0] - 1;" In the case where glyphs->log_clusters is NULL, this gint * is unreferenced, which causes the segfault. A ugly way to solve the problem could be add a g_return_if_fail (glyphs->log_clusters != NULL) before this line, however pango_shape needs to shape even in case of criticals problem (the for loop would be skipped in this case) I had a quick look into pango source code, and apparently the problem could be happen in _pango_engine_shape_shape (but I'm not really sure). Feel free to ask me, more details if necessary. mrpouet
Indeed, the question is why glyphs->log_clusters may be zero-length. Helps if you can debug this yourself.
This doesn't look right:
+ Trace 216471
the text is not 41 bytes long and pango-layout doesn't allow NUL bytes. So I'm not sure how it has got there. Committed some changes to handle such cases anyway. Can you try with master?
Patch imported from master into my personnal overlay (I need to test it before commit it into the gentoo main tree) It's works ! good works , and nice code :) Actually I don't know pango source code well enough, otherwise It would be a pleasure to attach a patch and to help you :) thanks again ;)
Cool. Lets close then. Still I'm not sure how that NUL byte got there. So there may be a bug somewhere else.