Armature and rigid body crash #61262

Closed
opened 2019-02-06 23:38:44 +01:00 by Peter Johansson · 6 comments

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!
rigid bone crash.blend

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! [rigid bone crash.blend](https://archive.blender.org/developer/F6532216/rigid_bone_crash.blend)

Added subscriber: @PLJ

Added subscriber: @PLJ

Added subscribers: @Sergey, @sreich, @ZedDB

Added subscribers: @Sergey, @sreich, @ZedDB
Sergey Sharybin was assigned by Sebastian Parborg 2019-02-07 12:37:31 +01:00

@Sergey feel free to reassign to @sreich 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
@Sergey feel free to reassign to @sreich 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 #61346
rig_body.blend

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

I got the same crash when trying to reproduce #61346 [rig_body.blend](https://archive.blender.org/developer/F6559859/rig_body.blend) However, the same steps as above are required to make it crash on the saved file.

This issue was referenced by 024f5ba2bd

This issue was referenced by 024f5ba2bdba7fbd154757b9842995051bbb9a7d

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
4 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#61262
No description provided.