Michaelangel007 / freetype-gl

Automatically exported from code.google.com/p/freetype-gl
Other
0 stars 0 forks source link

makefont crashes #17

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Build makefont
2. Attempt to use it
3. Crashes in 2 (maybe 3?) different places at random

What is the expected output? What do you see instead?
Expected output is the header for the font, instead it crashes. I have been 
unable to use it to produce a valid font.

What version of the product are you using? On what operating system?
OS X 10.7.3 x86_64

Please provide any additional information below.

First crash:

Font filename              : ./Vera.ttf
Font size                  : 16.0
Number of glyphs           : 95
Number of missed glyphs    : 0
Texture size               : 128x128x1
Texture occupancy          : 64.59%

Header filename            : vera.h
Assertion failed: (self), function vector_size, file 
/Users/matt/src/freetype-gl-read-only/vector.c, line 145.

Program received signal SIGABRT, Aborted.
0x00007fff8b738ce2 in __pthread_kill ()
(gdb) bt
#0  0x00007fff8b738ce2 in __pthread_kill ()
#1  0x00007fff8a53b7d2 in pthread_kill ()
#2  0x00007fff8a52ca7a in abort ()
#3  0x00007fff8a55f5de in __assert_rtn ()
#4  0x00000001000065ff in vector_size (self=0x0) at 
/Users/matt/src/freetype-gl-read-only/vector.c:145
#5  0x00000001000033db in main (argc=1, argv=0x7fff5fbff718) at 
/Users/matt/src/freetype-gl-read-only/makefont.c:128

Second crash:

Font filename              : ./Vera.ttf
Font size                  : 16.0
Number of glyphs           : 95
Number of missed glyphs    : 0
Texture size               : 128x128x1
Texture occupancy          : 64.59%

Header filename            : vera.h

Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_INVALID_ADDRESS at address: 0x0000000000000026
0x000000010000383c in main (argc=1, argv=0x7fff5fbff718) at 
/Users/matt/src/freetype-gl-read-only/makefont.c:312
312             wchar_t charcode = kerning->charcode;
(gdb) bt
#0  0x000000010000383c in main (argc=1, argv=0x7fff5fbff718) at 
/Users/matt/src/freetype-gl-read-only/makefont.c:312

I can sort of work around these crashes and it will occasionally crash at 
another invalid address in a part later down in the final loop in makefont.c

        for( j=0; j < vector_size(glyph->kerning); ++j )
        {
            const kerning_t *kerning = (const kerning_t *) vector_get( glyph->kerning, j);
            wchar_t charcode = kerning->charcode;

Original issue reported on code.google.com by whatmann...@gmail.com on 12 Mar 2012 at 11:31

GoogleCodeExporter commented 9 years ago
Disregard the 3rd part it's actually the same place as the 2nd one listed.

Original comment by whatmann...@gmail.com on 12 Mar 2012 at 11:35

GoogleCodeExporter commented 9 years ago
There is a different crash that happens (not the assertion failed) that happens 
in the same place as the first one

Font filename              : ./Vera.ttf
Font size                  : 16.0
Number of glyphs           : 95
Number of missed glyphs    : 0
Texture size               : 128x128x1
Texture occupancy          : 64.59%

Header filename            : vera.h

Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_INVALID_ADDRESS at address: 0x00000000010200d0
0x0000000100006603 in vector_size (self=0x10200c0) at 
/Users/matt/src/freetype-gl-read-only/vector.c:147
147     return self->size;
(gdb) bt
#0  0x0000000100006603 in vector_size (self=0x10200c0) at 
/Users/matt/src/freetype-gl-read-only/vector.c:147
#1  0x00000001000033db in main (argc=1, argv=0x7fff5fbff718) at 
/Users/matt/src/freetype-gl-read-only/makefont.c:128

Original comment by whatmann...@gmail.com on 12 Mar 2012 at 11:36

GoogleCodeExporter commented 9 years ago
Thanks for the report. I forgot to modiify this example after I changed how 
glyphs are stored within the vector. I made a fix, it should works now.

nicolas

Original comment by Nicolas.Rougier@gmail.com on 13 Mar 2012 at 7:41

GoogleCodeExporter commented 9 years ago

Original comment by Nicolas.Rougier@gmail.com on 13 Mar 2012 at 7:41