[cairo] cairo_surface_write_to_png & out of memory return status?

P.Romero romero619 at hotmail.com
Thu Feb 5 11:10:35 PST 2009

Ok, I somewhat figured out how to do this.
Installed gdb
Re-compiled pixman, cairo, and my program (GrADS) all with the -g option
Ran gdb and loaded the symbols for my program
Set the breakpoint at _cairo_error
Ran the program, hit the breakpoint and, sure enough, received the following
message from gdb:

Breakpoint 1, _cairo_error (status=CAIRO_STATUS_NO_MEMORY) at cairo.c:87
87          assert (_cairo_status_is_error (status));

Missing separate debuginfos, use: debuginfo-install e2fsprogs.i386
expat.i386 fontconfig.i386 freetype.i386 glibc.i686 libICE.i386 libSM.i386
libX11.i386 libXau.i386 libXcursor.i386 libXdmcp.i386 libXext.i386
libXfixes.i386 libXmu.i386 libXpm.i386 libXrender.i386 libXt.i386
libpng.i386 libxcb.i386 zlib.i386

Now what????
Is there something specific I should be looking for?

Im assuming the message about the missing debuginfos is because none of
those additional libraries were compiled with debug info.

Please help.

-----Original Message-----
From: Jeff Muizelaar [mailto:jeff at infidigm.net] 
Sent: 2009-02-04 12:28 PM
To: Pablo Romero
Cc: cairo at cairographics.org
Subject: Re: [cairo] cairo_surface_write_to_png & out of memory return

On Wed, Feb 04, 2009 at 09:22:25AM -0800, Pablo Romero wrote:
> I need help debugging the "out of memory" error Im receiving when trying
to call the cairo_surface_write_to_png function.
> Im sure that the system does have plenty of memory.
> The function is being called from within a larger program, so Im not sure
if the main program is limiting its memory use somehow (Im not a very
experienced C programmer).

setting a breakpoint on _cairo_error should show you where we first
enter an error state. That should give you some idea of what's going on.


More information about the cairo mailing list