[Image-SIG] Imaging-1.1.2 probs on RH Linux 7.1

Kip.Lehman@Level3.com Kip.Lehman@Level3.com
Tue, 2 Oct 2001 16:52:51 -0600


I'm having difficulties getting a test script to work with PIL on a Linux
box.
I've built and tested Imaging-1.1.2 on a Solaris 2.6 box and had no
problems.
Sadly, that isn't the case on the Linux box.

environment:

   Red Hat Linux 7.1
   Python 2.1.1
   Numeric-20.0.0

   Imaging-1.1.2 was built in a local directory, no compilation problems 
   were observed.  Running the coretest in the libImaging sub-directory had 
   a satisfactory result.

problem:
   simple test program merely importing Image dumps core.

test program 'piltest.py in the PIL subdirectory:
------------------------cut----------------
import sys, os

import Image

print "i am done"
sys.exit(0)
------------------------cut---------------------

results:
dabox(me)[76]: export PYTHONPATH=".:./PIL"
dabox(me)[77]: /usr/local/bin/python PIL/piltest.py
i am done
Memory fault (core dumped)

In testing a slightly larger script, I can seemingly create an Image
instance and a 
Draw instance and draw lines and rectangles.  However, the call to the Draw
 instance's text method eventually leads to a core dump.

Just to see what was going on I augmented the text method with some
debugging output.
In essence it brackets the call to draw_bitmap.  What is strange is that the
call
to draw_bitmap doesn't fail but the call to the text method doesn't return
before
the core dump.  I even put in a noop method call at the end of the text
method to 
see what  was going on.  the noop method got called and returned but
seemingly the
return from the text method hits some sort of condition where the core dump
occurs.

...in text method
calling draw_bitmap...
    xy   is a <type 'tuple'>,  value: (50, 105)
    ink  is a <type 'int'>,    value: -1
    text is a <type 'string'>, value: Does this work?
    font is a <type 'instance'>, value: <ImageFont.ImageFont instance at
0x401e27ec>
    font.getmask(text) returned :<ImagingCore object at 0x401e02f0>
I am in the noop method!
and now I'm back from noop prior to returning from text method
Memory fault (core dumped)

Has anyone else seen and solved this sort of thing?

--
Kip Lehman
Level(3) Communications
Global Network Management Systems
kip.lehman@level3.com