[SciPy-dev] Crash in plt.image()

José Luis Gómez Dans josegomez at gmx.net
Mon Apr 8 06:11:35 CDT 2002

	I am starting to use scipy, and I am so far enjoying the ride. 
However, I have found what I think is a bug. I am using Joe Reinhardt's 
scipy packages for debian, which identify themselves as:
>>> print scipy.__version__

	I am interested in plotting images, using plt.image(). This causes 
python to crash with a seg-fault. Take the Lena example:
$ python
Python 2.1.2 (#1, Mar 16 2002, 00:56:55)
[GCC 2.95.4 20011002 (Debian prerelease)] on linux2
Type "copyright", "credits" or "license" for more information.
>>> from scipy import *
>>> from scipy.plt import *
>>> img = lena()
>>> image(img)
<type 'array'> ['__copy__', '__deepcopy__', 'astype', 'byteswapped', 
'copy', 'iscontiguous', 'itemsize', 'resize', 'savespace', 
'spacesaver', 'tolist', 'toscalar', 'tostring', 'typecode']
Segmentation fault

	Other methods (such as plt.plot()) work fine, with one little quirk, 
which could be due to my X Server being misconfigured, as this problem 
also shows up with other programs (namely, Scilab): if I get plt to 
plot something (plt.plot(MyArray), let's say), the window pops up, and 
shows me my graph. Any subsequent plot on that window will not show up 
_if the window_ is covered by say, the terminal window. If I move the 
plot window around, and cover it with any other window, the window will 
clear parts of the plot window. The solution (at least for scilab) can 
be found in <http://www-rocq.inria.fr/scilab/bugfix.html#Xfree4> 
(unfortunately, I am processing a large batch of files, and cannot 
afford to restart X :D). Basically, this has to do with "backing store" 
and "save unders". Does anyone have any comments on this?

	Thank you,
José L Gómez Dans			PhD student
Tel: +44 114 222 5582			Radar & Communications Group
FAX; +44 870 132 2990			Department of Electronic Engineering
					University of Sheffield UK

More information about the Scipy-dev mailing list