Strange crash issue on Windows w/ PyGTK, Cairo...
CJ Kucera
pez at apocalyptech.com
Thu Mar 19 13:18:48 EDT 2009
CJ Kucera wrote:
> Anyway, the issue turned out to be zlib.decompress() - for larger sets
> of data, if I wasn't specifying "bufsize," the malloc()s that it was
> doing behind-the-scenes must have been clobbering memory. As soon as I
> specified bufsize, everything was totally kosher.
Okay, I've got a reproducible testcase of this available up here:
http://apocalyptech.com/pygtk-zlib/
I'm no longer *totally* convinced that it's a zlib issue... zlib's call
actually returns a valid string, and the error happens later in the app.
I've yet to be able to engineer a crash using anything other than that
cairo.ImageSurface.create_from_png() function, so it's possible that
specifying "bufsize" in zlib.decompress() merely allocates memory in
such a way that a bug in PyCairo doesn't come to light in that case.
So, I'm not really sure if I should submit this to Python or PyGTK's
tracker yet. Could someone check it out and let me know what you think?
That'd be great. Thanks!
As I mention on that page, removing "import os" and "import sys" will
"fix" the issue on XP, though you can remove them on win2k and still see
the crash.
Thanks,
CJ
--
WOW: Flemmy | "The ships hung in the sky in much the same
pez at apocalyptech.com | way that bricks don't." - Douglas Adams,
24.24.2.3171 | _The Hitchhiker's Guide To The Galaxy_
More information about the Python-list
mailing list