This was caused by a double lock of the DRW context mutex.
This changes the logic a bit by releasing the DRW context before rendering
with BKE_sequencer_give_ibuf and restoring it after.
Critical fix for 2.91
Differential D8657
Fix T79940 VSE Editor crash when opening a different scene as a strip Authored by Clément Foucault (fclem) on Aug 20 2020, 2:19 PM.
Details This was caused by a double lock of the DRW context mutex. This changes the logic a bit by releasing the DRW context before rendering Critical fix for 2.91
Diff Detail
Event Timeline
Comment Actions This is weird to pass region to a function which generates imbuf. However, if it's for 2.90 probably is least reisky? But is there a better way to handle draw state related issue in the drawing code?
Comment Actions I did make sure to test all callers to the function and they seems to be fine. So for me it's on the safe end. Comment Actions Is this still aimed for 2.90? If it is, then, as Iv'e said before, this is safest way to move on. If it's for 2.91/master then I am not fully convinced this is the right decision to make ImBuf rendering depend on a region, and some more detailed discussion is needed (as there are better approaches). Comment Actions Nope the orignal patch which introduce the issue was reverted. So 2.91
So better do this save and restore outside of sequencer_ibuf_get ? I have no particular preference. This is just a sequencer function after all. Only used for drawing. Comment Actions
Please update the patch description then.
Or not save/restore state at all. One thing we've discussed with @Brecht Van Lommel (brecht) is to have more explicit "prepare drawing data" pass, so that you can call sequencer_ibuf_get outside of the drawing code and "cache" it somewhere so that the drawing "simply" use it. Such preparation can as well happen in threads ;) Comment Actions @Clément Foucault (fclem) @Dalai Felinto (dfelinto), that is it what is blocking this review to happen? | ||||||||||||||||||