Page MenuHome

Crash when moving, rotating an object with Soft Body physics enabled (not baked)
Closed, ResolvedPublic

Description

System Information
Ubuntu 18.04
Intel® Core™ i5-6200U CPU @ 2.30GHz × 4 / Intel® HD Graphics 520 (Skylake GT2)

Blender Version
Broken: 2.80 2018-11-24 22:44, (a2e209f20a4), also the previous day build

Short description of error
I have a simple file with 3 object, on which I have enabled (but not baked) Soft Body Physics.

Selecting one of these objects, and attempting a single operation (e.g. Move, Rotate, or change to Edit Mode) causes a creash

Exact steps for others to reproduce the error

  • Open attached .blend
  • Select the lowermost rounded cube
  • "G" or "R" then move the mouse, or just "Tab"

Details

Type
Bug

Event Timeline

Nicola De Mitri (nicolasap) renamed this task from Crash when moving to Crash when moving, rotating an object with Soft Body physics enabled (not baked).
Philipp Oeser (lichtwerk) triaged this task as Confirmed, Medium priority.

Crash confirmed.

Seems to be some race condition, because --threads 1 commandline option will prevent the crash.

getting this on file read

Dependency cycle detected:
  'OBCube.GEOMETRY_UBEREVAL()' depends on 'OBCube.001.GEOMETRY_UBEREVAL()' through 'Softbody Collision'
  'OBCube.001.GEOMETRY_UBEREVAL()' depends on 'OBCube.GEOMETRY_UBEREVAL()' through 'Softbody Collision'
Dependency cycle detected:
  'OBCube.GEOMETRY_UBEREVAL()' depends on 'OBCube.PLACEHOLDER(Eval Init)' through 'Object Geometry UberEval'
  'OBCube.PLACEHOLDER(Eval Init)' depends on 'OBCube.POINT_CACHE_RESET()' through 'Point Cache -> Geometry'
  'OBCube.POINT_CACHE_RESET()' depends on 'OBCube.001.GEOMETRY_UBEREVAL()' through 'Point Cache'
  'OBCube.001.GEOMETRY_UBEREVAL()' depends on 'OBCube.GEOMETRY_UBEREVAL()' through 'Softbody Collision'
Detected 2 dependency cycles

2.79 survived this btw, puts out a little less in this case:

Dependency cycle detected:
  'OBCube.GEOMETRY_UBEREVAL()' depends on 'OBCube.001.GEOMETRY_UBEREVAL()' through 'Softbody Collision'
  'OBCube.001.GEOMETRY_UBEREVAL()' depends on 'OBCube.GEOMETRY_UBEREVAL()' through 'Softbody Collision'

--debug-depsgraph (right before crash):

deg_graph_id_tag_update: id=OBCube flags=TRANSFORM
deg_graph_id_tag_update: id=OBCube flags=TRANSFORM
[SCScene :: View Layer]: Operation is entry point for update: COPY_ON_WRITE()
[SCScene :: View Layer]: Operation is entry point for update: TRANSFORM_LOCAL()
[SCScene :: View Layer]: Operation is entry point for update: TRANSFORM_OBJECT_UBEREVAL()
[SCScene :: View Layer]: Operation is entry point for update: TRANSFORM_FINAL()
[SCScene :: View Layer]: Operation is entry point for update: POINT_CACHE_RESET()
[SCScene :: View Layer]: Accumulated recalc bits for OBCube: 113
[SCScene :: View Layer]: Accumulated recalc bits for OBCube.001: 16
[SCScene :: View Layer]: deg_evaluate_copy_on_write on OBCube (0x7f3fbb1be808)
[SCScene :: View Layer]: BKE_object_eval_uber_data on OBCube (0x7f3fbb1be808)
[SCScene :: View Layer]: BKE_object_handle_data_update on OBCube (0x7f3fbb1be808)
[SCScene :: View Layer]: BKE_object_eval_local_transform on OBCube (0x7f3fbb1be808)
[SCScene :: View Layer]: BKE_object_eval_transform_final on OBCube (0x7f3fbb1be808)
./bin/blender(BLI_system_backtrace+0x26) [0x2ee4e65]

crash

1   mesh_calc_modifiers			DerivedMesh.c     1167 0x2987b1c 
2   mesh_build_data			DerivedMesh.c     2010 0x298aac8 
3   makeDerivedMesh 			DerivedMesh.c     2120 0x298ade3 
4   BKE_object_handle_data_update	object_update.c   205  0x2b1b8b1 
5   BKE_object_eval_uber_data 		object_update.c   348  0x2b1bfae

where ob->data is corrupted.

ASAN gives me nothing.

@Sergey Sharybin (sergey): one for your desk?

This appears to be a more general issue with Soft Body than just the file provided.

Creating a scene with (collision-enabled) soft bodies, saving and reopening it, and attempting to edit some properties, very easily results in a crash.

Still happening with the Beta: 63ac7c799c8

Sergey Sharybin (sergey) closed this task as Resolved.Dec 6 2018, 3:37 PM

The crash has been resolved by rBb97cd0e6908. The cycle is still there, but doesn't seem affecting stability and there is no clear way of solving it from the dependency graph side.

SO thanks for the report, considering it solved now! :)

Thanks! I haven't tried it yet but I trust you guys on the status change :)

As for the cycle: is it really an issue at present? The best way I know to make soft bodies interact with each other is to enable Soft Body and Collision (in that order) for each one of them, and every one seems to affect every other one correctly. I used to think that it works precisely *because* a cycle exists and is handled correctly.

Sorry for going off-topic, thanks again.