468,140 Members | 1,613 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,140 developers. It's quick & easy.

Tkinter weird (and randomly inconsistant) crashes


Hi All,

My setup is:

WinXP
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
problems.

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
does.

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!

Wolf
Respectfully,

Wolf

"The world is my home, it's just that some rooms are draftier than
others". -- Wolf
Dec 9 '07 #1
0 1147

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by srijit | last post: by
3 posts views Thread by Mickel Grönroos | last post: by
2 posts views Thread by Irmen de Jong | last post: by
1 post views Thread by Ajay | last post: by
2 posts views Thread by Michael Zhang | last post: by
reply views Thread by Brian Kazian | last post: by
2 posts views Thread by Russell Blau | last post: by
1 post views Thread by gcdp | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.