Crash with animated b-bone segments #61296

Closed
opened 2019-02-07 22:37:18 +01:00 by KiJeon · 27 comments

Blender Version
Broken: 2.79b

Short description of error
I'm trying to animate using a linked (proxy) rig, but it keeps crashing. It would crash as I'm working in the scene, but it would also crash when opening the scene.

The thing is, the crash seems to be a bit random.
Even if the scene crashes on start, if I keep opening the file, sometimes, it won't crash. It's like playing a crash lottery every time I open the scene.

I figured out that if I delete the character geometry, it doesn't crash. If I append the rig, it doesn't crash.
However, if I attach any geometry to the linked rig, it seems to crash.

Including an example file: X_LinkTest2.blend

To get it to crash:

  1. Open up the attached file.
  2. Scrub timeline back and forth.
    If you're (un)lucky, you might find that the file crashes on open. In that case, just keep trying to open the file.

Note that if you delete the geometry, it doesn't crash.

**Blender Version** Broken: 2.79b **Short description of error** I'm trying to animate using a linked (proxy) rig, but it keeps crashing. It would crash as I'm working in the scene, but it would also crash when opening the scene. The thing is, the crash seems to be a bit random. Even if the scene crashes on start, if I keep opening the file, sometimes, it won't crash. It's like playing a crash lottery every time I open the scene. I figured out that if I delete the character geometry, it doesn't crash. If I append the rig, it doesn't crash. However, if I attach any geometry to the linked rig, it seems to crash. Including an example file: [X_LinkTest2.blend](https://archive.blender.org/developer/F6542526/X_LinkTest2.blend) **To get it to crash:** 1. Open up the attached file. 2. Scrub timeline back and forth. If you're (un)lucky, you might find that the file crashes on open. In that case, just keep trying to open the file. Note that if you delete the geometry, it doesn't crash.
Author

Added subscriber: @0o00o0oo

Added subscriber: @0o00o0oo

#62022 was marked as duplicate of this issue

#62022 was marked as duplicate of this issue
Member

Added subscriber: @lichtwerk

Added subscriber: @lichtwerk
Member

Please also provide the library .blend (//Exit_Rig/Exit_EXIT_06.blend)

Please also provide the library .blend (`//Exit_Rig/Exit_EXIT_06.blend`)
Author

Ah, that makes sense, sorry about that.

Here it is: Exit_EXIT_06.blend

Ah, that makes sense, sorry about that. Here it is: [Exit_EXIT_06.blend](https://archive.blender.org/developer/F6551406/Exit_EXIT_06.blend)

Added subscriber: @ZedDB

Added subscriber: @ZedDB
Joshua Leung was assigned by Sebastian Parborg 2019-02-09 15:30:27 +01:00

Backtrace:

Thread 25 "blender" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fffd4bfe700 (LWP 15704)]
0x000055555682edfb in b_bone_deform (co=co@entry=0x7fffd4bfd380, dq=dq@entry=0x0, defmat=defmat@entry=0x0, bone=<optimized out>, bone=<optimized out>,
    pdef_info=<optimized out>, pdef_info=<optimized out>) at /home/zed/programmering/blender_master/blender/source/blender/blenkernel/intern/armature.c:929
929		a = (int)(y / segment);
(gdb) bt
#0  0x000055555682edfb in b_bone_deform (co=co@entry=0x7fffd4bfd380, dq=dq@entry=0x0, defmat=defmat@entry=0x0, bone=<optimized out>, bone=<optimized out>,
    pdef_info=<optimized out>, pdef_info=<optimized out>) at /home/zed/programmering/blender_master/blender/source/blender/blenkernel/intern/armature.c:929
#1  0x00005555568338b4 in pchan_bone_deform (contrib=<synthetic pointer>, co=0x7fffd10b6e84, mat=0x0, dq=0x0, vec=<optimized out>, weight=0.00517571345,
    pdef_info=<optimized out>, pchan=0x7fffd0839a88) at /home/zed/programmering/blender_master/blender/source/blender/blenkernel/intern/armature.c:1074
#2  armature_deform_verts (armOb=0x7fffe89fde08, target=target@entry=0x7fffe89fe408, mesh=mesh@entry=0x0, vertexCos=vertexCos@entry=0x7fffd10b6008,
    defMats=defMats@entry=0x0, numVerts=numVerts@entry=527, deformflag=1, prevCos=0x0, defgrp_name=0x7fffd102d188 "", gps=0x0)
    at /home/zed/programmering/blender_master/blender/source/blender/blenkernel/intern/armature.c:1330
#3  0x00005555565ed33f in deformVerts (md=0x7fffd102d108, ctx=0x7fffd4bfd6e0, mesh=0x0, vertexCos=0x7fffd10b6008, numVerts=527)
    at /home/zed/programmering/blender_master/blender/source/blender/modifiers/intern/MOD_armature.c:113
#4  0x000055555681f40a in mesh_calc_modifiers (depsgraph=depsgraph@entry=0x7fffe43fd608, scene=scene@entry=0x7fffd8260008, ob=ob@entry=0x7fffe89fe408,
    inputVertexCos=inputVertexCos@entry=0x0, useDeform=useDeform@entry=1, need_mapping=need_mapping@entry=false, dataMask=637747721, index=-1, useCache=true,
    build_shapekey_layers=false, r_deform=0x7fffe89fe958, r_final=0x7fffe89fe950)
    at /home/zed/programmering/blender_master/blender/source/blender/blenkernel/intern/DerivedMesh.c:1236
#5  0x00005555568200f1 in mesh_build_data (depsgraph=depsgraph@entry=0x7fffe43fd608, scene=scene@entry=0x7fffd8260008, ob=ob@entry=0x7fffe89fe408,
    dataMask=637747721, build_shapekey_layers=build_shapekey_layers@entry=false, need_mapping=<optimized out>)
    at /home/zed/programmering/blender_master/blender/source/blender/blenkernel/intern/DerivedMesh.c:2033
#6  0x000055555682233b in makeDerivedMesh (depsgraph=depsgraph@entry=0x7fffe43fd608, scene=scene@entry=0x7fffd8260008, ob=ob@entry=0x7fffe89fe408,
    em=em@entry=0x0, dataMask=<optimized out>, dataMask@entry=637747721, build_shapekey_layers=build_shapekey_layers@entry=false)
    at /home/zed/programmering/blender_master/blender/source/blender/blenkernel/intern/DerivedMesh.c:2149
#7  0x0000555556927087 in BKE_object_handle_data_update (depsgraph=0x7fffe43fd608, scene=0x7fffd8260008, ob=0x7fffe89fe408)
    at /home/zed/programmering/blender_master/blender/source/blender/blenkernel/intern/object_update.c:182
#8  0x000055555692744e in BKE_object_eval_uber_data (depsgraph=0x7fffe43fd608, scene=0x7fffd8260008, ob=0x7fffe89fe408)
    at /home/zed/programmering/blender_master/blender/source/blender/blenkernel/intern/object_update.c:355
#9  0x0000555556bcb040 in std::function<void (Depsgraph*)>::operator()(Depsgraph*) const (__args#0=<optimized out>, this=0x7fffce0e79e8)
    at /usr/lib/gcc/x86_64-pc-linux-gnu/8.2.0/include/g++-v8/bits/std_function.h:682
#10 DEG::deg_task_run_func (pool=0x7fffc7bd5008, taskdata=0x7fffce0e7988, thread_id=2)
    at /home/zed/programmering/blender_master/blender/source/blender/depsgraph/intern/eval/deg_eval.cc:87
#11 0x0000555556bac8b1 in handle_local_queue (thread_id=2, tls=0x7fffd8281078)
    at /home/zed/programmering/blender_master/blender/source/blender/blenlib/intern/task.c:416
- 12 task_scheduler_thread_run (thread_p=0x7fffd8281068) at /home/zed/programmering/blender_master/blender/source/blender/blenlib/intern/task.c:445
- 13 0x00007ffff63923c3 in start_thread () from /lib64/libpthread.so.0
#14 0x00007ffff13493ef in clone () from /lib64/libc.so.6
Backtrace: ``` Thread 25 "blender" received signal SIGSEGV, Segmentation fault. [Switching to Thread 0x7fffd4bfe700 (LWP 15704)] 0x000055555682edfb in b_bone_deform (co=co@entry=0x7fffd4bfd380, dq=dq@entry=0x0, defmat=defmat@entry=0x0, bone=<optimized out>, bone=<optimized out>, pdef_info=<optimized out>, pdef_info=<optimized out>) at /home/zed/programmering/blender_master/blender/source/blender/blenkernel/intern/armature.c:929 929 a = (int)(y / segment); (gdb) bt #0 0x000055555682edfb in b_bone_deform (co=co@entry=0x7fffd4bfd380, dq=dq@entry=0x0, defmat=defmat@entry=0x0, bone=<optimized out>, bone=<optimized out>, pdef_info=<optimized out>, pdef_info=<optimized out>) at /home/zed/programmering/blender_master/blender/source/blender/blenkernel/intern/armature.c:929 #1 0x00005555568338b4 in pchan_bone_deform (contrib=<synthetic pointer>, co=0x7fffd10b6e84, mat=0x0, dq=0x0, vec=<optimized out>, weight=0.00517571345, pdef_info=<optimized out>, pchan=0x7fffd0839a88) at /home/zed/programmering/blender_master/blender/source/blender/blenkernel/intern/armature.c:1074 #2 armature_deform_verts (armOb=0x7fffe89fde08, target=target@entry=0x7fffe89fe408, mesh=mesh@entry=0x0, vertexCos=vertexCos@entry=0x7fffd10b6008, defMats=defMats@entry=0x0, numVerts=numVerts@entry=527, deformflag=1, prevCos=0x0, defgrp_name=0x7fffd102d188 "", gps=0x0) at /home/zed/programmering/blender_master/blender/source/blender/blenkernel/intern/armature.c:1330 #3 0x00005555565ed33f in deformVerts (md=0x7fffd102d108, ctx=0x7fffd4bfd6e0, mesh=0x0, vertexCos=0x7fffd10b6008, numVerts=527) at /home/zed/programmering/blender_master/blender/source/blender/modifiers/intern/MOD_armature.c:113 #4 0x000055555681f40a in mesh_calc_modifiers (depsgraph=depsgraph@entry=0x7fffe43fd608, scene=scene@entry=0x7fffd8260008, ob=ob@entry=0x7fffe89fe408, inputVertexCos=inputVertexCos@entry=0x0, useDeform=useDeform@entry=1, need_mapping=need_mapping@entry=false, dataMask=637747721, index=-1, useCache=true, build_shapekey_layers=false, r_deform=0x7fffe89fe958, r_final=0x7fffe89fe950) at /home/zed/programmering/blender_master/blender/source/blender/blenkernel/intern/DerivedMesh.c:1236 #5 0x00005555568200f1 in mesh_build_data (depsgraph=depsgraph@entry=0x7fffe43fd608, scene=scene@entry=0x7fffd8260008, ob=ob@entry=0x7fffe89fe408, dataMask=637747721, build_shapekey_layers=build_shapekey_layers@entry=false, need_mapping=<optimized out>) at /home/zed/programmering/blender_master/blender/source/blender/blenkernel/intern/DerivedMesh.c:2033 #6 0x000055555682233b in makeDerivedMesh (depsgraph=depsgraph@entry=0x7fffe43fd608, scene=scene@entry=0x7fffd8260008, ob=ob@entry=0x7fffe89fe408, em=em@entry=0x0, dataMask=<optimized out>, dataMask@entry=637747721, build_shapekey_layers=build_shapekey_layers@entry=false) at /home/zed/programmering/blender_master/blender/source/blender/blenkernel/intern/DerivedMesh.c:2149 #7 0x0000555556927087 in BKE_object_handle_data_update (depsgraph=0x7fffe43fd608, scene=0x7fffd8260008, ob=0x7fffe89fe408) at /home/zed/programmering/blender_master/blender/source/blender/blenkernel/intern/object_update.c:182 #8 0x000055555692744e in BKE_object_eval_uber_data (depsgraph=0x7fffe43fd608, scene=0x7fffd8260008, ob=0x7fffe89fe408) at /home/zed/programmering/blender_master/blender/source/blender/blenkernel/intern/object_update.c:355 #9 0x0000555556bcb040 in std::function<void (Depsgraph*)>::operator()(Depsgraph*) const (__args#0=<optimized out>, this=0x7fffce0e79e8) at /usr/lib/gcc/x86_64-pc-linux-gnu/8.2.0/include/g++-v8/bits/std_function.h:682 #10 DEG::deg_task_run_func (pool=0x7fffc7bd5008, taskdata=0x7fffce0e7988, thread_id=2) at /home/zed/programmering/blender_master/blender/source/blender/depsgraph/intern/eval/deg_eval.cc:87 #11 0x0000555556bac8b1 in handle_local_queue (thread_id=2, tls=0x7fffd8281078) at /home/zed/programmering/blender_master/blender/source/blender/blenlib/intern/task.c:416 - 12 task_scheduler_thread_run (thread_p=0x7fffd8281068) at /home/zed/programmering/blender_master/blender/source/blender/blenlib/intern/task.c:445 - 13 0x00007ffff63923c3 in start_thread () from /lib64/libpthread.so.0 #14 0x00007ffff13493ef in clone () from /lib64/libc.so.6 ```

Added subscribers: @angavrilov, @Sergey, @JoshuaLeung, @brecht

Added subscribers: @angavrilov, @Sergey, @JoshuaLeung, @brecht
Joshua Leung was unassigned by Brecht Van Lommel 2019-03-11 16:46:00 +01:00
Sergey Sharybin was assigned by Brecht Van Lommel 2019-03-11 16:46:00 +01:00

I think this one is for @Sergey or @angavrilov, seems related to new b-bone caching.

I think this one is for @Sergey or @angavrilov, seems related to new b-bone caching.
Sergey Sharybin removed their assignment 2019-03-11 17:07:59 +01:00
Alexander Gavrilov was assigned by Sergey Sharybin 2019-03-11 17:07:59 +01:00

If that's the case i'd like @angavrilov to have a look first. He knows the cache implementation details better.

If that's the case i'd like @angavrilov to have a look first. He knows the cache implementation details better.
Alexander Gavrilov removed their assignment 2019-03-12 10:45:47 +01:00
Sergey Sharybin was assigned by Alexander Gavrilov 2019-03-12 10:45:47 +01:00

This rig is using a driver on bbone_segments that depends on the deformation of the rig. Dependency graph doesn't handle this, and I doubt it can do it in a reasonable way, since the segment count affects the graph itself. I fixed this from crashing by adding some checks, but the actual problem is still there.

This rig is using a driver on bbone_segments that depends on the deformation of the rig. Dependency graph doesn't handle this, and I doubt it can do it in a reasonable way, since the segment count affects the graph itself. I fixed this from crashing by adding some checks, but the actual problem is still there.

@angavrilov, hrm. Sounds like actual solution would be to forbid driving/animating the segment count. Not sure we can realistically do something better here?

@angavrilov, hrm. Sounds like actual solution would be to forbid driving/animating the segment count. Not sure we can realistically do something better here?

It could be the safest solution. Driving the setting could be useful for something like controlling settings of multiple bones from one custom property, but it certainly mustn't be animated.

It could be the safest solution. Driving the setting could be useful for something like controlling settings of multiple bones from one custom property, but it certainly mustn't be animated.

#62022 (bendy bones segments animation crash) is the same bug then.

#62022 (bendy bones segments animation crash) is the same bug then.

Currently depsgraph doesn't seem to even be creating any dependencies from those drivers - that was probably somewhat ok when b-bone shape was evaluated from scratch every time it was used, but now that it is a proper depsgraph node, that definitely isn't right. The fact that those nodes in the graph are only created when the segment count is not 1 complicates things even more, so with this set up that property probably has to be blocked from being animated.

If the B-Bone/not B-Bone switch was a separate setting it can probably be animated if proper dependencies are added into depsgraph (and with some care to handle mismatched data without crashing in case of dependency loops).

Currently depsgraph doesn't seem to even be creating any dependencies from those drivers - that was probably somewhat ok when b-bone shape was evaluated from scratch every time it was used, but now that it is a proper depsgraph node, that definitely isn't right. The fact that those nodes in the graph are only created when the segment count is not 1 complicates things even more, so with this set up that property probably has to be blocked from being animated. If the B-Bone/not B-Bone switch was a separate setting it can probably be animated if proper dependencies are added into depsgraph (and with some care to handle mismatched data without crashing in case of dependency loops).

Basically, the only ways to allow animating the segment count is to either split the B-Bone toggle into a separate non-animatable checkbox, or have the depsgraph build code somehow detect that the property is animated or has a driver, and treat it as a B-Bone even if the current value is 1.

Basically, the only ways to allow animating the segment count is to either split the B-Bone toggle into a separate non-animatable checkbox, or have the depsgraph build code somehow detect that the property is animated or has a driver, and treat it as a B-Bone even if the current value is 1.
Brecht Van Lommel changed title from Blender crashes when adding geometry to linked rig and animation to Crash with animated b-bone segments 2019-03-14 19:10:57 +01:00

Added subscribers: @DiegoSG, @kpavicic

Added subscribers: @DiegoSG, @kpavicic
Member

Added subscriber: @JacquesLucke

Added subscriber: @JacquesLucke
Member

What is the use case for animating the number of segments?

What is the use case for animating the number of segments?

Sometimes it is useful when switching between curved and hard-shaped joints in a rig

Sometimes it is useful when switching between curved and hard-shaped joints in a rig

@JacquesLucke In the file provided in #62364 (2.8 | Keyframes on BBones cause crash) I used segmentation animation in the foreArm and upperArm to go from a bendy effect to an angular one. I acknowledge that that's not a standardized way of rigging bendy joints. However, the ability to key the segments would imply that a user should be able to use it in such a case.

@JacquesLucke In the file provided in #62364 (2.8 | Keyframes on BBones cause crash) I used segmentation animation in the foreArm and upperArm to go from a bendy effect to an angular one. I acknowledge that that's not a standardized way of rigging bendy joints. However, the ability to key the segments would imply that a user should be able to use it in such a case.
Member

I see, are there other/better solutions for this in Blender?

I see, are there other/better solutions for this in Blender?

Rigify super_finger uses keys on the ease in/out properties.

Rigify super_finger uses keys on the ease in/out properties.

For some reason i can not reproduce the crash. Maybe i am just being lucky with threading?

Created D4739 which is supposed to fix the issue.

For some reason i can not reproduce the crash. Maybe i am just being lucky with threading? Created [D4739](https://archive.blender.org/developer/D4739) which is supposed to fix the issue.

the error appears when a geometry is being affected by the bendy bone and you animate the segments of the bendy bone and it is quite random.
I have not been able to replicate it in a simple example but working with rigs I have had many crashes

the error appears when a geometry is being affected by the bendy bone and you animate the segments of the bendy bone and it is quite random. I have not been able to replicate it in a simple example but working with rigs I have had many crashes

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'

After a recent series of changes from @angavrilov and me this issue is expected to be resolved.
Thanks for the report, closing now.

After a recent series of changes from @angavrilov and me this issue is expected to be resolved. Thanks for the report, closing now.
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
10 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#61296
No description provided.