bugThe FreeType Project - Bugs: bug #41363, FT_ASSERT failure in cf2_getPpemY...

 
 

bug #41363: FT_ASSERT failure in cf2_getPpemY with custom OTF font

Submitted by:  None
Submitted on:  Mon 27 Jan 2014 11:50:02 AM UTC  
 
Severity: 3 - NormalItem Group: Crash
Status: FixedPrivacy: Public
Assigned to: Werner LEMBERG <wl>Open/Closed: Closed
Planned Release: 2.5.3

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Mon 03 Feb 2014 10:20:18 AM UTC, comment #5:

I've fixed that now in the git repository. Dave, please check.

Note that I've also modified `ftbench': If you use `-s 0', `FT_Set_Pixel_Sizes' isn't called. Together with `-f 1' to set the FT_LOAD_NO_SCALE flag, you can simulate the use case discussed in the bug report.

Werner LEMBERG <wl>
Project AdministratorIn charge of this item.
Fri 31 Jan 2014 01:04:10 AM UTC, comment #4:

We've ascertained the issue most likely affects the specific use-case of loading un-scaled outline information without having specified a font size of any kind prior to loading glyph data.

I've tested, and making a call to FT_Set_Pixel_Sizes averts the assert-failure without any effect on my glyph loading.

However, my use-case (without the irrelevant call to Set_Pixel_Sizes) seems legitimate, and the necessity of setting a size is not documented... So I'm inclined to say this still merits a fix.

Anyway, my debug build works again! Thanks for the quick replies.

Evan Balster <ebalster>
Tue 28 Jan 2014 09:30:57 PM UTC, comment #3:

Unfortunately, we can't repeat your results; we thus need more information. Dave, can you give recommendations how to proceed on the Windows platform?

BTW, please rerun your tests with the current git version of both FreeType and the demo programs!

Werner LEMBERG <wl>
Project AdministratorIn charge of this item.
Mon 27 Jan 2014 11:44:54 PM UTC, comment #2:

OP here; I've signed up for an account.

If you want me to collect more data from my debugger, I can -- the bug is easily reproducible on my setup. (Be sure to check out the images I attached!)

Evan Balster <ebalster>
Mon 27 Jan 2014 10:36:22 PM UTC, comment #1:

I can't repeat this on my GNU/Linux 32bit system. Dave?

Werner LEMBERG <wl>
Project AdministratorIn charge of this item.
Mon 27 Jan 2014 11:50:02 AM UTC, original submission:

I'm getting an FT_ASSERT failure in cf2_getPpemY, exclusively when running debug mode and loading a specific OpenType font which I created using FontForge. A release-mode build encounters no error.

Specifically, this ASSERT line (cf2ft.c:392) is tripped:
FT_ASSERT( decoder->builder.face->root.size->metrics.y_ppem );

Investigating the data, it looks like the entire "metrics" structure is zeroes.

The crash occurs upon loading the first character of the font: a space, at glyph index 1. This character has no contours.

For simplicity (and because I'm terribly bashful about my typographical experiments!) I deleted all glyphs save for the space from the font and produced a variant called "FreeType-ErrorCase.otf"; testing this yielded precisely the same behavior.

I'm using FreeType 2.5.2, with Visual Studio 2010 Express, under Windows 7 x64, with the 32-bit static multithreaded runtime.

Below is the relevant part of the backtrace:

#0 0042E028 Plaid_dbg!cf2_getPpemY+0x39 (c:\creations\plaidgadget\lib-build\freetype-2.5.2\src\cff\cf2ft.c:392)
#1 0042E060 Plaid_dbg!cf2_font_setup+0x62 (c:\creations\plaidgadget\lib-build\freetype-2.5.2\src\cff\cf2font.c:256)
#2 0042E094 Plaid_dbg!cf2_getGlyphOutline+0x53 (c:\creations\plaidgadget\lib-build\freetype-2.5.2\src\cff\cf2font.c:440)
#3 0042E130 Plaid_dbg!cf2_decoder_parse_charstrings+0x2b2 (c:\creations\plaidgadget\lib-build\freetype-2.5.2\src\cff\cf2ft.c:364)
#4 0042E618 Plaid_dbg!cff_slot_load+0x6cd (c:\creations\plaidgadget\lib-build\freetype-2.5.2\src\cff\cffgload.c:2842)
#5 0042E63C Plaid_dbg!cff_glyph_load+0xc6 (c:\creations\plaidgadget\lib-build\freetype-2.5.2\src\cff\cffdrivr.c:185)
#6 0042E698 Plaid_dbg!FT_Load_Glyph+0x2ca (c:\creations\plaidgadget\lib-build\freetype-2.5.2\src\base\ftobjs.c:729)
#7 0042E7E4 Plaid_dbg!plaid::FontCodec_FreeType::decode+0x366 (c:\creations\plaidgadget\dev\src\codec-freetype\fontcodec_freetype.cpp:191)

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

Attached Files
file #30385:  FreeType-ErrorCase.otf added by None (2KiB - application/octet-stream)
file #30386:  freetype-errcase-warnings.png added by None (42KiB - image/png)
file #30387:  freetype-crash-info.png added by None (73KiB - image/png)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by ebalster (Posted a comment)
  • -unavailable- added by wl (Posted a comment)
  • -unavailable- added by wl
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 9 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Mon 03 Feb 2014 10:20:18 AM UTCwlStatusNeed Info=>Fixed
      Open/ClosedOpen=>Closed
      Planned ReleaseNone=>2.5.3
    Tue 28 Jan 2014 09:30:57 PM UTCwlStatusNone=>Need Info
    Mon 27 Jan 2014 10:36:22 PM UTCwlAssigned toNone=>wl
      Carbon-Copy-=>Added darnold
    Mon 27 Jan 2014 11:50:03 AM UTCNoneAttached File-=>Added FreeType-ErrorCase.otf, #30385
      Attached File-=>Added freetype-errcase-warnings.png, #30386
      Attached File-=>Added freetype-crash-info.png, #30387

    Back to the top


    Powered by Savane 3.1-cleanup1