Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Blender 3.4/3.6 - QT Menus not being destroyed consistently and SEGFAULTing #19

Open
jonahjnewton opened this issue Jun 4, 2024 · 0 comments

Comments

@jonahjnewton
Copy link

jonahjnewton commented Jun 4, 2024

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:

  1. Load Blender 3.4+ with tk-blender
  2. Open tk-multi-workfiles2 File Open menu.
  3. Close tk-multi-workfiles2 File Open menu. Repeat 2-3 times.
  4. 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.

@jonahjnewton jonahjnewton changed the title QT Menus not being destroyed consistently and SEGFAULTing Blender 3.4/3.6 - QT Menus not being destroyed consistently and SEGFAULTing Jun 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant