This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: IDLE error on closing 3.8+ debug build
Type: behavior Stage: needs patch
Components: IDLE Versions: Python 3.9, Python 3.8
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: terry.reedy Nosy List: ZackerySpytz, taleinat, terry.reedy
Priority: normal Keywords:

Created on 2019-07-09 09:20 by terry.reedy, last changed 2022-04-11 14:59 by admin.

Messages (8)
msg347530 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2019-07-09 09:20
In Win Command Prompt, in master repository or 3.8 worktree with 32 bit debug build:

F:\dev\3x>python
Running Debug|Win32 interpreter...
Python 3.9.0a0 (heads/master:110a47c4f4, Jul  9 2019, 01:31:55) [MSC v.1900 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> quit()
***Exits okay***

F:\dev\3x>python -m idlelib
Running Debug|Win32 interpreter...
Exception ignored in: <idlelib.run.PseudoInputFile object at 0x053F5710>
Traceback (most recent call last):
  File "F:\dev\3x\lib\idlelib\run.py", line 488, in close
  File "F:\dev\3x\lib\idlelib\pyshell.py", line 1017, in close
  File "F:\dev\3x\lib\idlelib\editor.py", line 1019, in close
  File "F:\dev\3x\lib\idlelib\outwin.py", line 94, in maybesave
  File "F:\dev\3x\lib\idlelib\editor.py", line 952, in get_saved
AttributeError: 'NoneType' object has no attribute 'get_saved'

Same in 3.8 worktree, not in 3.7 worktree, not with installed 64 bit, non-debug 3.8.0b2
msg347531 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2019-07-09 09:26
I am pretty sure that this started sometime well after 3.7 was split off from master.  Perhaps there was some change in python shutdown not backported to 3.7.
msg347611 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2019-07-10 08:52
One time after doing something unusual with IDLE (editing theme?, not sure) I did not get message on exit.  But next time, back again.
msg347665 - (view) Author: Tal Einat (taleinat) * (Python committer) Date: 2019-07-11 09:23
Doesn't reproduce on Win10 with current master.
msg347745 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2019-07-12 14:38
I still see it after update and rebuild.  What could be different?  An error in one of my files?
msg347746 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2019-07-12 15:21
"Exception ignored" is not produced by IDLE, and we have seen this before. multicall, line 29 says:

# In 3.4, if no shell window is ever open, the underlying Tk widget is
# destroyed before .__del__ methods here are called.  The following
# is used to selectively ignore shutdown exceptions to avoid
# 'Exception ignored' messages.  See http://bugs.python.org/issue20167
APPLICATION_GONE = "application has been destroyed"

For #20167, the object, condensed traceback, and exception were different, but the format was the same.  The check is in __del__, line 63.  This 'sweep the problem under the rug' fix was suggested by Tal and committed by me in 2014 for 3.4.  I hypothesized then that is had something to do with Python shutdown changing.

Before 3.8 releases, we should either sweep this and #37751 under the rug also, or take a good look at shutdown and try to fix it.
msg347747 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2019-07-12 15:32
Possible sweep-more-under-the-rug fix for both current issues: add links and, after current 'except tkinter.TclError',

            except AttributeError:
                pass
msg347883 - (view) Author: Tal Einat (taleinat) * (Python committer) Date: 2019-07-14 08:24
> Doesn't reproduce on Win10 with current master.

Sorry, my mistake; I meant to post that on #37551, and got mixed up.
History
Date User Action Args
2022-04-11 14:59:17adminsetgithub: 81705
2019-07-14 08:24:30taleinatsetmessages: + msg347883
2019-07-12 15:32:57terry.reedysetmessages: + msg347747
2019-07-12 15:21:22terry.reedysetmessages: + msg347746
2019-07-12 14:38:14terry.reedysetmessages: + msg347745
2019-07-11 09:23:46taleinatsetmessages: + msg347665
2019-07-10 08:52:25terry.reedysetmessages: + msg347611
2019-07-09 09:26:22terry.reedysetmessages: + msg347531
2019-07-09 09:23:16terry.reedysetnosy: + ZackerySpytz
2019-07-09 09:22:17terry.reedysetnosy: + taleinat
2019-07-09 09:20:18terry.reedycreate