Cairo is a vector graphics library, I don't think it's included in OpenCV, so you're looking in the wrong place. If the segfault appears to happen randomly, that usually indicated a threading issue.
Download a package called ThreadSanitizer. It's a thread debugger based on Valigrind.
To find where your error is coming from, open /build/buildd/cairo-1.8.8/src/cairo-surface.c and do a search for "assert(! surface->is_snapshot)" That'll get you to the point that's failing, put a breakpoint there and backtrace it from there. But again, use ThreadSanitizer first, or else you might hit the breakpoint many many times before the bug shows up if it does at all. The act of debugging changes the flow of multithreaded programs.
Last edited by ninja9578; April 19th, 2010 at 03:21 PM.
great, thanks. do you know where i can download that?
here is another one, and now that you mention pthreads, it comes to mind- it might have something to do with it. when i try to run a thread that has gtkmm running in it along with two others, i get this error message:
(WIND0:11110): GLib-WARNING **: g_main_context_prepare(): main loop already active in another thread