msg185802 - (view) |
Author: Roger Serwy (roger.serwy) *  |
Date: 2013-04-02 03:42 |
Using the bigfile.py generation program from #17613 triggers the following traceback: Traceback (most recent call last): File "/usr/bin/idle", line 5, in main() File "/usr/lib/python3.3/idlelib/PyShell.py", line 1431, in main if flist.open(filename) is None: File "/usr/lib/python3.3/idlelib/FileList.py", line 36, in open edit = self.EditorWindow(self, filename, key) File "/usr/lib/python3.3/idlelib/PyShell.py", line 113, in __init__ if self.io.filename: self.restore_file_breaks() File "/usr/lib/python3.3/idlelib/PyShell.py", line 229, in restore_file_breaks filename = self.io.filename AttributeError: 'NoneType' object has no attribute 'filename' |
|
|
msg185803 - (view) |
Author: Roger Serwy (roger.serwy) *  |
Date: 2013-04-02 03:44 |
I misworded the first sentence. It should have read: "Using bigfile.py as generated by the program in #17613 can trigger the following traceback when quickly closing the editor." Other large files can be used to trigger the bug as well, like Lib/decimal.py. |
|
|
msg185804 - (view) |
Author: Roger Serwy (roger.serwy) *  |
Date: 2013-04-02 04:05 |
Like #17613, the root cause is a call to .update() in Lib/idlelib/PyShell.py .restore_file_breaks(). The attached patch fixes the issue. |
|
|
msg185811 - (view) |
Author: Senthil Kumaran (orsenthil) *  |
Date: 2013-04-02 04:50 |
Is there a better way to reproduce the error in the first place. On 2.7 tip, ./python -m idelib.idle Opened and closed bigfile.py and decimal.py - and could not reproduce the error. If I could, I could have tested the patch. |
|
|
msg185815 - (view) |
Author: Roger Serwy (roger.serwy) *  |
Date: 2013-04-02 04:59 |
I forgot to specify that the race condition gets triggered by pressing Alt-F4 the moment the IDLE editor window appears. I am reliably reproducing the error using the Konsole terminal under Arch Linux. |
|
|
msg185820 - (view) |
Author: Ned Deily (ned.deily) *  |
Date: 2013-04-02 06:57 |
LGTM |
|
|
msg185879 - (view) |
Author: Roger Serwy (roger.serwy) *  |
Date: 2013-04-03 02:01 |
Updated patch based on Ezio's comments. Thank you, Ezio! Senthil, I wish I had a Mac to test against. I am able to trigger the bug on Win7 with 3.3. Without objection, I will commit the patch in the upcoming hours. |
|
|
msg185881 - (view) |
Author: Roundup Robot (python-dev)  |
Date: 2013-04-03 03:41 |
New changeset 1e5e497ee33b by Roger Serwy in branch '2.7': #17614: IDLE no longer raises exception when quickly closing a file. http://hg.python.org/cpython/rev/1e5e497ee33b New changeset d759b7bc9785 by Roger Serwy in branch '3.3': #17614: IDLE no longer raises exception when quickly closing a file. http://hg.python.org/cpython/rev/d759b7bc9785 New changeset 578edbe38f0a by Roger Serwy in branch 'default': #17614: merge with 3.3. http://hg.python.org/cpython/rev/578edbe38f0a |
|
|