After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 136786 - Crash during font-cache build on startup
Crash during font-cache build on startup
Status: RESOLVED DUPLICATE of bug 132366
Product: GIMP
Classification: Other
Component: General
1.x
Other Windows
: Normal major
: ---
Assigned To: GIMP Bugs
GIMP Bugs
: 138049 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2004-03-10 18:41 UTC by Dominic Richens
Modified: 2004-03-28 20:06 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Dominic Richens 2004-03-10 18:41:28 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.
Comment 1 Sven Neumann 2004-03-10 19:17:18 UTC
Did you try to run fc-cache?
Comment 2 Dominic Richens 2004-03-11 02:06:46 UTC
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!
Comment 3 Manish Singh 2004-03-11 02:18:07 UTC
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.
Comment 4 Dominic Richens 2004-03-11 03:03:42 UTC
you mean the $HOME/.font.cache-1 file?  No, I tried deleting that - 
it would just rebuild it then die!
Comment 5 Manish Singh 2004-03-11 03:14:08 UTC
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!?!?"
Comment 6 Dominic Richens 2004-03-11 04:14:51 UTC
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!?
Comment 7 Manish Singh 2004-03-11 05:56:23 UTC
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.
Comment 8 Dominic Richens 2004-03-11 11:57:28 UTC
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.
Comment 9 Sven Neumann 2004-03-11 12:06:23 UTC
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.
Comment 10 Pedro Gimeno 2004-03-26 12:43:20 UTC
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.
Comment 11 Pedro Gimeno 2004-03-26 12:48:33 UTC
Forgot to say: the problem persists regardless of the setting of the HOME 
environment variable.
Comment 12 Sven Neumann 2004-03-26 14:18:51 UTC
*** Bug 138049 has been marked as a duplicate of this bug. ***
Comment 13 Tor Lillqvist 2004-03-26 22:44:04 UTC
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.
Comment 14 Matt Weyland 2004-03-27 21:52:02 UTC
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.

Comment 15 Sven Neumann 2004-03-28 14:17:19 UTC
This is a duplicate of bug #132366, isn't it?
Comment 16 Pedro Gimeno 2004-03-28 20:06:54 UTC
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 ***