Page MenuHome

Crash when current frame is used as driver
Closed, ResolvedPublic

Description

System Information
Operating system: Linux-4.15.0-142-generic-x86_64-with-glibc2.27 64 Bits
Graphics card: Mesa DRI Intel(R) HD Graphics 3000 (SNB GT2) Intel Open Source Technology Center 3.3 (Core Profile) Mesa 20.0.8

Blender Version
Broken: version: 3.0.0 Alpha, branch: master, commit date: 2021-04-19 20:49, hash: rB795f024558b8
Worked: 2.93

Caused by rBeb06ccc32462: Fix T87448: Avoid uiBut update if value was same

Short description of error
Blender crashes when #frame is used as driver in Geometry Nodes.

Exact steps for others to reproduce the error

  1. Add a Geometry Node modifier to an object
  2. Switch to the Geometry Node editor and add a Value node
  3. Type #frame into the input field
  4. Play the animation or change the current frame

Event Timeline

Robert Guetzkow (rjg) changed the task status from Needs Triage to Confirmed.Wed, Apr 21, 9:11 PM
Robert Guetzkow (rjg) updated the task description. (Show Details)

The const AnimData *adt = BKE_animdata_from_id(id); is NULL and is dereferenced in if (adt->driver_array).

BKE_animsys_eval_driver(Depsgraph * depsgraph, ID * id, int driver_index, FCurve * fcu_orig) (/home/dev/01-data/01-git/blender-git/blender/source/blender/blenkernel/intern/anim_sys.c:3074)
blender::deg::DepsgraphNodeBuilder::<lambda(Depsgraph*)>::operator()(Depsgraph *) const(const blender::deg::DepsgraphNodeBuilder::<lambda(Depsgraph*)> * const __closure, Depsgraph * depsgraph) (/home/dev/01-data/01-git/blender-git/blender/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc:1038)
std::_Function_handler<void(Depsgraph*), blender::deg::DepsgraphNodeBuilder::build_driver(ID*, FCurve*, int)::<lambda(Depsgraph*)> >::_M_invoke(const std::_Any_data &, Depsgraph *&&)(const std::_Any_data & __functor,  __args#0) (/usr/include/c++/9/bits/std_function.h:300)
std::function<void (Depsgraph*)>::operator()(Depsgraph*) const(const std::function<void(Depsgraph*)> * const this,  __args#0) (/usr/include/c++/9/bits/std_function.h:688)
blender::deg::(anonymous namespace)::evaluate_node(const blender::deg::(anonymous namespace)::DepsgraphEvalState * state, blender::deg::OperationNode * operation_node) (/home/dev/01-data/01-git/blender-git/blender/source/blender/depsgraph/intern/eval/deg_eval.cc:113)
blender::deg::(anonymous namespace)::deg_task_run_func(TaskPool * pool, void * taskdata) (/home/dev/01-data/01-git/blender-git/blender/source/blender/depsgraph/intern/eval/deg_eval.cc:124)
Task::operator()() const::{lambda()#1}::operator()() const(const Task::<lambda()> * const __closure) (/home/dev/01-data/01-git/blender-git/blender/source/blender/blenlib/intern/task_pool.cc:118)
tbb::interface7::internal::delegated_function<Task::operator()() const::{lambda()#1} const, void>::operator()() const(const tbb::interface7::internal::delegated_function<const Task::operator()() const::<lambda()>, void> * const this) (/home/dev/01-data/01-git/blender-git/lib/linux_centos7_x86_64/tbb/include/tbb/task_arena.h:96)
tbb::interface7::internal::isolate_within_arena(tbb::interface7::internal::delegate_base&, long) (Unknown Source:0)
tbb::interface7::internal::isolate_impl<void, Task::operator()() const::{lambda()#1} const>(Task::operator()() const::{lambda()#1} const&)(const Task::<lambda()> & f) (/home/dev/01-data/01-git/blender-git/lib/linux_centos7_x86_64/tbb/include/tbb/task_arena.h:216)
tbb::interface7::this_task_arena::isolate<Task::operator()() const::{lambda()#1}>(tbb::interface7::internal::return_type_or_void const&)(const Task::<lambda()> & f) (/home/dev/01-data/01-git/blender-git/lib/linux_centos7_x86_64/tbb/include/tbb/task_arena.h:472)
Task::operator()(const Task * const this) (/home/dev/01-data/01-git/blender-git/blender/source/blender/blenlib/intern/task_pool.cc:118)
tbb::internal::function_task<Task>::execute(tbb::internal::function_task<Task> * const this) (/home/dev/01-data/01-git/blender-git/lib/linux_centos7_x86_64/tbb/include/tbb/task.h:1059)
tbb::internal::custom_scheduler<tbb::internal::IntelSchedulerTraits>::process_bypass_loop(tbb::internal::context_guard_helper<false>&, tbb::task*, long) (Unknown Source:0)
tbb::internal::custom_scheduler<tbb::internal::IntelSchedulerTraits>::local_wait_for_all(tbb::task&, tbb::task*) (Unknown Source:0)
tbb::task::wait_for_all(tbb::task * const this) (/home/dev/01-data/01-git/blender-git/lib/linux_centos7_x86_64/tbb/include/tbb/task.h:820)
tbb::internal::task_group_base::wait(tbb::internal::task_group_base * const this) (/home/dev/01-data/01-git/blender-git/lib/linux_centos7_x86_64/tbb/include/tbb/task_group.h:168)
tbb_task_pool_work_and_wait(TaskPool * pool) (/home/dev/01-data/01-git/blender-git/blender/source/blender/blenlib/intern/task_pool.cc:253)
BLI_task_pool_work_and_wait(TaskPool * pool) (/home/dev/01-data/01-git/blender-git/blender/source/blender/blenlib/intern/task_pool.cc:502)
blender::deg::deg_evaluate_on_refresh(blender::deg::Depsgraph * graph) (/home/dev/01-data/01-git/blender-git/blender/source/blender/depsgraph/intern/eval/deg_eval.cc:397)
Robert Guetzkow (rjg) renamed this task from blender crashes when #frame used as Driver in Geo Nodes to Crash when current frame is used as driver in Geometry Nodes.Wed, Apr 21, 9:12 PM
Robert Guetzkow (rjg) triaged this task as High priority.

Just built master locally and it works ??

I've checked again and it is still broken. Dereferencing a NULL-pointer is undefined behavior, so it doesn't necessarily have to result in a crash.

It is not just Geometry nodes, this is broken everywhere.

Philipp Oeser (lichtwerk) renamed this task from Crash when current frame is used as driver in Geometry Nodes to Crash when current frame is used as driver.Thu, Apr 22, 9:34 AM