Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 340557 - media-libs/freetype-2.4.3 breaks OsmosDemo-1.6.0
Summary: media-libs/freetype-2.4.3 breaks OsmosDemo-1.6.0
Status: RESOLVED CANTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Library (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Fonts Team
URL: http://www.hemispheregames.com/forum/...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-10-11 17:26 UTC by Martin von Gagern
Modified: 2010-12-14 20:18 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge --info (media-libs:freetype-2.4.3.emerge--info,6.38 KB, text/plain)
2010-10-11 17:27 UTC, Martin von Gagern
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Martin von Gagern 2010-10-11 17:26:52 UTC
I've found that freetype 2.4.3 breaks at least one application that used to work with freetype 2.4.2, and will work again after a downgrade of freetype.

Unfortunately the application in question is a closed source game, Osmos by Hemisphere Games. You can get a free Demo at http://www.hemispheregames.com/latest_osmos_demo_linux_targz in order to give it a try. I guess that where one application is affected, others might be as well, so keep an eye out on breakage.

As to the symptoms of this problem: starting the game from the command line will first show some splash animation, then it will drop you into a main screen with an an arrangement of circular blobs. The center one should be labeled but isn't. Pressing escape gives you a menu, but all labels in that menu as well as its tooltips are missing as well. The second menu item is the one to exit the game, and you'll have to press space after selecting it. Back to the command line, you'll see seven error messages stating:

WARNING: error loading font file Fonts/FortuneCity.ttf

The font is there, though. strace says its file got opened correctly. So I guess it's some ttf font loading routine that fails for some reason.
Comment 1 Martin von Gagern 2010-10-11 17:27:07 UTC
Created attachment 250245 [details]
emerge --info
Comment 2 Ryan Hill (RETIRED) gentoo-dev 2010-10-11 21:10:16 UTC
The font file itself appears broken.  Running through ftlint:

$ ftlint 10 Fonts/FortuneCity.ttf 
Fonts/FortuneCity.ttf: glyph  106: 0x0014
1 fail.
Comment 3 Martin von Gagern 2010-10-12 08:39:50 UTC
(In reply to comment #2)
> The font file itself appears broken.  Running through ftlint:
> 
> $ ftlint 10 Fonts/FortuneCity.ttf 
> Fonts/FortuneCity.ttf: glyph  106: 0x0014
> 1 fail.

Running it through ftlint from freetype 2.4.2:

$ ftlint 10 Fonts/FortuneCity.ttf 
Fonts/FortuneCity.ttf: OK.

So this only tells us that freetype 2.4.3 has problems with the font which 2.4.2 didn't have, but doesn't rule out a new bug in freetype. Nevertheless, ftlint (which I didn't know of before, and which wasn't built on my system as it requires USE=utils) is a useful pointer in investigating this issue.

Using ftlint to test this issue quickly, I was able to bisect it in git and found the following commit as the one making a difference:
http://git.savannah.gnu.org/cgit/freetype/freetype2.git/commit/?id=643d49df0919b56c6603ab9310839899b77aad8a
I don't know enough about the TTF format to check whether this was implemented correctly, but for the moment I'll assume that it is, and take this issue upstream to Hemisphere Games:
http://www.hemispheregames.com/forum/viewtopic.php?f=8&t=498
Comment 4 Ryan Hill (RETIRED) gentoo-dev 2010-10-12 18:38:45 UTC
Hmm, turns out we weren't enabling debug tracing.  If you sync up and remerge freetype with USE="debug" you can now do this:

$ FT2_DEBUG=any:1 ftlint 20 FortuneCity.ttf 
Init_Context: new object at 0x0xc80360
FT_Stream_Open: opened `FortuneCity.ttf' (40303 bytes) successfully
tt_face_get_location: too large offset=0x00005450 found for gid=0x006b, truncate at the end of glyf table (0x00005394)
FortuneCity.ttf: glyph  106: 0x0014
tt_face_get_location: too large offset=0x00005450 found for gid=0x006b, exceeding the end of glyf table (0x00005394)
tt_face_get_location: too large offset=0x00005450 found for gid=0x006c, exceeding the end of glyf table (0x00005394)
tt_face_get_location: too large offset=0x00005450 found for gid=0x006d, exceeding the end of glyf table (0x00005394)
tt_face_get_location: too large offset=0x00005450 found for gid=0x006e, exceeding the end of glyf table (0x00005394)
tt_face_get_location: too large offset=0x000056a2 found for gid=0x006f, exceeding the end of glyf table (0x00005394)
tt_face_get_location: too large offset=0x000056a2 found for gid=0x0070, exceeding the end of glyf table (0x00005394)
tt_face_get_location: too large offset=0x00005775 found for gid=0x0071, exceeding the end of glyf table (0x00005394)
tt_face_get_location: too large offset=0x00005775 found for gid=0x0072, exceeding the end of glyf table (0x00005394)
tt_face_get_location: too large offset=0x00005775 found for gid=0x0073, exceeding the end of glyf table (0x00005394)
tt_face_get_location: too large offset=0x000057e6 found for gid=0x0074, exceeding the end of glyf table (0x00005394)
tt_face_get_location: too large offset=0x000058ae found for gid=0x0075, exceeding the end of glyf table (0x00005394)
tt_face_get_location: too large offset=0x00005954 found for gid=0x0076, exceeding the end of glyf table (0x00005394)
tt_face_get_location: too large offset=0x00005954 found for gid=0x0077, exceeding the end of glyf table (0x00005394)
tt_face_get_location: too large offset=0x00005954 found for gid=0x0078, exceeding the end of glyf table (0x00005394)
tt_face_get_location: too large offset=0x00005a1e found for gid=0x0079, exceeding the end of glyf table (0x00005394)
tt_face_get_location: too large offset=0x00005a1e found for gid=0x007a, exceeding the end of glyf table (0x00005394)
tt_face_get_location: too large offset=0x00005a1e found for gid=0x007b, exceeding the end of glyf table (0x00005394)
tt_face_get_location: too large offset=0x00005a1e found for gid=0x007c, exceeding the end of glyf table (0x00005394)
tt_face_get_location: too large offset=0x00005a1e found for gid=0x007d, exceeding the end of glyf table (0x00005394)
tt_face_get_location: too large offset=0x00005b3e found for gid=0x007e, exceeding the end of glyf table (0x00005394)
[...]
1 fail.

which supports your findings.
Comment 5 Pablo Cholaky 2010-12-14 19:34:36 UTC
(In reply to comment #0)
> I've found that freetype 2.4.3 breaks at least one application that used to
> work with freetype 2.4.2, and will work again after a downgrade of freetype.
> 
> Unfortunately the application in question is a closed source game, Osmos by
> Hemisphere Games. You can get a free Demo at
> http://www.hemispheregames.com/latest_osmos_demo_linux_targz in order to give
> it a try. I guess that where one application is affected, others might be as
> well, so keep an eye out on breakage.
> 
> As to the symptoms of this problem: starting the game from the command line
> will first show some splash animation, then it will drop you into a main screen
> with an an arrangement of circular blobs. The center one should be labeled but
> isn't. Pressing escape gives you a menu, but all labels in that menu as well as
> its tooltips are missing as well. The second menu item is the one to exit the
> game, and you'll have to press space after selecting it. Back to the command
> line, you'll see seven error messages stating:
> 
> WARNING: error loading font file Fonts/FortuneCity.ttf
> 
> The font is there, though. strace says its file got opened correctly. So I
> guess it's some ttf font loading routine that fails for some reason.
> 

Try using my ebuild on http://bugs.gentoo.org/show_bug.cgi?id=327435 , fix the FortuneCity font ;)
Comment 6 Martin von Gagern 2010-12-14 20:18:34 UTC
(In reply to comment #5)
> Try using my ebuild on bug #327435, fix the FortuneCity font ;)

That ebuild replaces FortuneCity with DejaVuSans, which is a workaround not a fix. I offered a real fix on the upstream bug report:
http://www.hemispheregames.com/forum/viewtopic.php?f=8&t=498#p2706
That will be included in the next Osmos release.