Trying to create hair with particles makes Blender crash #46382

Closed
opened 2015-10-05 14:09:51 +02:00 by Kagi · 11 comments

System Information
Operating system and graphics card

OSX 10.11/Windows 10, iMac w/ Nvidia GTX 680MX 2gb and PC w/ 4x Nvidia GTX970 4gb

Blender Version
Broken: 2.75a official (c27589e) and 2.76 rc3 (fb78f6d) from BF
Worked: none, as far as I tested

Short description of error

On a scene used for production projects, I tried to create a punk hair style on a head. I created a subdivided plan (3x3), added a shrinwrap modifier to make it follow the head shape and added hair particles (6 particles w/ 50 children). Then I duplicated the plan to create the hair (around 10 plans in total). Then on one plan, I wanted to use the Random parameter from the Particles>Velocity menu and Blender crashes

I tested it 4 times and it crashed on each. 2 times with the 2.76 rc3 and 2 times with the 2.75a. Now, the blend file won't open on each version (Mac or PC). I saved it just before trying the crash tough.

I can provide the blend file, if you can open it (zip file is around 200mb). And because I can't open the file again, I cannot provide a lighter file or even make some cleaning to isolate the bug. Also it contains meshes and rigs I don't want to share it to anyone.

I tried to reproduce the bug on a lighter scene, but this time the Random parameter worked well.

Exact steps for others to reproduce the error
The same as explained above.

**System Information** Operating system and graphics card OSX 10.11/Windows 10, iMac w/ Nvidia GTX 680MX 2gb and PC w/ 4x Nvidia GTX970 4gb **Blender Version** Broken: 2.75a official (c27589e) and 2.76 rc3 (fb78f6d) from BF Worked: none, as far as I tested **Short description of error** On a scene used for production projects, I tried to create a punk hair style on a head. I created a subdivided plan (3x3), added a shrinwrap modifier to make it follow the head shape and added hair particles (6 particles w/ 50 children). Then I duplicated the plan to create the hair (around 10 plans in total). Then on one plan, I wanted to use the Random parameter from the Particles>Velocity menu and Blender crashes I tested it 4 times and it crashed on each. 2 times with the 2.76 rc3 and 2 times with the 2.75a. Now, the blend file won't open on each version (Mac or PC). I saved it just before trying the crash tough. I can provide the blend file, if you can open it (zip file is around 200mb). And because I can't open the file again, I cannot provide a lighter file or even make some cleaning to isolate the bug. Also it contains meshes and rigs I don't want to share it to anyone. I tried to reproduce the bug on a lighter scene, but this time the Random parameter worked well. **Exact steps for others to reproduce the error** The same as explained above.
Author

Changed status to: 'Open'

Changed status to: 'Open'
Author

Added subscriber: @JonK

Added subscriber: @JonK
Author

Ok, finally I can provide a blend file for testing. Appending worked fine with the head mesh and one plan.

So here it is: http://ovh.to/ZLrs78b

All you have to do is to select one of the plan with hair, and try to change the Random setting from Particle>Velocity. It crashes on my side.

Ok, finally I can provide a blend file for testing. Appending worked fine with the head mesh and one plan. So here it is: http://ovh.to/ZLrs78b All you have to do is to select one of the plan with hair, and try to change the Random setting from Particle>Velocity. It crashes on my side.

Added subscriber: @zeauro

Added subscriber: @zeauro

ubuntu 14.04 64 bits hash 90b925f
I managed to isolate a problem.

When hair particle settings are linked to 2 different objects and Clump Curve is enabled for children; changing a setting by a mouse sliding will crash blender.
Linked_PS.blend1

In this file, you can change particles amount or hair length by clicking, by directly entering a value. But blender crashes if you try to click and slide value.

Problem seems absent from buildbot linux build or linux 2.76rc3

ubuntu 14.04 64 bits hash 90b925f I managed to isolate a problem. When hair particle settings are linked to 2 different objects and Clump Curve is enabled for children; changing a setting by a mouse sliding will crash blender. [Linked_PS.blend1](https://archive.blender.org/developer/F242413/Linked_PS.blend1) In this file, you can change particles amount or hair length by clicking, by directly entering a value. But blender crashes if you try to click and slide value. Problem seems absent from buildbot linux build or linux 2.76rc3
Author

Yes it works better that way on Win10, but not on OSX 10.11. Even entering manually the values make Blender crash on OSX. Mouse sliding make Blender crash on both OS.

And yes, on my scene, if each plan w/ hair has its own particles setting, all works fine.

Yes it works better that way on Win10, but not on OSX 10.11. Even entering manually the values make Blender crash on OSX. Mouse sliding make Blender crash on both OS. And yes, on my scene, if each plan w/ hair has its own particles setting, all works fine.

Added subscriber: @ideasman42

Added subscriber: @ideasman42

Confirmed, this is an issue with threading, if you start blender with the command line argument blender -t 1 the crash doesn't occur.

All the threads are initializing the same curve table, heres a stack trace: P268: #46382, threading crash

freed by thread #4 here:
    #0 0x7f653688450a in __interceptor_free ../../../../gcc/libsanitizer/asan/asan_malloc_linux.cc:28
    #1 0x429fb92 in MEM_lockfree_freeN /src/blender/intern/guardedalloc/intern/mallocn_lockfree_impl.c:169
    #2 0x2cea218 in curvemap_make_table /src/blender/source/blender/blenkernel/intern/colortools.c:571
    #3 0x2cef3cf in curvemapping_changed /src/blender/source/blender/blenkernel/intern/colortools.c:765
    #4 0x2cef597 in curvemapping_changed_all /src/blender/source/blender/blenkernel/intern/colortools.c:775
    #5 0x31d5e76 in psys_thread_context_init_path /src/blender/source/blender/blenkernel/intern/particle.c:2056
    #6 0x31db9a3 in psys_cache_child_paths /src/blender/source/blender/blenkernel/intern/particle.c:2357
    #7 0x323befc in psys_update_path_cache /src/blender/source/blender/blenkernel/intern/particle_system.c:2955
    #8 0x3240f6a in hair_step /src/blender/source/blender/blenkernel/intern/particle_system.c:3223
    #9 0x324edac in particle_system_update /src/blender/source/blender/blenkernel/intern/particle_system.c:4131
    #10 0x2391bac in deformVerts /src/blender/source/blender/modifiers/intern/MOD_particlesystem.c:163
    #11 0x30c9eb4 in modwrap_deformVerts /src/blender/source/blender/blenkernel/intern/modifier.c:775
    #12 0x2bc314c in mesh_calc_modifiers /src/blender/source/blender/blenkernel/intern/DerivedMesh.c:1816
    #13 0x2bca74d in mesh_build_data /src/blender/source/blender/blenkernel/intern/DerivedMesh.c:2577
    #14 0x2bcb721 in makeDerivedMesh /src/blender/source/blender/blenkernel/intern/DerivedMesh.c:2674
    #15 0x31993fa in BKE_object_handle_data_update /src/blender/source/blender/blenkernel/intern/object_update.c:201
    #16 0x3172fbc in BKE_object_handle_update_ex /src/blender/source/blender/blenkernel/intern/object.c:3135
    #17 0x32e1df1 in scene_update_object_func /src/blender/source/blender/blenkernel/intern/scene.c:1456
    #18 0x40fc234 in task_scheduler_thread_run /src/blender/source/blender/blenlib/intern/task.c:161
    #19 0x7f653474e4a3 in start_thread (/usr/lib/libpthread.so.0+0x74a3)
Confirmed, this is an issue with threading, if you start blender with the command line argument `blender -t 1` the crash doesn't occur. All the threads are initializing the same curve table, heres a stack trace: [P268: #46382, threading crash](https://archive.blender.org/developer/P268.txt) ```text freed by thread #4 here: #0 0x7f653688450a in __interceptor_free ../../../../gcc/libsanitizer/asan/asan_malloc_linux.cc:28 #1 0x429fb92 in MEM_lockfree_freeN /src/blender/intern/guardedalloc/intern/mallocn_lockfree_impl.c:169 #2 0x2cea218 in curvemap_make_table /src/blender/source/blender/blenkernel/intern/colortools.c:571 #3 0x2cef3cf in curvemapping_changed /src/blender/source/blender/blenkernel/intern/colortools.c:765 #4 0x2cef597 in curvemapping_changed_all /src/blender/source/blender/blenkernel/intern/colortools.c:775 #5 0x31d5e76 in psys_thread_context_init_path /src/blender/source/blender/blenkernel/intern/particle.c:2056 #6 0x31db9a3 in psys_cache_child_paths /src/blender/source/blender/blenkernel/intern/particle.c:2357 #7 0x323befc in psys_update_path_cache /src/blender/source/blender/blenkernel/intern/particle_system.c:2955 #8 0x3240f6a in hair_step /src/blender/source/blender/blenkernel/intern/particle_system.c:3223 #9 0x324edac in particle_system_update /src/blender/source/blender/blenkernel/intern/particle_system.c:4131 #10 0x2391bac in deformVerts /src/blender/source/blender/modifiers/intern/MOD_particlesystem.c:163 #11 0x30c9eb4 in modwrap_deformVerts /src/blender/source/blender/blenkernel/intern/modifier.c:775 #12 0x2bc314c in mesh_calc_modifiers /src/blender/source/blender/blenkernel/intern/DerivedMesh.c:1816 #13 0x2bca74d in mesh_build_data /src/blender/source/blender/blenkernel/intern/DerivedMesh.c:2577 #14 0x2bcb721 in makeDerivedMesh /src/blender/source/blender/blenkernel/intern/DerivedMesh.c:2674 #15 0x31993fa in BKE_object_handle_data_update /src/blender/source/blender/blenkernel/intern/object_update.c:201 #16 0x3172fbc in BKE_object_handle_update_ex /src/blender/source/blender/blenkernel/intern/object.c:3135 #17 0x32e1df1 in scene_update_object_func /src/blender/source/blender/blenkernel/intern/scene.c:1456 #18 0x40fc234 in task_scheduler_thread_run /src/blender/source/blender/blenlib/intern/task.c:161 #19 0x7f653474e4a3 in start_thread (/usr/lib/libpthread.so.0+0x74a3) ```

Added subscriber: @Lapineige

Added subscriber: @Lapineige

This issue was referenced by 6290df0cf4

This issue was referenced by 6290df0cf477475b8b769b0c0002e81ee70fc929

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'
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
6 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#46382
No description provided.