This short program gives a Segmentation fault // gcc `pkg-config --cflags --libs cairo` pdf-test.c -o pdf-test #include <cairo.h> #include <cairo-pdf.h> #define X_INCHES 2 #define Y_INCHES 2 #define X_PPI 300.0 #define Y_PPI 300.0 #define WIDTH X_INCHES * 96.0 #define HEIGHT Y_INCHES * 96.0 #define FILENAME "/tmp/test.pdf" int main (void) { cairo_t *cr; cairo_surface_t *surface; FILE *file; file = fopen (FILENAME, "w"); if (file == NULL) { fprintf (stderr, "Failed to open file %s for writing.\n", FILENAME); return 1; } cr = cairo_create (); surface = cairo_pdf_surface_create (file, X_INCHES, Y_INCHES, X_PPI, Y_PPI); cairo_set_target_surface (cr, surface); cairo_save(cr); cairo_restore(cr); return 0; }
I committed a fix yesterday, could you try out the latest cvs and see if that helps?
I checked with today's cvs and the seg fault no longer occurs, thanks.
Move bugs against "cvs" version to "0.9.3" so we can remove the "cvs" version.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.