Page MenuHome

Armature and rigid body crash
Closed, ResolvedPublic

Description

Trying to play the animation with a rigid body cube parented and weight painted with an armature bone causes a crash in blender 2.8 Beta (2019-02-06)

To reproduce the error, follow these steps

  • Add an armature
  • Auto weight paint it (ctrl p) to the default cube
  • Select the default cube and add rigid body in physics tab
  • Play animation

The attached example will not crash directly when playing the animation without rigid body option first deselected and selected again!

Event Timeline

Sebastian Parborg (zeddb) lowered the priority of this task from Needs Triage by Developer to Confirmed, Medium.

@Sergey Sharybin (sergey) feel free to reassign to @Sergej Reich (sergof) if this is not for you.

Note: To get it to segfault I have to:

  1. Open the attached file
  2. Play the animation
  3. Stop playing the animation and move the timeline back to the start frame
  4. Remove and re-add the rigid body
  5. Play animation once again.

If I for example play the animation and make it jump back to the start frame, the rigid body starts simulation and build a cache. At that point I can add and remove the rigid body and it won't crash for me anymore.

Backtrace:

Thread 28 "blender" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fffd4ffb700 (LWP 23169)]
0x0000555558233158 in RB_body_get_position (object=0x0, v_out=0x7fffd20110c8)
    at /home/zed/programmering/blender_master/blender/intern/rigidbody/rb_bullet_api.cpp:617
617		btRigidBody *body = object->body;
(gdb) bt
#0  0x0000555558233158 in RB_body_get_position (object=0x0, v_out=0x7fffd20110c8)
    at /home/zed/programmering/blender_master/blender/intern/rigidbody/rb_bullet_api.cpp:617
#1  0x000055555818026e in ptcache_rigidbody_write (index=0, rb_v=0x7fffe5b5df28, data=0x7fffd280f1e8, UNUSED_cfra=1)
    at /home/zed/programmering/blender_master/blender/source/blender/blenkernel/intern/pointcache.c:1293
#2  0x0000555558184cd8 in ptcache_write (pid=0x7fffd4ffa8c0, cfra=1, overwrite=0)
    at /home/zed/programmering/blender_master/blender/source/blender/blenkernel/intern/pointcache.c:2915
#3  0x000055555818512e in BKE_ptcache_write (pid=0x7fffd4ffa8c0, cfra=1)
    at /home/zed/programmering/blender_master/blender/source/blender/blenkernel/intern/pointcache.c:3023
#4  0x000055555818e917 in BKE_rigidbody_do_simulation (depsgraph=0x7fffe5b31608, scene=0x7fffe4bb4008, ctime=2)
    at /home/zed/programmering/blender_master/blender/source/blender/blenkernel/intern/rigidbody.c:1743
#5  0x000055555818eb8d in BKE_rigidbody_eval_simulation (depsgraph=0x7fffe5b31608, scene=0x7fffe4bb4008)
    at /home/zed/programmering/blender_master/blender/source/blender/blenkernel/intern/rigidbody.c:1829
#6  0x0000555558586fcd in std::__invoke_impl<void, void (*&)(Depsgraph*, Scene*), Depsgraph*, Scene*&> (__f=
    @0x7fffcfd92940: 0x55555818eb15 <BKE_rigidbody_eval_simulation>, __args#0=@0x7fffd4ffab10: 0x7fffe5b31608, __args#1=@0x7fffcfd92948: 0x7fffe4bb4008)
    at /usr/lib/gcc/x86_64-pc-linux-gnu/8.2.0/include/g++-v8/bits/invoke.h:60
#7  0x0000555558585c84 in std::__invoke<void (*&)(Depsgraph*, Scene*), Depsgraph*, Scene*&> (__fn=
    @0x7fffcfd92940: 0x55555818eb15 <BKE_rigidbody_eval_simulation>, __args#0=@0x7fffd4ffab10: 0x7fffe5b31608, __args#1=@0x7fffcfd92948: 0x7fffe4bb4008)
    at /usr/lib/gcc/x86_64-pc-linux-gnu/8.2.0/include/g++-v8/bits/invoke.h:95
#8  0x000055555858455c in std::_Bind<void (*(std::_Placeholder<1>, Scene*))(Depsgraph*, Scene*)>::__call<void, Depsgraph*&&, 0ul, 1ul>(std::tuple<Depsgraph*&&>&&, std::_Index_tuple<0ul, 1ul>) (this=0x7fffcfd92940, __args=...) at /usr/lib/gcc/x86_64-pc-linux-gnu/8.2.0/include/g++-v8/functional:400
#9  0x0000555558582738 in std::_Bind<void (*(std::_Placeholder<1>, Scene*))(Depsgraph*, Scene*)>::operator()<Depsgraph*, void>(Depsgraph*&&) (
    this=0x7fffcfd92940, __args#0=@0x7fffd4ffab10: 0x7fffe5b31608) at /usr/lib/gcc/x86_64-pc-linux-gnu/8.2.0/include/g++-v8/functional:484
#10 0x000055555857f9ca in std::_Function_handler<void (Depsgraph*), std::_Bind<void (*(std::_Placeholder<1>, Scene*))(Depsgraph*, Scene*)> >::_M_invoke(std::_Any_data const&, Depsgraph*&&) (__functor=..., __args#0=@0x7fffd4ffab10: 0x7fffe5b31608)
    at /usr/lib/gcc/x86_64-pc-linux-gnu/8.2.0/include/g++-v8/bits/std_function.h:297
#11 0x0000555558599197 in std::function<void (Depsgraph*)>::operator()(Depsgraph*) const (this=0x7fffcfefc2a8, __args#0=0x7fffe5b31608)
    at /usr/lib/gcc/x86_64-pc-linux-gnu/8.2.0/include/g++-v8/bits/std_function.h:687
#12 0x0000555558598778 in DEG::deg_task_run_func (pool=0x7fffd9553008, taskdata=0x7fffcfefc248, thread_id=5)
    at /home/zed/programmering/blender_master/blender/source/blender/depsgraph/intern/eval/deg_eval.cc:87
#13 0x00005555585565c0 in handle_local_queue (thread_id=5, tls=0x7fffd95f7908)
    at /home/zed/programmering/blender_master/blender/source/blender/blenlib/intern/task.c:416
#14 task_scheduler_thread_run (thread_p=0x7fffd95f78f8) at /home/zed/programmering/blender_master/blender/source/blender/blenlib/intern/task.c:445
#15 0x00007ffff63933c3 in start_thread () from /lib64/libpthread.so.0
#16 0x00007ffff32223ef in clone () from /lib64/libc.so.6

I got the same crash when trying to reproduce T61346

However, the same steps as above are required to make it crash on the saved file.