Page MenuHome

Hair Particle Simulation Crashes Blender
Closed, DuplicatePublic

Description

System information:
OS Name Microsoft Windows 7 Ultimate
Version 6.1.7601 Service Pack 1 Build 7601
OS Manufacturer Microsoft Corporation
System Manufacturer Dell Inc.
System Model Precision T5600
System Type x64-based PC
Processor Intel(R) Xeon(R) CPU E5-2603 0 @ 1.80GHz, 1800 Mhz, 4 Core(s), 4 Logical Processor(s)
Processor Intel(R) Xeon(R) CPU E5-2603 0 @ 1.80GHz, 1800 Mhz, 4 Core(s), 4 Logical Processor(s)
Installed Physical Memory (RAM) 8.00 GB
Total Physical Memory 7.93 GB
Available Physical Memory 3.80 GB
Total Virtual Memory 15.9 GB
Video Card NVIDIA Quadro 600

Blender Version
Broken: 2.74
Worked: 2.73

Hair simulation causes the Blender application to close and disappear from the screen.

Exact steps for others to reproduce the error
Download the file from:
http://www.pasteall.org/blend/35992
and run a simulation.

I am reporting this as a bug because no one in this thread:
http://blenderartists.org/forum/showthread.php?370582-Hair-Simulation-Crashes-Blender&p=2866807#post2866807
was able to solve it in 2.74. In this thread Photox said it worked in 2.73 stable.

Details

Type
Bug

Event Timeline

Stephen Pflanze (megasoid) created this task.
Stephen Pflanze (megasoid) raised the priority of this task from to Needs Triage by Developer.
Bastien Montagne (mont29) triaged this task as Needs Information from User priority.

Man, that simulation takes more than ages to run! We can't use that for investigation.

Tried to replicate with much simpler case (mere cube with ten hairs), no crash here. Can you please try to attach here a much simpler/lighter case that crashes for you?

PS: Getting segfault when closing Blender (to interrupt the never-ending simulation), which seem to be caused by shared data between particles, cloth modifier, and possibly others, like effector_weights, but think this is due to interruption during work…

Maybe the crash and the simulation running so slowly are both caused by the same problem? For me Blender froze a long time, I didn't wait to see if it would crash. I noticed that BLI_bvhtree_overlap is returning 100 million collision pairs, which seems excessive.

It crashes and closes on me immediately after simulation start. Maybe it does not crash on your computer because maybe yours has more resources than mine.

It has crashed for Photox, in 2.74 and not 2.73. If the crash on mine and Photox's is due to the same problem that causes it to run slowly on yours, maybe it will run much faster on yours in version 2.73.

If I change the model to run faster on yours, it is likely the problem will not manifest itself.

Assigning to Lukas, indeed overlap seems to be an issue, which could explain huge memory usage and slow simulation...

Bastien Montagne (mont29) raised the priority of this task from Needs Information from User to Normal.May 25 2015, 3:22 PM

This is a known issue: T42577

The problem is in the way contact points are generated for cloth and hair. It uses a nearest-point search on BVH trees. This method is usually quite fast, but it's nowhere close to actual physical contact point generation (to get an impression of the complexity of the problem, see https://bullet.googlecode.com/files/GDC10_Coumans_Erwin_Contact.pdf). What's making the process so terribly slow here is the "epsilon" distance used to give collision objects some offset. If this epsilon becomes larger than the smallest scale of BVH grid cells the algorithm generates a huge amount of potential contact pairs. Only way to avoid this is to reduce the Outer and Inner margins of the collider object - they are set 1.0 in the file, meaning almost all mesh faces will be considered for collision for all the hair points.

There is no way to fix it with the current system, we will need a proper contact point generation method.