Describe the bug
QT windows opened through the Shotgun menu do not always get destroyed properly when they are closed, and thus cause Segmentation Faults often. I believe this is either due to the QT event loop not being handled properly, or the threads created by tk-framework-shotgunutils not being resolved before the window is destroyed with destroyLater in tk-core.
This happens very consistently when trying to create a New File through tk-multi-workfiles2, and also occurs when opening and closing the tk-multi-workfiles2 or tk-multi-about windows 2-3 times.
To Reproduce
Steps to reproduce the behavior:
Load Blender 3.4+ with tk-blender
Open tk-multi-workfiles2 File Open menu.
Close tk-multi-workfiles2 File Open menu. Repeat 2-3 times.
Blender will crash with a Seg Fault.
Desktop (please complete the following information):
OS: CentOS 7
Qt/Pyside2 5.15.12
Blender 3.4/3.6 (occurs in both)
Python 3.10
tk-framework-shotgunutils 5.9.1
tk-framework-qtwidgets 2.11.0
tk-multi-workfiles2 0.14.1
tk-multi-about 0.5.0
tk-core 0.20.26
Additional context
To prevent the QtWindowEventLoop operator from returning FINISHED immediately after opening Blender, I commented out the following lines in Shotgun_menu.py, causing the TIMER event to run continuously.
if self._app and not self.anyQtWindowsAreOpen():
self.cancel(context)
return {"FINISHED"}
The error occurs regardless of whether these lines are commented out or not.
Describe the bug QT windows opened through the Shotgun menu do not always get destroyed properly when they are closed, and thus cause Segmentation Faults often. I believe this is either due to the QT event loop not being handled properly, or the threads created by tk-framework-shotgunutils not being resolved before the window is destroyed with destroyLater in tk-core.
This happens very consistently when trying to create a New File through tk-multi-workfiles2, and also occurs when opening and closing the tk-multi-workfiles2 or tk-multi-about windows 2-3 times.
To Reproduce Steps to reproduce the behavior:
Desktop (please complete the following information):
Additional context To prevent the QtWindowEventLoop operator from returning FINISHED immediately after opening Blender, I commented out the following lines in Shotgun_menu.py, causing the TIMER event to run continuously.
The error occurs regardless of whether these lines are commented out or not.