[Numpy-discussion] Numpy 1.1.0 (+ PIL 1.1.6) crashes on large datasets

Zachary Pincus zachary.pincus@yale....
Tue Jul 29 15:05:37 CDT 2008

> I've managed to crash numpy+PIL when feeding it rather large images.
> Please see the URL for a test image, script, and gdb stack trace. This
> crashes on my box (Windows XP SP3) as well as on a linux box (the gdb
> trace I've been provided with) and a Mac. Windows reports the crash to
> happen in "multiarray.pyd"; the stack trace mentions the equivalent
> file.
> Unfortunately, I don't know how to fix this. Can I help somehow?
> -- Chris
> [1] http://cracki.ath.cx:10081/pub/numpy-pil-crash/

Hmm... I've opened this file with my homebrew image-IO tools, and I  
cannot provoke a segfault. (These tools are derived from PIL, but with  
many bugs related to the array interface fixed. I had submitted  
patches to the PIL mailing list, which, as usual, languished.)

I wonder if the issue is with how the PIL is providing the buffer  
interface to numpy? Can you get the crash if you get the array into  
numpy through the image's tostring (or whatever) method, and then use  


PS. This is with a recent SVN version of numpy, on OS X 10.5.4.

More information about the Numpy-discussion mailing list