[cairo] Cairo error message on exit?

Dan Cartman DanC at xta.co.uk
Wed Aug 18 02:31:02 PDT 2010

  I'm just starting out using Cairo to replace some existing GDI/GDI+ 
code in Visual C++ 2010 and it seems to be working fine, but I'm getting 
an error message each time I close down my application :

"First-chance exception at 0x68e629dc in CairoTest.exe: 0xC0000005: 
Access violation reading location 0xabababa7"

This error only happens if I've called cairo_paint(cr) while the 
application is running - if I comment this line out, it disappears.  The 
only Cairo code in my application so far is :

     testsurface = 


void CChildView::OnPaint()
     CPaintDC dc(this);

     cairo_surface_t *surface = cairo_win32_surface_create(dc.m_hDC);
     cairo_t *cr = cairo_create (surface);

     cairo_set_source_surface(cr, testsurface, 0, 0);
     cairo_destroy (cr);
     cairo_surface_destroy (surface);

Can anybody point me in the direction of what I'm doing wrong?  It's 
probably something dumb, but I'd appreciate my ignorance being pointed out.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cairographics.org/archives/cairo/attachments/20100818/60807b34/attachment.html>

More information about the cairo mailing list