Cloth + Internal springs crashes on a non-polygonal geometry #74295

Closed
opened 2020-02-28 15:30:02 +01:00 by Damian · 11 comments

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: 77d23b0bd7
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

tree_test1.blend

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

**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: `77d23b0bd7` 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** [tree_test1.blend](https://archive.blender.org/developer/F8380309/tree_test1.blend) Open this file, turn on the cloth modifier, turn on internal springs to get it to crash.
Author

Added subscriber: @DamianWinnichenko

Added subscriber: @DamianWinnichenko
Member

Added subscriber: @ankitm

Added subscriber: @ankitm
Member

Changed status from 'Needs Triage' to: 'Needs User Info'

Changed status from 'Needs Triage' to: 'Needs User Info'
Member

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: 94dcfe7a77

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: `94dcfe7a77`
Member

Added subscribers: @LucaRood-3, @ZedDB, @EAW

Added subscribers: @LucaRood-3, @ZedDB, @EAW
Member

Changed status from 'Needs User Info' to: 'Confirmed'

Changed status from 'Needs User Info' to: 'Confirmed'
Member

@DamianWinnichenko 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.

tree_test1.blend

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

Relevant (I believe) part of the call stack:

**a** was nullptr. occurred
	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)

MSVC_debug_call_stack.txt

blender_debug_output_end.txt

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 @ZedDB and @LucaRood-3?


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: 85f980c517

@DamianWinnichenko 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. [tree_test1.blend](https://archive.blender.org/developer/F8380309/tree_test1.blend) 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) ``` [MSVC_debug_call_stack.txt](https://archive.blender.org/developer/F8380311/MSVC_debug_call_stack.txt) [blender_debug_output_end.txt](https://archive.blender.org/developer/F8380312/blender_debug_output_end.txt) 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 @ZedDB and @LucaRood-3? --- **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: `85f980c517`
Author

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.

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.

This issue was referenced by caff955e78

This issue was referenced by caff955e7845f1b0245ca80845d847ed74bcc657

This issue was referenced by 1648a79036

This issue was referenced by 1648a7903672604dca096d49b282cf737dd9e661

Changed status from 'Confirmed' to: 'Resolved'

Changed status from 'Confirmed' to: 'Resolved'
Sebastian Parborg self-assigned this 2020-03-02 15:01:14 +01:00
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
5 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#74295
No description provided.