[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [ft-devel] GSoC status update.
From: |
Werner LEMBERG |
Subject: |
Re: [ft-devel] GSoC status update. |
Date: |
Mon, 16 Jul 2018 08:53:19 +0200 (CEST) |
>>> I've still not found time to have a closer look at the issue, sorry
>>> (still on vacation more or less). Please try to debug it by
>>> yourself also – I can only assist, since it's actually your job to
>>> find the bug...
>>
>> Yes, I am working on it. If you could just give me a lead like
>> where should I look upon and like possible sources of errors, it
>> will be great help.
>
> I'm quite sure this is not a problem of `ftview'. Similarly, I'm
> quite sure it is not a problem of FreeType's caching code either.
I've now done some debugging:
gdb --args /home/wl/git/freetype/freetype2-demos.parth/bin/ftstring 20
cmr10.600gf
(gdb) r
Program received signal SIGSEGV, Segmentation fault.
0x00007ffff6817ea6 in __strcmp_ssse3 () from /lib64/libc.so.6
(gdb) up
#1 0x00000000004088af in my_face_requester (face_id=0x762110,
lib=0x747df0, request_data=0x0, aface=0x770118) at src/ftcommon.c:239
239 if ( !strcmp( format, "Type 1" ) )
(gdb) p format
$1 = 0x0
(gdb) l
234 if ( !error )
235 {
236 const char* format = FT_Get_Font_Format( *aface );
237
238
239 if ( !strcmp( format, "Type 1" ) )
240 {
241 char orig[5];
242 char* suffix = (char*)strrchr( font->filepathname,
'.' );
243 int has_extension = suffix
&&
This clearly shows that the problem is in `FT_Get_Font_Format'; this
function returns zero which looks very fishy according to its
documentation.
(gdb) b FT_Get_Font_Format
(gdb) r
Breakpoint 1, FT_Get_Font_Format (face=0x7703c0) at
/home/wl/git/freetype/freetype2.parth/src/base/ftfntfmt.c:30
30 const char* result = NULL;
(gdb) n
33 if ( face )
(gdb)
34 FT_FACE_FIND_SERVICE( face, result, FONT_FORMAT );
(gdb)
36 return result;
(gdb) p result
$2 = 0x0
Obviously, there is a problem with the `FONT_FORMAT' service in the GF
driver; let's check the winfnt driver for comparison.
cd winfonts
git grep FONT_FORMAT
winfnt.c:#include FT_SERVICE_FONT_FORMAT_H
winfnt.c: { FT_SERVICE_ID_FONT_FORMAT, FT_FONT_FORMAT_WINFNT },
cd gf
git grep FONT_FORMAT
gfdrivr.c:#include FT_SERVICE_FONT_FORMAT_H
Ouch, the service is completely missing...
Tadaa!
Have a look into `include/freetype/internal/services/svfntfmt.h'.
Please tell me why you wasn't able to identify the problem by
yourself! Perhaps there is some missing documentation or a missing
explanatory comment in the code...
Werner
- [ft-devel] GSoC status update., Parth Wazurkar, 2018/07/14
- Re: [ft-devel] GSoC status update., Werner LEMBERG, 2018/07/14
- Re: [ft-devel] GSoC status update., Parth Wazurkar, 2018/07/14
- Re: [ft-devel] GSoC status update., Werner LEMBERG, 2018/07/14
- Re: [ft-devel] GSoC status update., Parth Wazurkar, 2018/07/14
- Re: [ft-devel] GSoC status update.,
Werner LEMBERG <=
- Re: [ft-devel] GSoC status update., Parth Wazurkar, 2018/07/16
- Re: [ft-devel] GSoC status update., Ewald Hew, 2018/07/16
- Re: [ft-devel] GSoC status update., Werner LEMBERG, 2018/07/16
- Re: [ft-devel] GSoC status update., Parth Wazurkar, 2018/07/16
- Re: [ft-devel] GSoC status update., Parth Wazurkar, 2018/07/16
- Re: [ft-devel] GSoC status update., Parth Wazurkar, 2018/07/16
- Re: [ft-devel] GSoC status update., Werner LEMBERG, 2018/07/16
- Re: [ft-devel] GSoC status update., Parth Wazurkar, 2018/07/16
- Re: [ft-devel] GSoC status update., Werner LEMBERG, 2018/07/17
- Re: [ft-devel] GSoC status update., Parth Wazurkar, 2018/07/17