[cairo-bugs] [Bug 22356] New: Spurious "out of memory" error on system without fonts

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Thu Jun 18 18:00:22 PDT 2009


           Summary: Spurious "out of memory" error on system without fonts
           Product: cairo
           Version: 1.8.8
          Platform: x86 (IA32)
        OS/Version: FreeBSD
            Status: NEW
          Severity: trivial
          Priority: medium
         Component: freetype font backend
        AssignedTo: david at freetype.org
        ReportedBy: benkasminbullock at gmail.com
         QAContact: cairo-bugs at cairographics.org

If Cairo tries to write text on a system without any fonts installed, it
produces an "out of memory" error.

I installed Cairo on a minimal FreeBSD jail without fonts and tried to use
cairo_show_text to write some text (this was a mistake, obviously). The text
didn't appear and Cairo stopped drawing anything at all after the text. I
checked what was happening using the "cairo_status" of the "cairo_t" and found
it had an "out of memory" error. Since I was running the program OK on the same
system outside the jail, I was sure there was no problem with memory.

Stepping through the program with a debugger, I found that the "out of memory"
error was produced when cairo called "FcFontMatch" on line 1697 of

Configure bugmail: http://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.

More information about the cairo-bugs mailing list