Page MenuHome

Fix T92704: Redrawing while saving crashes outside the main thread
ClosedPublic

Authored by Campbell Barton (campbellbarton) on Nov 8 2021, 1:50 AM.

Details

Summary

If the blend file is saved from a script in another thread,
like the render thread for example, Blender will crash on the call that
redraws the UI.


This patch adds a check to ensure that the UI is only redrawn if the redraw call is done in the main thread. This avoids the crash, and preserves the desired function of the redraw call to ensure that open menus are closed when a screenshot of Blender's UI is taken for use in file thumbnails.

Diff Detail

Repository
rB Blender

Event Timeline

Campbell Barton (campbellbarton) retitled this revision from Adds check to ensure the UI is redrawn only from the main thread when saving the blend file to Fix T92704: Redrawing windows while saving crashes outside the main thread.Nov 9 2021, 5:15 AM
Campbell Barton (campbellbarton) edited the summary of this revision. (Show Details)
Campbell Barton (campbellbarton) retitled this revision from Fix T92704: Redrawing windows while saving crashes outside the main thread to Fix T92704: Redrawing while saving crashes outside the main thread.
Campbell Barton (campbellbarton) edited the summary of this revision. (Show Details)

Looks Good to me?? I think only the title changed, which is a fair enough change. Brevity was never my strong suit.

This revision is now accepted and ready to land.Nov 9 2021, 5:51 AM