[issue39093] tkinter objects garbage collected from non-tkinter thread cause panic and core dump

2020-06-15 Thread E. Paine
E. Paine added the comment: My initial thoughts were just to give the standard lecture on why "tkinter + threads = bad". However, looking again at the problem, the async handler error causes the Python interpreter to crash, which, no matter how frowned upon the code is, shouldn't happen.

[issue39093] tkinter objects garbage collected from non-tkinter thread cause panic and core dump

2019-12-19 Thread obserience
obserience added the comment: My proposed fix isn't compatible with a lot of current Tkinter using code. It was a naive first attempt and breaks existing code and doesn't completely solve the problem. Variables currently retain a reference to the TCL interpreter self._tk and aren't linked

[issue39093] tkinter objects garbage collected from non-tkinter thread cause panic and core dump

2019-12-18 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +gpolo, serhiy.storchaka ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue39093] tkinter objects garbage collected from non-tkinter thread cause panic and core dump

2019-12-18 Thread obserience
obserience added the comment: A quick google search for "Tcl_AsyncDelete: async handler deleted by the wrong thread" yields plenty of users complaining about this error case. Usually they're trying add a gui to an existing application. They run it in a thread other than main and then leak a

[issue39093] tkinter objects garbage collected from non-tkinter thread cause panic and core dump

2019-12-18 Thread obserience
New submission from obserience : All tkinter objects have a reference to the TCL interpreter object "self.tk". The current cleanup code does not remove these when a widget is destroyed. Garbage collection of the TCL interpreter object occurs only after all gui objects are garbage collected.