By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,718 Members | 1,840 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,718 IT Pros & Developers. It's quick & easy.

Tkinter weird (and randomly inconsistant) crashes

P: n/a

Hi All,

My setup is:

Python 2.5.1
TKinter version: $Revision: 50704 $
Tcl: 8.4
Debugger: WinPdb

My program uses some Tkinter code written by someone else, that
creates a basic 24x80 terminal across different platforms. The
terminal worked fine in earlier versions of Python (version 1.5.2 and
2.2.1) but it's doing the weirdest stuff under 2.5.1 (so far I've only
been testing in Windows XP).

I've been playing with this problem for several days now and it's got
me stumped. When I step through the code on the debugger it works just
fine--but when I run the program without breakpoints *or* run it
straight from Python the Tkinter module starts throwing exceptions.

The weird part is, the exceptions occur in different parts of the
Tkinter module at different times. I can run the program 5 times and
no problem then I can have a dozen attempts where it never finishes
printing the game introduction--and worse it stops at *different*
points (and different parts of the Tkinter code) every time. There's
no pattern I can see. I do nothing different each time, and the
program crashes long before any user inputs.

There are a few commonalities:

1) It's always Tkinter throwing the exceptions

2) Using WConio or a "glass tty" terminal there are never any

3) As best I can determine, it seems to be some sort of timing issue.
For example, one exception occurs in the "see" method because of a bad
passed index. In the debugger I can see that the string "None" was
passed--but the code doing the passing uses Tkinter.END! Worse, the
debugger clearly shows that Tkinter.END should be "end", not "None"
when evaluated right after the exception is thrown.

I got a similar problem from the Pane.text.GetYX() function--it also
returned "None" (randomly) instead of the coordinate pair it normally

Has anybody ever heard of anything like this? I'm an experienced
Python programmer, but I never deal with Tkinter and the randomness of
this is really bizarre.

Any help would be greatly appreciated!



"The world is my home, it's just that some rooms are draftier than
others". -- Wolf
Dec 9 '07 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.