[Bf-blender-cvs] [0bc0e3f9f7c] master: Fix: geometry nodes crashes with large trees

Jacques Lucke noreply at git.blender.org
Mon Jan 2 18:35:16 CET 2023


Commit: 0bc0e3f9f7c90e290ddf254407d56ad1655365d3
Author: Jacques Lucke
Date:   Mon Jan 2 18:33:48 2023 +0100
Branches: master
https://developer.blender.org/rB0bc0e3f9f7c90e290ddf254407d56ad1655365d3

Fix: geometry nodes crashes with large trees

This was an oversight in rBdba2d828462ae22de5.
The evaluator uses multiple threads to initialize node states
but it is still in single threaded mode.
`get_main_or_local_allocator` did not return the right allocator
in this case.

===================================================================

M	source/blender/functions/intern/lazy_function_graph_executor.cc

===================================================================

diff --git a/source/blender/functions/intern/lazy_function_graph_executor.cc b/source/blender/functions/intern/lazy_function_graph_executor.cc
index 83b14952829..b9cf3a82bcb 100644
--- a/source/blender/functions/intern/lazy_function_graph_executor.cc
+++ b/source/blender/functions/intern/lazy_function_graph_executor.cc
@@ -355,7 +355,7 @@ class Executor {
       this->ensure_thread_locals();
       /* Construct all node states in parallel. */
       threading::parallel_for(nodes.index_range(), 256, [&](const IndexRange range) {
-        LinearAllocator<> &allocator = this->get_main_or_local_allocator();
+        LinearAllocator<> &allocator = thread_locals_->local().allocator;
         construct_node_range(range, allocator);
       });
     }



More information about the Bf-blender-cvs mailing list