bdk-blender/source/blender/blenloader
Bastien Montagne 6f625cedf1 Fix rare crashes when reading files with multi-levels of libraries.
Some left-over code from old refactoring/improvements of old addresses
remapping in library reading code was causing some wrong remapping
between different IDs.

The code was actually not doing what its comment was describing, since
it would cause a random remapping to a different new address than the
expected one:

Initial state, before removed buggy line:
`old_addr_1 -> new_addr_1`
`old_addr_2 -> new_addr_2`

End state, if `old_addr_2` == `new_addr_1`:
`old_addr_1 -> new_addr_2`
`old_addr_2 -> new_addr_2`

From the description of the removed line, that behavior was actually
already covered by adding the remapping rule in the line above, since
adding a remapping overwrite an existing one if needed, so the line
above would do (in case a placeholder ID existed before the actual ID
got read):

Initial state, before adding new remapping rule:
`old_addr_1 -> new_addr_placeholder_1`

End state, after adding remapping to newly read ID:
`old_addr_1 -> new_addr_1`

NOTE: Noticed thanks to rare failures of the liboverride tests on
buildbots. The issue was less than 1%-reproducible with a debug build
and ASAN, but had about 2-4% repducibility with release builds.

Pull Request: blender/blender#114784
2023-11-27 17:34:07 +01:00
..
intern Fix rare crashes when reading files with multi-levels of libraries. 2023-11-27 17:34:07 +01:00
tests Revert changes from main commits that were merged into blender-v4.0-release 2023-10-30 21:40:35 +01:00
BLO_blend_defs.hh Cleanup: Move BLO headers to C++ 2023-08-28 15:01:05 +02:00
BLO_blend_validate.hh Cleanup: Move BLO headers to C++ 2023-08-28 15:01:05 +02:00
BLO_read_write.hh Cleanup: Remove unnecessary struct keyword from newly C++ headers 2023-09-22 08:08:19 -04:00
BLO_readfile.h Cleanup: doxygen parameters, blank comment lines 2023-09-08 16:53:30 +10:00
BLO_undofile.hh Cleanup: spelling in comments 2023-09-05 11:04:27 +10:00
BLO_writefile.hh Cleanup: Move BLO headers to C++ 2023-08-28 15:01:05 +02:00
CMakeLists.txt Anim: move bone colors from bone groups to individual bones 2023-08-29 14:31:18 +02:00