pycario-1.8.0 causes pychess and gpodder to crash. Tracing the cause of the problem, locates the issue to the cairo.ImageSurface.{create_from_png,write_to_png} functions. Removing the threading support around the line which causes the segfault in these functions fixes the issue. Environment: Arch Linux python-2.6.1 cairo-1.8.6 pycairo-1.8.0 pychess: Line that segfaults self.surface = cairo.ImageSurface.create_from_png(f) Pycario function offending line static PyObject * image_surface_create_from_png (PyTypeObject *type, PyObject *file) { <snip> Py_BEGIN_ALLOW_THREADS is = cairo_image_surface_create_from_png_stream (_read_func, file); Py_END_ALLOW_THREADS ... gpodder: Line that segfaults s.write_to_png(sio) Pycario function offending line static PyObject * surface_write_to_png (PycairoSurface *o, PyObject *file) { <snip> Py_BEGIN_ALLOW_THREADS status = cairo_surface_write_to_png_stream (o->surface, _write_func, file); Py_END_ALLOW_THREADS ...
Seems to be a result of the changes from bug 18101.
I don't feel entitled to change the severity of this bug, but as it crashes gPodder on Arch Linux, I think the severity should be increased. Crashing apps make users unhappy.
Allan, Could you provide the sequence of instructions for running pychess and gpodder which demonstrates where the code segfaults. I tried running gpodder and get the message *** glibc detected *** /a/bin/python: malloc(): memory corruption: 0x00007f37fdee2460 *** But I don't see pycairo mentioned at all.
pychess crashes during initialisation. I can get gpodder to crash by double clicking on a feed and clicking download.
I've removed the ALLOW_THREADS wrappers for the cairo stream functions. But when running gpodder I still get Bug Buddy popping up, and generating a file containing a long backtrace, none of which mentions pycairo. It would be good if a few people could test the latest pycairo code from cvs and report back whether or not it fixes the problem.
pycairo from cvs fixes both gpodder and pychess for me. No idea what is causing your gpodder crash.
pycairo 1.8.2 has been released with the fixes made for this bug report.
I've undone the changes made on 2008-12-31 and restored ALLOW_THREADS wrappers for the cairo stream functions. (It never was a proper bug fix, it just hid the problem by avoiding the bug). I've added PyGILState_Ensure/PyGILState_Release around calls to the Python C API - this should fix the problem. I've not tested pychess or gpodder since I do not have all the required libraries correctly installed.
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.