472,983 Members | 2,407 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,983 software developers and data experts.

Tkinter weird (and randomly inconsistant) crashes

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
0 1477

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

by: srijit | last post by:
Hello, Any idea - why the following code crashes on my Win 98 machine with Python 2.3? Everytime I run this code, I have to reboot my machine. I also have Win32all-157 installed. from Tkinter...
by: Mickel Grönroos | last post by:
Hi everybody, I'm using QuickTimeTcl (3.1) to be able to play movie files in my Tkinter application (Python 2.3.2) on Windows 2000. I was planning to write a simple wrapper class,...
by: Irmen de Jong | last post by:
Hi, I'm having trouble with the code below. It's just a regular Tk text widget in which you can type and select text as expected, however the call to tkFileDialog.askopenfilename() seems to screw...
by: Ajay | last post by:
hi! on my gui, i have a "start server" button and a "stop server" button. the problem is "start server" will loop infinitely and respond to requests. i'd like to be able to click on "stop...
by: Michael Zhang | last post by:
My project uses Python-2.3.4 + Tkinter + PIL-1.1.4 to retrieve images from server and display those images. I created a thread (also a separate toplevel window) for displaying images and another...
by: Brian Kazian | last post by:
I am currently having trouble running a piece of code I have written. My main code is called new.py, and when I run it, it pops up the TKinter root window as specified. However, if I try perform...
by: aldonnelley | last post by:
Hi all. Just having a weird problem with tkinter. I'm trying to make a gui that shows results from an image search, with a "forward" and "back" button so the user can compare results from...
by: bradhs | last post by:
Hello, Microsfot Access 2003 crashes constantly and randomly on Vista. I cant Compact and Repair, import into a new ADP file, etc... It crashes while opening a form, moving objects around in a...
by: Russell Blau | last post by:
I have some Tkinter programs that I run on two different machines. On Machine W, which runs Python 2.5.1 on Windows XP, these programs run fine. On Machine H, which runs Python 2.5.1 on Windows...
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 4 Oct 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
by: Aliciasmith | last post by:
In an age dominated by smartphones, having a mobile app for your business is no longer an option; it's a necessity. Whether you're a startup or an established enterprise, finding the right mobile app...
by: NeoPa | last post by:
Introduction For this article I'll be using a very simple database which has Form (clsForm) & Report (clsReport) classes that simply handle making the calling Form invisible until the Form, or all...
by: Teri B | last post by:
Hi, I have created a sub-form Roles. In my course form the user selects the roles assigned to the course. 0ne-to-many. One course many roles. Then I created a report based on the Course form and...
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 1 Nov 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM) Please note that the UK and Europe revert to winter time on...
by: NeoPa | last post by:
Introduction For this article I'll be focusing on the Report (clsReport) class. This simply handles making the calling Form invisible until all of the Reports opened by it have been closed, when it...
by: isladogs | last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, Mike...
by: GKJR | last post by:
Does anyone have a recommendation to build a standalone application to replace an Access database? I have my bookkeeping software I developed in Access that I would like to make available to other...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.