Author serhiy.storchaka
Recipients BreamoreBoy, Honest Abe, Keith.Bannister, PythonInTheGrass, amaury.forgeotdarc, asvetlov, belopolsky, cgohlke, loewis, pitrou, serhiy.storchaka, terry.reedy
Date 2014-07-12.07:49:21
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1405151363.6.0.11184121093.issue11077@psf.upfronthosting.co.za>
In-reply-to
Content
I can't reproduce the bug on 2.7.8+, but on 2.7.3 I sometimes got messages like "Exception in thread Thread-26 (most likely raised during interpreter shutdown):" or:

  File "/usr/lib/python2.7/lib-tk/Tkinter.py", line 2204, in create_line
  File "/usr/lib/python2.7/lib-tk/Tkinter.py", line 2184, in _create
<type 'exceptions.TypeError'>: 'NoneType' object is not callable

This points to shutdown issue. When TkinterCrash2.py call quit(), other threads are still work. And when modules (including Tkinter and __main__) are cleaned, they try to call global functions which are set to None. After fixing TkinterCrash2.py to not invoke any code during shutdown, error messages on 2.7.3 gone.

I don't see any bugs in Tkinter exposed by this script, only a bug in the script itself.

Here is a script with quick and dirty fix. This solution is not perfect, there is small chance of race conditions (happened once in about 500 runs). Correct solution should be more complicated. If there no other errors in TkinterCrash2-2.py, this issue can be closed.
History
Date User Action Args
2014-07-12 07:49:23serhiy.storchakasetrecipients: + serhiy.storchaka, loewis, terry.reedy, amaury.forgeotdarc, belopolsky, pitrou, asvetlov, cgohlke, BreamoreBoy, PythonInTheGrass, Honest Abe, Keith.Bannister
2014-07-12 07:49:23serhiy.storchakasetmessageid: <1405151363.6.0.11184121093.issue11077@psf.upfronthosting.co.za>
2014-07-12 07:49:23serhiy.storchakalinkissue11077 messages
2014-07-12 07:49:23serhiy.storchakacreate