[Image-SIG] Python 1.5.2 core dumps on Linux

Charles G Waldman cgw@pgt.com
Wed, 9 Dec 1998 11:48:21 -0500 (EST)


On my Linux box, running Python 1.5.2b1 and PIL-0.3b2, I repeatably
get the following core-dump:

janus:~> python
Python 1.5.2b1 (#2, Nov 20 1998, 17:27:56)  [GCC 2.7.2.3] on linux2
Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam
>>> import Image
>>> Image.fromstring()
Segmentation fault (core dumped)

janus:~> gdb `which python` core
GNU gdb 4.17
<gdb startup banner omitted>
Core was generated by `python'.
Program terminated with signal 11, Segmentation fault.
Reading symbols from /lib/libtermcap.so.2...done.
Reading symbols from /usr/lib/libtix4.1.8.0.so...done.
Reading symbols from /usr/lib/libtk8.0.so...done.
Reading symbols from /usr/lib/libtcl8.0.so...done.
Reading symbols from /lib/libm.so.5...done.
Reading symbols from /lib/libdl.so.1...done.
Reading symbols from /lib/libc.so.5...done.
Reading symbols from /lib/ld-linux.so.1...done.
Reading symbols from /usr/local/lib/python1.5/site-packages/PIL/_imaging.so...done.
Reading symbols from /usr/lib/libjpeg.so.6...done.
Reading symbols from /usr/lib/libz.so.1...done.
#0  0x8077563 in PyObject_Print (op=0x8111f7d, fp=0x80dde40, flags=0) at object.c:178
178                     else if (op->ob_type->tp_print == NULL) {
(gdb) where
#0  0x8077563 in PyObject_Print (op=0x8111f7d, fp=0x80dde40, flags=0) at object.c:178
#1  0x806f128 in PyFile_WriteObject (v=0x8111f7d, f=0x80e1650, flags=0)
    at fileobject.c:989
#2  0x807ea70 in eval_code2 (co=0x8109070, globals=0x80e17c8, locals=0x80e17c8, args=0x0, 
    argcount=0, kws=0x0, kwcount=0, defs=0x0, defcount=0, owner=0x0) at ceval.c:1028
#3  0x807d852 in PyEval_EvalCode (co=0x8109070, globals=0x80e17c8, locals=0x80e17c8)
    at ceval.c:322
#4  0x806371b in run_node (n=0x8108698, filename=0x80b9f3a "<stdin>", globals=0x80e17c8, 
    locals=0x80e17c8) at pythonrun.c:882
#5  0x8062c22 in PyRun_InteractiveOne (fp=0x80ddf00, filename=0x80b9f3a "<stdin>")
    at pythonrun.c:523
#6  0x8062a97 in PyRun_InteractiveLoop (fp=0x80ddf00, filename=0x80b9f3a "<stdin>")
    at pythonrun.c:467
#7  0x80629e7 in PyRun_AnyFile (fp=0x80ddf00, filename=0x80b9f3a "<stdin>")
    at pythonrun.c:444
#8  0x8054aea in Py_Main (argc=1, argv=0xbffff964) at main.c:286
#9  0x8054510 in main (argc=1, argv=0xbffff964) at python.c:12
#10 0x805448e in ___crt_dummy__ ()


The other system on my desk is a PC running Python 1.5.1 and the same
version of PIL.   It gives the expected behavior:

hermes:~$ python -i
Python 1.5.1 (#0, Apr 13 1998, 20:22:04) [MSC 32 bit (Intel)] on win32
Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam
>>> import Image
>>> Image.fromstring()
Traceback (innermost last):
  File "<stdin>", line 1, in ?
TypeError: not enough arguments; expected 3, got 0
>>> 

There are two things different here - it's Windows rather than Linux
and it's Python 1.5.1 instead of 1.5.2b1.  I guess I have to do more
experiments to pin down which is the significant variable...