Tkinter weird (and randomly inconsistant) crashes

Discussion in 'Python' started by wolfonenet@zoomtown.com, Dec 9, 2007.

  1. Guest

    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, 2007
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Mark
    Replies:
    6
    Views:
    422
  2. =?Utf-8?B?amNyaXY=?=

    Inconsistant Browser linking

    =?Utf-8?B?amNyaXY=?=, Sep 22, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    365
    =?Utf-8?B?amNyaXY=?=
    Sep 22, 2004
  3. Jeff Epler
    Replies:
    0
    Views:
    531
    Jeff Epler
    Aug 20, 2004
  4. Jeff Epler
    Replies:
    0
    Views:
    480
    Jeff Epler
    Aug 23, 2004
  5. Dudely
    Replies:
    3
    Views:
    115
    Dudely
    Nov 23, 2008
Loading...

Share This Page