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 does not close properly when using add-on #88

Open
tlpss opened this issue Sep 26, 2023 · 1 comment
Open

Blender does not close properly when using add-on #88

tlpss opened this issue Sep 26, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@tlpss
Copy link

tlpss commented Sep 26, 2023

Describe the bug

When using the add-on, blender does not close when pressing CTRL+Q. It does close when pressing CTLR+Q (or pressing the UI button) and then pressing CTRL+C in the terminal, after which a thread appears that seems to suggest it was stuck in acquiring a lock.

This does not happen deterministically, sometimes blender closes by itself.

When disabling the add-on, the issue goes away.

Console log

CTRL+Q in UI + CTRL+C in terminal:

✗ blender    
                       
Read prefs: /home/tlips/.config/blender/3.4/config/userpref.blend
....
(program output)
....

<press CTRL+Q in UI>
Saved session recovery to '/tmp/quit.blend'

<press CTRL+C>
^CException ignored in: <module 'threading' from '/home/tlips/Documents/synthetic-cloth-data/airo-blender/blender/blender-3.4.1-linux-x64/3.4/python/lib/python3.10/threading.py'>
Traceback (most recent call last):
  File "/home/tlips/Documents/synthetic-cloth-data/airo-blender/blender/blender-3.4.1-linux-x64/3.4/python/lib/python3.10/threading.py", line 1567, in _shutdown
    lock.acquire()
KeyboardInterrupt: 

Blender quit


CTRL+Q in UI:

....
(normal program output)
....


<press CTRL+Q>
Saved session recovery to '/tmp/quit.blend'
Exception in thread Thread-3 (long_task):
Traceback (most recent call last):
  File "/home/tlips/Documents/synthetic-cloth-data/airo-blender/blender/blender-3.4.1-linux-x64/3.4/python/lib/python3.10/threading.py", line 1016, in _bootstrap_inner
    self.run()
  File "/home/tlips/Documents/synthetic-cloth-data/airo-blender/blender/blender-3.4.1-linux-x64/3.4/python/lib/python3.10/threading.py", line 953, in run
    self._target(*self._args, **self._kwargs)
  File "/home/tlips/.config/blender/3.4/scripts/addons/polyhavenassets/operators/resolution_switch.py", line 115, in long_task
    self.prog += 1
  File "/home/tlips/Documents/synthetic-cloth-data/airo-blender/blender/blender-3.4.1-linux-x64/3.4/scripts/modules/bpy_types.py", line 812, in __getattribute__
    properties = StructRNA.path_resolve(self, "properties")
ReferenceError: StructRNA of type PHA_OT_resolution_switch has been removed
Writing: /tmp/blender.crash.txt

To Reproduce
run blender from the terminal, then try to close.

Expected behavior
blender closes as expected on CTRL+Q in the UI.

Additional context
blender version: 3.4.1
add-on version: 1.1.5

@gregzaal gregzaal added the bug Something isn't working label Sep 26, 2023
@gregzaal
Copy link
Member

Thanks for the report. Seems like threads may still be busy when the add-on is unregistered, and then properties that the threads expect are no longer available. Will investigate soon, though I have not heard any similar reports nor have I ever run into this issue in normal usage, so this is not the top priority at the moment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants