Page MenuHome

Cloth + Internal springs crashes on a non-polygonal geometry
Closed, ResolvedPublic

Description

System Information
Operating system: Windows-10-10.0.18362-SP0 64 Bits
Graphics card: GeForce GTX 1070/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 441.41

Blender Version
Broken: version: 2.82 (sub 7), branch: master, commit date: 2020-02-12 16:20, hash: rB77d23b0bd76f
Worked: (optional)

Short description of error
I created a skeleton made of vertices and edges only. Applied cloth physics on that structure turned on Internal springs and it immediately crashes.

Exact steps for others to reproduce the error

Open this file, turn on the cloth modifier, turn on internal springs to get it to crash.

Event Timeline

Ankit Meel (ankitm) changed the task status from Needs Triage to Needs Information from User.EditedFeb 28 2020, 10:06 PM
Ankit Meel (ankitm) updated the task description. (Show Details)

doesn't crash on *. Internal springs is already turned on. I turned it off and back on. all good.

*Operating system: Darwin-18.7.0-x86_64-i386-64bit 64 Bits
Graphics card: Intel(R) HD Graphics 6000 Intel Inc. 4.1 INTEL-12.10.12
version: 2.83 (sub 5), branch: master, commit date: 2020-02-28 13:46, hash: rB94dcfe7a776d

Evan Wilson (EAW) changed the task status from Needs Information from User to Confirmed.Feb 29 2020, 6:08 PM

@Damian (damian) The file you uploaded has a skin modifier in the modifier stack before the cloth modifier, creating geometry for the internal springs to exist inside of. It doesn't crash due to it having enclosed geometric volume.

Here is a version with the skin modifier and the other 2 objects deleted.

Open it, turn on the cloth modifier, turn on internal springs to get it to crash.

Relevant (I believe) part of the call stack:

Unhandled exception thrown: read access violation.
**a** was nullptr. occurred
blender.exe!copy_v3_v3(float * r, const float * a) Line 63
	at C:\blender-git\blender\source\blender\blenlib\intern\math_vector_inline.c(63)
blender.exe!find_internal_spring_target_vertex(BVHTreeFromMesh * treedata, unsigned int v_idx, RNG * rng, float max_length, float max_diversion, bool check_normal, unsigned int * r_tar_v_idx) Line 1466
	at C:\blender-git\blender\source\blender\blenkernel\intern\cloth.c(1466)
blender.exe!cloth_build_springs(ClothModifierData * clmd, Mesh * mesh) Line 1592
	at C:\blender-git\blender\source\blender\blenkernel\intern\cloth.c(1592)
blender.exe!cloth_from_object(Object * ob, ClothModifierData * clmd, Mesh * mesh, float UNUSED_framenr, int first) Line 901
	at C:\blender-git\blender\source\blender\blenkernel\intern\cloth.c(901)
blender.exe!do_init_cloth(Object * ob, ClothModifierData * clmd, Mesh * result, int framenr) Line 333
	at C:\blender-git\blender\source\blender\blenkernel\intern\cloth.c(333)
blender.exe!clothModifier_do(ClothModifierData * clmd, Depsgraph * depsgraph, Scene * scene, Object * ob, Mesh * mesh, float[3] * vertexCos) Line 459
	at C:\blender-git\blender\source\blender\blenkernel\intern\cloth.c(459)
blender.exe!deformVerts(ModifierData * md, const ModifierEvalContext * ctx, Mesh * mesh, float[3] * vertexCos, int numVerts) Line 121
	at C:\blender-git\blender\source\blender\modifiers\intern\MOD_cloth.c(121)
blender.exe!modwrap_deformVerts(ModifierData * md, const ModifierEvalContext * ctx, Mesh * me, float[3] * vertexCos, int numVerts) Line 976
	at C:\blender-git\blender\source\blender\blenkernel\intern\modifier.c(976)
blender.exe!mesh_calc_modifiers(Depsgraph * depsgraph, Scene * scene, Object * ob, int useDeform, const bool need_mapping, const CustomData_MeshMasks * dataMask, const int index, const bool use_cache, const bool allow_shared_mesh, Mesh * * r_deform, Mesh * * r_final) Line 976
	at C:\blender-git\blender\source\blender\blenkernel\intern\DerivedMesh.c(976)

While turning on "internal springs" for a volume-less object makes no sense, surely there should be a check to see if this is the case instead of crashing, no?

Thoughts @Sebastian Parborg (zeddb) and @Luca Rood (LucaRood)?


System Information
Operating system: Windows-10-10.0.18362-SP0 64 Bits
Graphics card: GeForce GTX 470/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 388.13

Blender Version
2.83 (sub 5), branch: master, commit date: 2020-02-28 16:45, hash: rB85f980c517e4

Oh, I probably forgot to delete skin modifier.

But initially, every volumeless geometry crashes on internal springs option being turned on.

The reason why I needed it s to rig a tree or rope. Didnt work out. Also, I have no further idea, how to transfer such a motion to the high-poly geometry, but its a different story.