[Image-SIG] ImageTk.PhotoImage Bus Error on Snow Leopard

Richard Jones r1chardj0n3s at gmail.com
Tue Oct 13 07:25:54 CEST 2009


I'm getting a Bus Error attempting to use ImageTk.PhotoImage on Snow  
Leopard. I've compiled PIL myself. I'm using the system Tcl/Tk (8.4).  
The selftest.py runs fine.

The code I'm attempting is:

import Tkinter as tk
root = tk.Tk()
image = Image.open('Images/lena.jpg')
photo = ImageTk.PhotoImage(image)

and I get the Bus Error on the last line. gdb (which I'm quite rusty  
at driving) says:

 >>> photo = ImageTk.PhotoImage(image)
Reading symbols for shared libraries ... done

Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_PROTECTION_FAILURE at address: 0x00000028
0x16e72a28 in Tk_GetImageMasterData ()
(gdb)

I've manually traced and I know the code is breaking somewhere in  
PyImagingPhotoPut.

I've confirmed the image data loads OK (Image.load) by using the same  
image code in a pyglet program and displaying it.

Any suggestions?


       Richard



More information about the Image-SIG mailing list