Re: segmentation fault during poppler_page_render()

Dan Raymond <[email protected]>
Newsgroups gmane.comp.lib.cairo
Message-ID <[email protected]>
Here is the gdb info:

Program received signal SIGSEGV, Segmentation fault.
0x68fe680d in libcairo-2!cairo_font_options_get_hint_metrics ()
    from C:\msys2\home\Dan\pkg\libcairo-2.dll


On 3/8/2015 5:50 PM, Dan Raymond wrote:
> Is there something wrong with the following code snippet?  I am 
> getting intermittent segmentation faults during poppler_page_render().
>
>
>    // Paint the drawing area grey and then fill the PDF rendering area 
> with white.  This will
>    // prevent the background from bleeding through any areas that are 
> not rendered by the PDF.
>
>    surface = cairo_image_surface_create(CAIRO_FORMAT_ARGB32, 
> window_width, window_height);
>    cr = cairo_create(surface);
>    cairo_set_source_rgb(cr, 0.33, 0.33, 0.33);  // grey background
>    cairo_paint(cr);
>    cairo_rectangle(cr, x_padding, y_padding, pdf_width, pdf_height);
>    cairo_set_source_rgb(cr, 1, 1, 1);
>    cairo_fill(cr);
>
>    // Render the PDF.
>
>    cairo_translate(cr, x_padding, y_padding);
>    cairo_scale(cr, scale_factor, scale_factor);
>    poppler_page_render(page, cr);
>    cairo_destroy(cr);
>    // (use the rendered surface here)
>    cairo_surface_destroy(surface);
>

-- 
cairo mailing list
[email protected]
http://lists.cairographics.org/mailman/listinfo/cairo
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.