idle BUG
Robin Becker
robin at jessikat.fsnet.co.uk
Thu Jun 14 19:18:38 EDT 2001
In article <tiifumpsm1ftca at news.supernews.com>, John Roth
<johnroth at ameritech.net> writes
>
>"Robin Becker" <robin at jessikat.fsnet.co.uk> wrote in message
>news:pkvruLAg7QK7Ewi3 at jessikat.fsnet.co.uk...
>> I think this must be a bug in Tkinter, but since no one ever responds I
>> thought I'd whine about idle instead.
>>
>> I run python2.1 Win95 OSR2.
>> Start a command window
>> run python idle.py
>
>It also happens when you try to execute from the DOS command
>line.
that's what I mean by command window (a dos box).
>> Kill the idle window using the mouse (click on the x). In some unknown
>> percentage of cases (like 50%) the process hangs and doesn't return to
>> the command window.
>
>It may be connected with exception handling. My purely subjective impression
>is that I get it irregularly when there has been an exception, and seldom
>(or never)
>if there hasn't been one.
>
well in my testing I take idle as the canonical Tkinter app as the MDFL
supports it so well. I start idle and then kill it using the x close
button. Certainly there may be exceptions in the code that aren't
reported, but certainly in this test I don't cause them since idle is
started and stopped.
>I also hadn't related it to the close button as opposed to the File|Exit
>command.
>I think that's a significant fact, since they have two very, and I mean
>very, different
>processing paths.
not really, the event is mapped to the root destroy somehow. Certainly
different widgets etc are involved. I've just explicitly hit the
File.exit and now have a hung dos box.
>
>> The hung process is very destructive and makes it impossible to reboot
>> the machine properly. This bug has been present for a very long time and
>> I'm fed up with it.
>
>I get rid of the command line with the three fingered salute
>(CTL-ALT-DELETE).
>Sometimes (not always) this causes Windows to hang on shutdown. Then it goes
>through a disk check on startup.
>
>> It's clearly some kind of race between python and Tcl/Tk. The problem
>> doesn't occur on win2k so I guess there's some difference between the
>> run times that helps.
>
>Technically, it can't be a "race" condition, since there is only one process
>(or
not so, Tcl/Tk has an event window TclNotifier that is listening for
events. As we know that Tcl can do asynchronous stuff (eg after) it's
fairly obvious that races can and do occur even when python isn't
threading.
>thread). I suspect the difference is that Win 9x and Win 2k may post events
>in different orders, thus causing the confusion. They are, after all,
>completely
>different code bases, and Win 2K doesn't have the global lock that Win 9x
>has when it's accessing legacy 16bit functionality.
>
>> similar apps in pure tcl/tk don't show this behaviour although it's
>> possible to make them do stupid things.
>
>I remember running across a patch somewhere reasonably official to the
>Tk event handling kernel to allow Python to get a somewhat different set of
>conditions on waiting for events. Since I know nothing about the issues, it
>went
>in the eyeball and promptly migrated to random access memory, where it
>lost any association with a URL.
>
>Wish I could help more, but I'm not a windows developer, so I am very shakey
>on using the developer tools, like event traces. I'd like it fixed, but it's
>going to have
>to wait on someone who knows low level Windows development.
>
...
I remember trying to do this once before. I found where the hang was
happening, but couldn't find how it occurred. I don't have the
experience really to figure out the bad event sequence.
--
Robin Becker
More information about the Python-list
mailing list