Crash after adjusting lenght of hair particles #52439

Closed
opened 2017-08-18 12:12:49 +02:00 by Jakub Vaja · 19 comments

System Information
Win 10 64bit, GTX 760 driver - 378.49

Blender Version
Broken: (example: 2.79 66c1b23,)
Worked: (2.78 public release)

Short description of error
Crash after adjusting length of hair particles

Exact steps for others to reproduce the error
1.create a polygonal object
2.create particle system type of hair
3.check advanced particles
4.switch emit mode to verts
5. try to change hair length and blender crash

**System Information** Win 10 64bit, GTX 760 driver - 378.49 **Blender Version** Broken: (example: 2.79 66c1b23,) Worked: (2.78 public release) **Short description of error** Crash after adjusting length of hair particles **Exact steps for others to reproduce the error** 1.create a polygonal object 2.create particle system type of hair 3.check advanced particles 4.switch emit mode to verts 5. try to change hair length and blender crash
Author

Changed status to: 'Open'

Changed status to: 'Open'
Author

Added subscriber: @Conflig

Added subscriber: @Conflig

#52686 was marked as duplicate of this issue

#52686 was marked as duplicate of this issue

#52674 was marked as duplicate of this issue

#52674 was marked as duplicate of this issue

#52577 was marked as duplicate of this issue

#52577 was marked as duplicate of this issue

#52456 was marked as duplicate of this issue

#52456 was marked as duplicate of this issue

Added subscriber: @fablefox

Added subscriber: @fablefox

Can you provide a simple blender file to reproduce the problem?

Can you provide a simple blender file to reproduce the problem?
Author

crash_hair_particles.blend Just click on the length parameter box. It actually crashed once as I hit the verts emit mode

[crash_hair_particles.blend](https://archive.blender.org/developer/F717848/crash_hair_particles.blend) Just click on the length parameter box. It actually crashed once as I hit the verts emit mode

Confirmed with 2.7c rc1.

Error: EXCEPTION_ACCESS_VIOLATION
Confirmed with 2.7c rc1. ``` Error: EXCEPTION_ACCESS_VIOLATION ```

also happens with 2.79 RC2

Exception thrown at 0x0000000140FD1B6F in blender.exe: 0xC0000005: Access violation writing location 0xFFFFFFFF855E6B2C.

void CustomData_update_typemap(CustomData *data)
{
	int i, lasttype = -1;

	for (i = 0; i < CD_NUMTYPES; i++) {
		data->typemap[i] = -1;
	}

	for (i = 0; i < data->totlayer; i++) {
		const int type = data->layers[i].type;
		if (type != lasttype) {
			data->typemap[type] = i;  <--- next statement to be executed
			lasttype = type;
		}
	}
}




Unhandled exception at 0x0000000140FD1B6F in blender.exe: 0xC0000005: Access violation writing location 0xFFFFFFFF855E6B2C.

Exception thrown at 0x0000000140FD1B6F in blender.exe: 0xC0000005: Access violation writing location 0xFFFFFFFF855E6B2C.

Unhandled exception at 0x0000000140FD1B6F in blender.exe: 0xC0000005: Access violation writing location 0xFFFFFFFF855E6B2C.

Exception thrown at 0x0000000140FD1B6F in blender.exe: 0xC0000005: Access violation writing location 0xFFFFFFFF855E6B2C.

Unhandled exception at 0x0000000140FD1B6F in blender.exe: 0xC0000005: Access violation writing location 0xFFFFFFFF855E6B2C.

Exception thrown at 0x0000000140FD1B6F in blender.exe: 0xC0000005: Access violation writing location 0xFFFFFFFF855E6B2C.
also happens with 2.79 RC2 ``` Exception thrown at 0x0000000140FD1B6F in blender.exe: 0xC0000005: Access violation writing location 0xFFFFFFFF855E6B2C. void CustomData_update_typemap(CustomData *data) { int i, lasttype = -1; for (i = 0; i < CD_NUMTYPES; i++) { data->typemap[i] = -1; } for (i = 0; i < data->totlayer; i++) { const int type = data->layers[i].type; if (type != lasttype) { data->typemap[type] = i; <--- next statement to be executed lasttype = type; } } } Unhandled exception at 0x0000000140FD1B6F in blender.exe: 0xC0000005: Access violation writing location 0xFFFFFFFF855E6B2C. Exception thrown at 0x0000000140FD1B6F in blender.exe: 0xC0000005: Access violation writing location 0xFFFFFFFF855E6B2C. Unhandled exception at 0x0000000140FD1B6F in blender.exe: 0xC0000005: Access violation writing location 0xFFFFFFFF855E6B2C. Exception thrown at 0x0000000140FD1B6F in blender.exe: 0xC0000005: Access violation writing location 0xFFFFFFFF855E6B2C. Unhandled exception at 0x0000000140FD1B6F in blender.exe: 0xC0000005: Access violation writing location 0xFFFFFFFF855E6B2C. Exception thrown at 0x0000000140FD1B6F in blender.exe: 0xC0000005: Access violation writing location 0xFFFFFFFF855E6B2C. ```
Member

Added subscribers: @LucaRood-3, @mont29, @LazyDodo

Added subscribers: @LucaRood-3, @mont29, @LazyDodo
Member

it's a threading issue introduced in fed853ea78

in distribute_from_verts_exec there's a call to

DM_ensure_tessface(ctx->dm);
mface = ctx->dm->getTessFaceDataArray(ctx->dm, CD_MFACE);

which isn't thread safe to execute, I guarded this bit of code with a spinlock and the problem went away, but that's somewhat of a crude fix.

@LucaRood-3 / @mont29 can either of you guys take a peek here?

it's a threading issue introduced in fed853ea78 in distribute_from_verts_exec there's a call to ``` DM_ensure_tessface(ctx->dm); mface = ctx->dm->getTessFaceDataArray(ctx->dm, CD_MFACE); ``` which isn't thread safe to execute, I guarded this bit of code with a spinlock and the problem went away, but that's somewhat of a crude fix. @LucaRood-3 / @mont29 can either of you guys take a peek here?

Added subscribers: @ostapblender, @zeauro, @brecht, @Sergey

Added subscribers: @ostapblender, @zeauro, @brecht, @Sergey
Bastien Montagne self-assigned this 2017-08-20 17:16:43 +02:00

This issue was referenced by 146b0c6b04

This issue was referenced by 146b0c6b04920efd3582660f6b5e409613e70b25

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'

Added subscribers: @captaincavern, @dfelinto

Added subscribers: @captaincavern, @dfelinto

Added subscriber: @nhoJ

Added subscriber: @nhoJ
Member

Added subscriber: @Letheed-1

Added subscriber: @Letheed-1
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
7 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#52439
No description provided.