GNOME Bugzilla – Bug 321429
Crash when default font is unreadable
Last modified: 2005-11-22 22:05:04 UTC
Distribution/Version: SuSE 10.0 I use SuSE 10.0. When I wanted to start gimp (but also inkscape) per 'ssh -X USER@HOST /opt/gnome/bin/gimp', gimp didn't start. The problem was that there were not world readable truetype fonts installed on the SSH server. Changing the permission to 744 solved the problem. Other programs, not part of gnome, i.e. scribus, xfe an konqueror started without problems. Would it be possible to change the behavior of gimp (and inkscape....) so it starts up also without the right fonts permissions? Thanks.
*** Bug 321428 has been marked as a duplicate of this bug. ***
I don't understand anything. What exact files have what exact permissions and why is this a problem?
Sorry, once again. I have truetype fonts in /usr/X11R6/lib/X11/fonts/truetype on the Server where the application should run. Some of theses fonts were only root-readable. Then I started gimp from another computer with 'ssh -X USER@HOST /opt/gnome/bin/gimp'. This didn't work, gimp didn't start. I think it crashed while searchin for fonts. (There was an error message telling this when running 'strace gimp'.) But it started after I changed the permissions of the fonts so that they are readable for all. Now I wonder why gimp didn't start up, but other, non-gnome-apps, did.
You're going to have to reproduce the problem and tell us the exact error message, and even better, a stack trace.
You should also note that GIMP is not going to use any fonts from the X server. As outlined in http://gimp.org/unix/fonts.html, GIMP uses fontconfig and freetype to access fonts installed on the system is started on, not from the X server it is being run on.
Okay. I just changed the permission of verdana* in /usr/X11R6/lib/X11/fonts/truetype into 744 (can be seen in ll_truetypes_wrong.txt on rolle.cybton.com, all files are there). Then I started 'ssh -Y USER@HOST strace /opt/gnome/bin/gimp'. The results can be seen in strace_gimp_wrong_permissions.txt.bz2. Then I changed the permission back to 744 - ll_truetypes_right.txt. Then gimp started up - strace_gimp_right_permissions.txt.bz2. I had to pack the strace-output because it was too large for my modem.
Please attach the files to this bug report.
Created attachment 54749 [details] output of 'ssh -Y USER@HOST strace /opt/gnome/bin/inkscape'
Created attachment 54750 [details] output of 'll /usr/X11R6/lib/X11/fonts/truetype', right permissions
Created attachment 54752 [details] output of 'll /usr/X11R6/lib/X11/fonts/truetype', wrong permissions
Created attachment 54754 [details] output of 'ssh -Y USER@HOST strace /opt/gnome/bin/gimp', right permissions
Created attachment 54755 [details] output of 'ssh -Y USER@HOST strace /opt/gnome/bin/gimp', wrong permissions
I'll try it. And I also made a 'strace inkscape' to show you, why I think it's a fonts permission problem. See the last few lines.
Pango problem. If your default font isn't readable, it crashes. This will happen with any gtk app, including gtk-demo, so it's nothing that is gimp or inkscape specific. The ssh bit doesn't matter also, this will happen on a local machine as well. Reassigning accordingly
The crash is here: 0xb7ba8f3f in get_face_metrics (fcfont=0x819b090, metrics=0x81a2f78) at pangofc-font.c:311 311 metrics->descent = - PANGO_UNITS_26_6 (face->size->metrics.descender); face is NULL in this case, so pango_fc_font_lock_face (fcfont) is returning NULL, so pango isn't handling an error return from cairo_ft_scaled_font_lock_face. Perhaps cairo should have a better error return code for this case as well.
Humm, isn't it a fontconfig problem? I believe fontconfig shouldn't return fonts not readable by the user.
*** This bug has been marked as a duplicate of 314239 ***