McManning / Coherence

Blender viewport renderer using the Unity Engine
MIT License
30 stars 0 forks source link

Hang while minimizing Blender #36

Closed McManning closed 3 years ago

McManning commented 3 years ago

Trying to track this down, not sure if it's just me or universal.

I mashed ctrl+c a few times to get a few interrupt dumps when it happened:


Traceback (most recent call last):
  File "C:\Users\cmcma\AppData\Roaming\Blender Foundation\Blender\2.91\scripts\addons\Coherence\core\driver.py", line 305, in on_tick
    def on_tick(self):
KeyboardInterrupt
Traceback (most recent call last):
  File "C:\Users\cmcma\AppData\Roaming\Blender Foundation\Blender\2.91\scripts\addons\Coherence\core\driver.py", line 351, in check_texture_sync
    def check_texture_sync(self) -> float:
KeyboardInterrupt
Python: Traceback (most recent call last):
  File "C:\Program Files\Blender Foundation\Blender 2.91\2.91\scripts\startup\bl_ui\space_topbar.py", line 27, in draw
    def draw(self, context):
KeyboardInterrupt

location: <unknown location>:-1
McManning commented 3 years ago

Few more notes on this:

McManning commented 3 years ago

Figured this out - the bpy.app.timers registered for on_tick likes to hang when running at 120 FPS. lib.Update() is definitely called while minimized but I think there's something between the time it takes to call that and Blender's attempt to re-run the timer causing a hang while minimized / trying to unminimize.

Switching the interval to 60 FPS fixed it for me but with the caveat of viewport performance looking worse.

What I'd like to do is have a dynamic FPS based on what the user is doing (actively moving the viewport camera / modeling - speeds up, then slows down when idle). I'll make a new ticket for that one though.