Page MenuHome

Removing Drivers (in python) Leads to Crash
Closed, ResolvedPublic

Description

System Information
Operating system: Windows-7-6.1.7601-SP1 64 Bits
Graphics card: GeForce GTX 770/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 419.35

Blender Version
Broken: version: 2.80 (sub 57), branch: master, commit date: 2019-04-16 20:13, hash: rB5d8030b8f3cf
Worked: (optional)

If you remove a driver from an object or data in python, via

  1. (object/data).animation_data.drivers
  2. (object/data).driver_remove("property")

The driver will be removed, as intended.
However, if you change ANY of the (item's) properties afterwards, Blender will crash.

Event Timeline

Sebastian Parborg (zeddb) triaged this task as Confirmed, Medium priority.

Backtrace:

Thread 27 "blender" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fffd97fb700 (LWP 7300)]
0x0000555557db631f in BKE_animsys_eval_driver (depsgraph=0x7fffe6319408, id=0x7fffdd8fef08, driver_index=0, driver_orig=0x7fffd0d3bcc8)
    at /home/zed/prog/blender/source/blender/blenkernel/intern/anim_sys.c:4036
4036	  DEG_debug_print_eval_subdata_index(
(gdb) bt
#0  0x0000555557db631f in BKE_animsys_eval_driver (depsgraph=0x7fffe6319408, id=0x7fffdd8fef08, driver_index=0, driver_orig=0x7fffd0d3bcc8)
    at /home/zed/prog/blender/source/blender/blenkernel/intern/anim_sys.c:4036
#1  0x0000555557f62211 in std::__invoke_impl<void, void (*&)(Depsgraph*, ID*, int, ChannelDriver*), Depsgraph*, ID*&, int&, ChannelDriver*&> (__f=
    @0x7fffd434db40: 0x555557db6279 <BKE_animsys_eval_driver>, __args#0=@0x7fffd97fab10: 0x7fffe6319408, __args#1=@0x7fffd434db58: 0x7fffdd8fef08,
    __args#2=@0x7fffd434db50: 0, __args#3=@0x7fffd434db48: 0x7fffd0d3bcc8) at /usr/lib/gcc/x86_64-pc-linux-gnu/8.2.0/include/g++-v8/bits/invoke.h:60
#2  0x0000555557f60d6a in std::__invoke<void (*&)(Depsgraph*, ID*, int, ChannelDriver*), Depsgraph*, ID*&, int&, ChannelDriver*&> (__fn=
    @0x7fffd434db40: 0x555557db6279 <BKE_animsys_eval_driver>, __args#0=@0x7fffd97fab10: 0x7fffe6319408, __args#1=@0x7fffd434db58: 0x7fffdd8fef08,
    __args#2=@0x7fffd434db50: 0, __args#3=@0x7fffd434db48: 0x7fffd0d3bcc8) at /usr/lib/gcc/x86_64-pc-linux-gnu/8.2.0/include/g++-v8/bits/invoke.h:95
#3  0x0000555557f5f5b3 in std::_Bind<void (*(std::_Placeholder<1>, ID*, int, ChannelDriver*))(Depsgraph*, ID*, int, ChannelDriver*)>::__call<void, Depsgraph*&&, 0ul, 1ul, 2ul, 3ul>(std::tuple<Depsgraph*&&>&&, std::_Index_tuple<0ul, 1ul, 2ul, 3ul>) (this=0x7fffd434db40, __args=...)
    at /usr/lib/gcc/x86_64-pc-linux-gnu/8.2.0/include/g++-v8/functional:400
#4  0x0000555557f5d586 in std::_Bind<void (*(std::_Placeholder<1>, ID*, int, ChannelDriver*))(Depsgraph*, ID*, int, ChannelDriver*)>::operator()<Depsgraph*, void>(Depsgraph*&&) (this=0x7fffd434db40, __args#0=@0x7fffd97fab10: 0x7fffe6319408) at /usr/lib/gcc/x86_64-pc-linux-gnu/8.2.0/include/g++-v8/functional:484
#5  0x0000555557f5a5b2 in std::_Function_handler<void (Depsgraph*), std::_Bind<void (*(std::_Placeholder<1>, ID*, int, ChannelDriver*))(Depsgraph*, ID*, int, ChannelDriver*)> >::_M_invoke(std::_Any_data const&, Depsgraph*&&) (__functor=..., __args#0=@0x7fffd97fab10: 0x7fffe6319408)
    at /usr/lib/gcc/x86_64-pc-linux-gnu/8.2.0/include/g++-v8/bits/std_function.h:297
#6  0x0000555557f7639f in std::function<void (Depsgraph*)>::operator()(Depsgraph*) const (this=0x7fffd45e0040, __args#0=0x7fffe6319408)
    at /usr/lib/gcc/x86_64-pc-linux-gnu/8.2.0/include/g++-v8/bits/std_function.h:687
#7  0x0000555557f7593d in DEG::deg_task_run_func (pool=0x7fffd449b008, taskdata=0x7fffd45dffc8, thread_id=5)
    at /home/zed/prog/blender/source/blender/depsgraph/intern/eval/deg_eval.cc:86
#8  0x0000555557eeb613 in task_scheduler_thread_run (thread_p=0x7fffdd98e8f8) at /home/zed/prog/blender/source/blender/blenlib/intern/task.c:438
#9  0x00007ffff3413443 in start_thread () from /lib64/libpthread.so.0
#10 0x00007ffff333d5af in clone () from /lib64/libc.so.6

@Sergey Sharybin (sergey) I'm guessing that the driver is no properly removed with the python command. If this is not for you, feel free to reassign.