Marc-Andre Lemburg <m...@egenix.com> added the comment:
On 27.05.2020 05:56, Nathaniel Smith wrote: > In CPython in general, it could be worked around by not invoking deallocators > with a live exception... I'm actually pretty surprised that this is even > possible! It seems like having a live exception when you start executing > arbitrary Python code would be bad. So maybe that's the real bug? Adding both > "asyncio" and "memory management" interest groups to the nosy. Exception handlers can execute arbitrary Python code, so it's not surprising that objects get allocated, deallocated, etc. What you're describing sounds more like a problem with the PySide2 code not being reentrant. Clearing exceptions always has to be done with some care. It's normally only applied to replace the exception with a more specific one, when the exception is expected and handled in the C code, or when there is no way to report the exception back up the stack. Note: Even the PyErr_Print() can result in Python code being executed and because it's likely that PySide2 objects are part of the stack trace, even PySide2 methods may be called as a result. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Experts (#1, May 27 2020) >>> Python Projects, Coaching and Support ... https://www.egenix.com/ >>> Python Product Development ... https://consulting.egenix.com/ ________________________________________________________________________ ::: We implement business ideas - efficiently in both time and costs ::: eGenix.com Software, Skills and Services GmbH Pastor-Loeh-Str.48 D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg Registered at Amtsgericht Duesseldorf: HRB 46611 https://www.egenix.com/company/contact/ https://www.malemburg.com/ ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue40789> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com