Roger Serwy added the comment:

I was able to trigger this problem on 2.7 as well. Changing type to behavior as 
the core interpreter is not crashing.

Lukas, the only way I can trigger the traceback is by closing the editor while 
the colorizer is still colorizing. Clicking randomly on the editor itself did 
not trigger the bug. Can you clarify what you meant when you said "window 
receives events (clicks...)"?


Closing the window place a <<close-window>> event on the Tk event queue.
Calling .update() causes Tk to process all events in the queue, including 
callbacks into IDLE. As a result, closing a window can trigger a few different 
use-after-free conditions.

I managed to trigger two of these in the __init__ of PyShellEditorWindow in 
Lib/idlelib/PyShell.py. The self.io reference can be set to None during 
EditorWindow.__init__(self, *args) or during self.restore_file_breaks().

The Lib/idlelib/ColorDelegator.py also has a .update() in its recolorize_main 
loop.

----------
stage:  -> needs patch
title: IDLE segfaults in tkinter after fresh file's text has been rendered -> 
IDLE raises an exception in tkinter after fresh file's text has been rendered
type: crash -> behavior
versions: +Python 2.7

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue16547>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to