| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
…the wrong thread
Deallocating the interpreter from a thread other than the one it was created
in ran Tcl_DeleteInterp() there, which makes Tcl abort the process
("Tcl_AsyncDelete: async handler deleted by the wrong thread").
Tkapp_Dealloc() now leaks the interpreter in that case and reports a
RuntimeWarning instead.
Co-Authored-By: E. Paine <63801254+E-Paine@users.noreply.github.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…ded build On the free-threaded build the interpreter may be deallocated in its own thread (deferred reference counting), so the RuntimeWarning is not emitted. The no-crash guarantee is still checked by assert_python_ok(). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
Thanks @serhiy-storchaka for the PR 🌮🎉.. I'm working now to backport this PR to: 3.13, 3.14, 3.15. |
Sorry, something went wrong.
|
Sorry, @serhiy-storchaka, I could not cleanly backport this to 3.15 due to a conflict. cherry_picker 46d1809ccd4bc0e1439a4696b428d2a1c2edcfbf 3.15 |
Sorry, something went wrong.
|
Sorry, @serhiy-storchaka, I could not cleanly backport this to 3.14 due to a conflict. cherry_picker 46d1809ccd4bc0e1439a4696b428d2a1c2edcfbf 3.14 |
Sorry, something went wrong.
|
Sorry, @serhiy-storchaka, I could not cleanly backport this to 3.13 due to a conflict. cherry_picker 46d1809ccd4bc0e1439a4696b428d2a1c2edcfbf 3.13 |
Sorry, something went wrong.
|
GH-153271 is a backport of this pull request to the 3.15 branch. |
Sorry, something went wrong.
|
GH-153277 is a backport of this pull request to the 3.14 branch. |
Sorry, something went wrong.
|
GH-153278 is a backport of this pull request to the 3.13 branch. |
Sorry, something went wrong.
… the wrong thread (GH-152323) (GH-153271) Deallocating the interpreter from a thread other than the one it was created in ran Tcl_DeleteInterp() there, which makes Tcl abort the process ("Tcl_AsyncDelete: async handler deleted by the wrong thread"). Tkapp_Dealloc() now leaks the interpreter in that case and reports a RuntimeWarning instead. (cherry picked from commit 46d1809) Co-authored-by: E. Paine <63801254+E-Paine@users.noreply.github.com> Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
… the wrong thread (GH-152323) (GH-153278) Deallocating the interpreter from a thread other than the one it was created in ran Tcl_DeleteInterp() there, which makes Tcl abort the process ("Tcl_AsyncDelete: async handler deleted by the wrong thread"). Tkapp_Dealloc() now leaks the interpreter in that case and reports a RuntimeWarning instead. (cherry picked from commit 46d1809) Co-authored-by: E. Paine <63801254+E-Paine@users.noreply.github.com> Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
… the wrong thread (GH-152323) (GH-153277) Deallocating the interpreter from a thread other than the one it was created in ran Tcl_DeleteInterp() there, which makes Tcl abort the process ("Tcl_AsyncDelete: async handler deleted by the wrong thread"). Tkapp_Dealloc() now leaks the interpreter in that case and reports a RuntimeWarning instead. (cherry picked from commit 46d1809) Co-authored-by: E. Paine <63801254+E-Paine@users.noreply.github.com> Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
| Back | FazBrowse Home | New Git URL |
Dropping the last reference to a tkinter object from a thread other than the one its Tcl interpreter was created in ran Tcl_DeleteInterp() in that thread, which makes Tcl abort the whole process (Tcl_AsyncDelete: async handler deleted by the wrong thread). This typically happens when a tkinter object leaks into another thread and is garbage-collected there.
Tkapp_Dealloc() now checks the interpreter's thread and, when called in the wrong one, skips Tcl_DeleteInterp() and reports a RuntimeWarning (through the warnings machinery, so it can be filtered) instead of crashing. The interpreter is leaked, but it is small and can no longer be used once Python has dropped it.
Based on the approach in the draft PR #21532 by E. Paine.