QuickTimeTcl and Python/Tkinter crash

Mickel Grönroos mickel at csc.fi
Tue Mar 30 08:12:47 CEST 2004

On Tue, 29 Mar 2004, Myles wrote:

> You might wish to try trapping the destroy event, and writing your own
> exit routine that explicitly destroys the Movie object.

I'm afraid writing an explicit destroy method did not do the trick. I
still get the same error. ("""The instruction at "0x6697c820" referenced
memory at "0x01681f1c". The memory could not be "written". Click on OK to
terminate the program""")

Here is the latest code (that still causes the crash):


import Tkinter

class Movie(Tkinter.Widget):
    """Wrapper class for QuickTimeTcl::movie."""
    def __init__(self, parent, cnf={}, **kw):
	"""Constructor. Parameters the same as here:
        parent.tk.eval('package require -exact QuickTimeTcl 3.1')
        Tkinter.Widget.__init__(self, parent, 'movie', cnf, kw)

def closing(m, r):
    """Test for destroying the movie and root window when clicking X."""
    m = None

root = Tkinter.Tk()
m = Movie(root, file="toaster.mpeg")
              (lambda x=m, y=root: closing(x,y)))

## Tried the following too, but has not effect.
m = None
del m


Any ideas what to try next!?

/Mickel G.

Mickel Grönroos, application specialist, linguistics, Research support, CSC
PL 405 (Tekniikantie 15 a D), 02101 Espoo, Finland, phone +358-9-4572237
CSC is the Finnish IT center for science, www.csc.fi

More information about the Python-list mailing list