Tkinter program crashes

srijit at srijit at
Sat Aug 16 04:08:39 CEST 2003

Hello Members,

Here are the details of Python Tkinter applications crash on my
machine (Win 98, Python 2.3 and Win32all-157).

This has happened whenever I try to run a Tkinter application. The
application runs fine. The problem happens whenever I exit from the
Tkinter application.
This was happening with Python 2.3b1. It continued to happen when I
uninstalled Python 2.3b1 and installed python 2.3.

The only exception is IDLE. IDLE is also a Tkinter application. Other
Python applications are yet to give problems. For example I was
successful in running PyGTK applications on my same setup.

For example when I ran the Tkinter code (refer below for the actual
code) and exited from the application I got the following message.

PYTHON caused an invalid page fault in
module KERNEL32.DLL at 0167:bff7b9a6.
EAX=00000000 CS=0167 EIP=bff7b9a6 EFLGS=00000246
EBX=011033a0 SS=016f ESP=0062f878 EBP=0062f888
ECX=01103370 DS=016f ESI=01105a98 FS=3c4f
EDX=7efeff73 ES=016f EDI=01103370 GS=0000
Bytes at CS:EIP:
ff 76 04 e8 13 89 ff ff 5e c2 04 00 56 8b 74 24 
Stack dump:
0110484c 010f274f 01105a98 0000002e 0062f8d4 010f0c79 00000009
01103370 0062f98d 010f0c48 0000002e 010ef913 0000002e 00000001
010d9f40 0000002e

I am unable to figure out the problem. I guess re-installing Python
2.3 will not help.
I hope somebody will help me to run Tkinter applications comfortably
on my machine. Otherwise I have to live without Tkinter applications
(except IDLE) on my machine.
I also know it does not happen on Win 2000 or Win XP. Now I cannot
afford Win 2000 or XP.


The Tkinter code which crashed my Win 98 machine is :

import Tkinter

class App(Tkinter.Frame):
    def __init__(self, master):
        Tkinter.Frame.__init__(self, master)

        self.button = Tkinter.Button(
            self, text="QUIT", fg="red", command=self.quit)

        def say_hi():
            print "hi there, everyone!"

        self.hi_there = Tkinter.Button(
            self, text="Hello", command=say_hi)

if __name__ == "__main__":
    root = Tkinter.Tk()
    app = App(root)

More information about the Python-list mailing list