Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Montagne <bastien@blender.org>2022-05-19 12:47:28 +0300
committerBastien Montagne <bastien@blender.org>2022-05-19 12:47:28 +0300
commite42e4e8568edeb4e0b962e2059586c2a3d3b457d (patch)
tree2af12170c0e535b7bbe71a82c7775a3c658ad247 /source/blender
parentc88de1594ff35487259022223499b390fc4ad9b2 (diff)
Fix liboverride extreme resync times in case of libraries dependency loops.
That max number of `10000` level of recursivity was a typo (should have been `1000`), but even that is way too high, typical sane situation should not lead to more than a few tens of levels, so reducing the max level to 200. Also improve error message with more context info about the issue. Found while investigating issues for the Blender Studio's Heist production.
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/blenkernel/intern/lib_override.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/lib_override.c b/source/blender/blenkernel/intern/lib_override.c
index b83d30a27bf..7dbde0e7e49 100644
--- a/source/blender/blenkernel/intern/lib_override.c
+++ b/source/blender/blenkernel/intern/lib_override.c
@@ -2335,6 +2335,7 @@ static int lib_override_sort_libraries_func(LibraryIDLinkCallbackData *cb_data)
if (id != NULL && ID_IS_LINKED(id) && id->lib != id_owner->lib) {
const int owner_library_indirect_level = ID_IS_LINKED(id_owner) ? id_owner->lib->temp_index :
0;
+<<<<<<< Updated upstream
if (owner_library_indirect_level > 10000) {
CLOG_ERROR(
&LOG,
@@ -2343,6 +2344,17 @@ static int lib_override_sort_libraries_func(LibraryIDLinkCallbackData *cb_data)
id_owner->lib->filepath,
id->lib->filepath);
BLI_assert(0);
+=======
+ if (owner_library_indirect_level > 200) {
+ CLOG_ERROR(&LOG,
+ "Levels of indirect usages of libraries is way too high, there are most likely "
+ "dependency loops, skipping further building loops (involves at least '%s' from "
+ "'%s' and '%s' from '%s')",
+ id_owner->name,
+ id_owner->lib->filepath,
+ id->name,
+ id->lib->filepath);
+>>>>>>> Stashed changes
return IDWALK_RET_NOP;
}