GNOME Bugzilla – Bug 136786
Crash during font-cache build on startup
Last modified: 2004-03-28 20:06:54 UTC
I downloaded GTK+2.2.4 and GIMP 2.0pre4 for Windows from: http://www2.arnes.si/~sopjsimo/gimp/development.html Installed them and started GIMP: 1. got the questions to configure my HOME directory 2. build brush, pattern, gradients caches 3. spent a long time building the font cache, then it crashed: (gimp-1.3-exe:896):GLib-CRITICAL **: file gconvert.c: line 498 (g_convert): assertion 'str !=NULL' failed 4. subsequent re-start crashed immediately 5. deleted $HOME/.fonts.cache-1 6. goto step 2. 7. starting with gimp1.3.exe --no-fonts works fine (except I can't do text!). I saw some earlier bug reports reporting the same problem (e.g http://bugzilla.gnome.org/show_bug.cgi?id=121752) - they were closed saying upgrade to fontconfig-2.2.1 but I'm running that already and it is still crashing while building the font crash. Yes, I know, I probably have some font on my system that it doesn't like - but it should at least tell me which one it is or just ignore the corrupted font - not just SEGV.
Did you try to run fc-cache?
I ran: set FC_DEBUG=128 fc-cache -v and the output contained the following "funny" lines with non-ascii charaters: Scanning file C:\WINNT\fonts/O7_table.fon..."Omnis Sans SerifþfpDþfPDþf" "Regular" done Scanning file C:\WINNT\fonts/O7_table.fon..."Omnis Sans Serif " "Regular" done That last one had a ^M in the title. I deleted the O7_table.fon from c:\WINNT\Fonts GIMP-2.0 started just fine! Now when I put the file back it still works!?!? When I run fc-cache again, those lines are: Scanning file C:\WINNT\fonts/O7_table.fon..."Omnis Sans Serif" "Regular" done Scanning file C:\WINNT\fonts/O7_table.fon..."Omnis Sans Serif" "Regular" done Scanning file C:\WINNT\fonts/O7_table.fon..."Omnis Sans Serif9Ê" "Regular" done So, although all the other software can handle the botched fonts, fontconfig and GIMP can't cheers!
So now GIMP starts up fine, even with that font in the directory? If so, it sounds like you had a corrupt font cache file.
you mean the $HOME/.font.cache-1 file? No, I tried deleting that - it would just rebuild it then die!
No, not $HOME/.font.cache-1. The one in c:\WINNT\Fonts. It's not really clear what you meant by "Now when I put the file back it still works!?!?"
didn't know about c:\winnt\fonts\fonts.cache-1 - I never tried to remove that one. When I said "put it back", I was talking about the O7_table.fon file. GIMP started properly for the first time after removing that file. When I put it back (to reproduce the problem) GIMP still would start up!?
c:\winnt\fonts\fonts.cache-1 would be what I was referring to with "corrupt font cache file". When you moved the font out of the directory and put it back, the cache got regenerated. So either you had an older fontconfig version that made a bogus cache, or something else on your system corrupted it. At any rate, it's not a problem with current fontconfig or GIMP.
While I agree with the cause of the crash, I disagree that this is not a problem that GIMP needs to handle gracefully: 1) One other person on comp.graphics.apps.gimp reported this exact same problem this week, but on XP, so this "corrupted" font cache is probably common enough. 2) Everyother application on my PC, including GIMP-1.2, was able to gracefully handle the corrupted font. 3) The effort required to "fix" the corrupted cache is beyond the abilities of most PC users. I agree it is low priority and probably shouldn't gate the GIMP-2.0 release, but it is still a bug.
The crash doesn't happen in any code the GIMP developers would have control over and it is caused by leftover files from earlier installations. There is always a risk when playing with development releases and "most PC users" should not take this risk.
This does not appear to be caused by leftover files but by a troublesome font file. This is just another instance of bug #132366. However the description of the problem looks very clear in this bug report, so I'd like to mark that as a duplicate of this one rather than the inverse.
Forgot to say: the problem persists regardless of the setting of the HOME environment variable.
*** Bug 138049 has been marked as a duplicate of this bug. ***
fontconfig is mainly used on Unix, and mainly for TrueType and other scalable fonts. The .fon fonts are Windows bitmap fonts, and the 07_table.fon is some third-party sofware's font, so no wonder if the fontconfig developers haven't found some bug that it might cause. If it indeed has a newline in the middle of its name, that presumably could very well screw up fontconfig's cache file's syntax. Could you please send a copy of it to me, and I can check what I can do about it. Thanks.
For those of us who are not completely proficient in determining these errors does any one have any clear instructions on how to go about resolving this issue. I tried using the command fc-cache -v but I am getting an unrecognizable command. Any help is appreciated.
This is a duplicate of bug #132366, isn't it?
Indeed. I was waiting to see if the discussion continued here or in #132366 but now that it is clear I'm marking this one as a duplicate. *** This bug has been marked as a duplicate of 132366 ***