Blender Git Commit Log

Git Commits -> Revision 302625e

Revision 302625e by Bastien Montagne (master)
February 8, 2021, 14:59 (GMT)
Fix (studio-reported) crash in readfile code.

Essentially, `lib_link_all` would perform some post-processing over data
in given `bmain` that **may** fail when not all data from all libraries
has been properly loaded yet.

This happens when `lib_link_all` is called from `read_libraries`, where
the bmains are split by libraries.

Now those post-processing is put into its own utils function, which
asserts that it is only called on a merged bmain.

Bonus point, this will avoid re-runing those not-so-cheap operations
more than once on the same data.

Reproducible in r1442 of Sprite repository when opening
`pro/animation_test/rex/performance/rex_crowdcamping/rex_crowdcamping.lighting.blend`

NOTE: Not so sure why we have to call `lib_link_all` several times (once
for each library, and then once on the whole merged bmain, including
local IDs then). So that it can get called for libs while we still have
that specific .blend file handle around?
In any case, the overhead here is minimal since we do ensure a data-block is
never lib-linked more than once, so this is not a serious concern right now.

Differential Revision: https://developer.blender.org/D10307

Commit Details:

Full Hash: 302625eb37e6df6a7a5a889c9dd7edbaa640e086
Parent Commit: f5c781a
Lines Changed: +20, -9

1 Modified Path:

/source/blender/blenloader/intern/readfile.c (+20, -9) (Diff)
By: Miika HämäläinenLast update: Nov-07-2014 14:18MiikaHweb | 2003-2021