[Fontconfig] fontconfig issue

Archana Mathari archnavnr24 at gmail.com
Wed May 16 22:51:04 PDT 2012


Hi,

Yes, i am able to see many errors related to FcFontMatch in
valgrind..FcPatternDestroy() function is called after FcFontMatch() in my
code below is the function......

 FcPattern* match = FcFontMatch(0, pattern, &result);
                if(match) {
                        FcChar8* str = 0;
                        if(FcPatternGetString(match, FC_FILE, 0, &str) ==
FcResultMatch) {
                                filename = (const char*)str;
                        }
                }
                FcPatternDestroy(pattern);
        }
        printf("return from FontConfig::Find\n");
        return filename;
}

And in valgrind other FcFontMatch related errors are--------

80 bytes in 4 blocks are possibly lost in loss record 78 of 160
==15388==    at 0x4024F20: malloc (vg_replace_malloc.c:236)
==15388==    by 0x4C67952: FcPatternObjectAddWithBinding (fcpat.c:479)
==15388==    by 0x4C681CB: FcPatternObjectAdd (fcpat.c:537)
==15388==    by 0x4C64287: FcFontRenderPrepare (fcmatch.c:420)
==15388==    by 0x4C644C7: FcFontMatch (fcmatch.c:564)
==15388==    by 0x4B344C4: FontConfig::Find(char const*, bool, bool)
(unixfontconfig.cpp:75)
==15388==    by 0x4B3439C: FontConfig::FindFont(char const*, bool, bool)
(unixfontconfig.cpp:49)
==15388==    by 0x4B3522E: SIInterface::SI_CreateFont(MM_Object*,
FI_FontInfo const*, void**) (SITextDrawImpl.cpp:324)
==15388==    by 0x625BDE7: HostCallback2<unsigned short, FI_FontInfo
const*, void**>::Invoke(void*) (si_wrappers.cpp:130)
==15388==    by 0x63A1331:
CorePlayer::InvokeHostCallback(VirtualHostCallback&) (splayer.cpp:12240)
==15388==    by 0x62550B9: MM_SI_CreateFont(PlatformPlayer*, FI_FontInfo
const*, void**) (si_wrappers.cpp:1067)
==15388==    by 0x6242DA8:
PlatformEDevice::CreatePlatformFont(PlatformECharFormat*, int, unsigned
char) (FL_fonts.cpp:1157)
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
80 bytes in 2 blocks are possibly lost in loss record 77 of 160
==15388==    at 0x4024F20: malloc (vg_replace_malloc.c:236)
==15388==    by 0x4C61612: FcLangSetCreate (fclang.c:284)
==15388==    by 0x4C6172B: FcLangSetCopy (fclang.c:308)
==15388==    by 0x4C678CA: FcValueSave (fcpat.c:116)
==15388==    by 0x4C679B2: FcPatternObjectAddWithBinding (fcpat.c:485)
==15388==    by 0x4C681CB: FcPatternObjectAdd (fcpat.c:537)
==15388==    by 0x4C64287: FcFontRenderPrepare (fcmatch.c:420)
==15388==    by 0x4C644C7: FcFontMatch (fcmatch.c:564)
==15388==    by 0x4B344C4: FontConfig::Find(char const*, bool, bool)
(unixfontconfig.cpp:75)
==15388==    by 0x4B3439C: FontConfig::FindFont(char const*, bool, bool)
(unixfontconfig.cpp:49)
==15388==    by 0x4B3522E: SIInterface::SI_CreateFont(MM_Object*,
FI_FontInfo const*, void**) (SITextDrawImpl.cpp:324)
==15388==    by 0x625BDE7: HostCallback2<unsigned short, FI_FontInfo
const*, void**>::Invoke(void*) (si_wrappers.cpp:130)
 ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

284 bytes in 7 blocks are possibly lost in loss record 103 of 160
==15388==    at 0x4024F20: malloc (vg_replace_malloc.c:236)
==15388==    by 0x4C667A6: FcStrStaticName (fcpat.c:1065)
==15388==    by 0x4C678AF: FcValueSave (fcpat.c:101)
==15388==    by 0x4C679B2: FcPatternObjectAddWithBinding (fcpat.c:485)
==15388==    by 0x4C681CB: FcPatternObjectAdd (fcpat.c:537)
==15388==    by 0x4C64287: FcFontRenderPrepare (fcmatch.c:420)
==15388==    by 0x4C644C7: FcFontMatch (fcmatch.c:564)
==15388==    by 0x4B344C4: FontConfig::Find(char const*, bool, bool)
(unixfontconfig.cpp:75)
==15388==    by 0x4B3439C: FontConfig::FindFont(char const*, bool, bool)
(unixfontconfig.cpp:49)
==15388==    by 0x4B3522E: SIInterface::SI_CreateFont(MM_Object*,
FI_FontInfo const*, void**) (SITextDrawImpl.cpp:324)
==15388==    by 0x625BDE7: HostCallback2<unsigned short, FI_FontInfo
const*, void**>::Invoke(void*) (si_wrappers.cpp:130)
==15388==    by 0x63A1331:
CorePlayer::InvokeHostCallback(VirtualHostCallback&) (splayer.cpp:12240)
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Can u help me out to fix this bug as soon as possible..

Archana..



On Tue, May 15, 2012 at 4:25 PM, Akira TAGOH <akira at tagoh.org> wrote:

> Although I can't reproduce that problem here, do you see same error
> with fc-match say? I'm suspecting that that code may not call
> FcPatternDestroy() for the result of FcFontMatch().
>
> On Tue, May 15, 2012 at 6:45 PM, Archana :) <archnavnr24 at gmail.com> wrote:
> > Hey sorry i unkowningly have sent u the previous log.. after fontconfig
> > updation below is the valgrind error..
> >
> > 42,500 (15,360 direct, 27,140 indirect) bytes in 40 blocks are definitely
> > lost in loss record 162 of 165
> > ==12490==    at 0x4025016: realloc (vg_replace_malloc.c:525)
> > ==12490==    by 0x4C67016: FcPatternObjectInsertElt (fcpat.c:358)
> > ==12490==    by 0x4C54911: FcConfigPatternAdd (fccfg.c:1355)
> > ==12490==    by 0x4C55E85: FcConfigSubstituteWithPat (fccfg.c:1559)
> > ==12490==    by 0x4C64310: FcFontRenderPrepare (fcmatch.c:433)
> > ==12490==    by 0x4C644C7: FcFontMatch (fcmatch.c:564)
> > ==12490==    by 0x4B344C4: FontConfig::Find(char const*, bool, bool)
> > (unixfontconfig.cpp:75)
> > ==12490==    by 0x4B3439C: FontConfig::FindFont(char const*, bool, bool)
> > (unixfontconfig.cpp:49)
> > ==12490==    by 0x4B3522E: SIInterface::SI_CreateFont(MM_Object*,
> > FI_FontInfo const*, void**) (SITextDrawImpl.cpp:324)
> > ==12490==    by 0x625BDE7: HostCallback2<unsigned short, FI_FontInfo
> const*,
> > void**>::Invoke(void*) (si_wrappers.cpp:130)
> > ==12490==    by 0x63A1331:
> > CorePlayer::InvokeHostCallback(VirtualHostCallback&) (splayer.cpp:12240)
> >
> > Archana.
> >
> >
> > On Tue, May 15, 2012 at 2:35 PM, Akira TAGOH <akira at tagoh.org> wrote:
> >
> >> That looks like you failed to update. /usr/lib/libfontconfig.so.1.4.4
> >> isn't 2.9.0 anyway. it should be /usr/lib/libfontconfig.so.1.5.0 if
> >> you install it properly.
> >>
> >
> >
> >>
> >> On Tue, May 15, 2012 at 4:08 PM, Archana :) <archnavnr24 at gmail.com>
> wrote:
> >> > Hi ,
> >> >
> >> > I have upgraded  fontconfig to 2.9.0. and in fontconfig makefile its
> >> > compiling with ' -g ' option..
> >> >
> >> > ./configure --sysconfdir=/etc --prefix=/usr --mandir=/usr/share/man
> >> > make
> >> > make install
> >> >
> >> > Still  showing the same issue as
> >> >
> >> > 53,200 (19,200 direct, 34,000 indirect) bytes in 50 blocks are
> >> > definitely
> >> > lost in loss record 155 of 158
> >> > ==11740==    at 0x4025016: realloc (vg_replace_malloc.c:525)
> >> > ==11740==    by 0x4C66966: ??? (in /usr/lib/libfontconfig.so.1.4.4)
> >> > ==11740==    by 0x4C547A1: ??? (in /usr/lib/libfontconfig.so.1.4.4)
> >> > ==11740==    by 0x4C55C57: FcConfigSubstituteWithPat (in
> >> > /usr/lib/libfontconfig.so.1.4.4)
> >> > ==11740==    by 0x4C63DC0: FcFontRenderPrepare (in
> >> > /usr/lib/libfontconfig.so.1.4.4)
> >> > ==11740==    by 0x4C63F09: FcFontMatch (in
> >> > /usr/lib/libfontconfig.so.1.4.4)
> >> > ==11740==    by 0x4B344B6: FontConfig::Find(char const*, bool, bool)
> >> > (unixfontconfig.cpp:74)
> >> > ==11740==    by 0x4B3439C: FontConfig::FindFont(char const*, bool,
> bool)
> >> > (unixfontconfig.cpp:49)
> >> >
> >> > Archana.
> >> > _______________________________________________
> >> > Fontconfig mailing list
> >> > Fontconfig at lists.freedesktop.org
> >> > http://lists.freedesktop.org/mailman/listinfo/fontconfig
> >> >
> >>
> >>
> >>
> >> --
> >> Akira TAGOH
> >
> >
>
>
>
> --
> Akira TAGOH
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/fontconfig/attachments/20120517/96fb449a/attachment.html>


More information about the Fontconfig mailing list