SIGSEGV when adding skin modifier to empty mesh #32362

Closed
opened 2012-08-19 02:05:40 +02:00 by David Christensen · 5 comments

%%%Using 2.64 testbuild 2 on Mac OS X 10.7.4

I noticed a memory-related crash when you add a Skin Modifier to an empty mesh. To reproduce, do the following:

  1. Create a new mesh object (cube).
  2. Go to Edit Mode and delete all vertices.
  3. In Object Mode add a Skin Modifier; Blender immediately crashes with the following backtrace:

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 org.blenderfoundation.blender 0x000000010086150c modifier_skin_customdata_ensure + 156
1 org.blenderfoundation.blender 0x000000010085de3a ED_object_modifier_add + 426
2 org.blenderfoundation.blender 0x0000000100861b30 modifier_add_exec + 96
3 org.blenderfoundation.blender 0x0000000100838af1 wm_operator_invoke + 369
4 org.blenderfoundation.blender 0x000000010083918a wm_operator_call_internal + 282
5 org.blenderfoundation.blender 0x0000000100ac9c70 ui_apply_but_funcs_after + 256
6 org.blenderfoundation.blender 0x0000000100acd887 ui_handler_region_menu + 247
7 org.blenderfoundation.blender 0x00000001008396b6 wm_handlers_do + 678
8 org.blenderfoundation.blender 0x000000010083a19c wm_event_do_handlers + 1148
9 org.blenderfoundation.blender 0x0000000100833280 WM_main + 32
10 org.blenderfoundation.blender 0x000000010083311e main + 830
11 org.blenderfoundation.blender 0x000000010082f834 start + 52

Let me know if you need any additional help with debugging/testing.

Thanks!

David
%%%

%%%Using 2.64 testbuild 2 on Mac OS X 10.7.4 I noticed a memory-related crash when you add a Skin Modifier to an empty mesh. To reproduce, do the following: 1) Create a new mesh object (cube). 2) Go to Edit Mode and delete all vertices. 3) In Object Mode add a Skin Modifier; Blender immediately crashes with the following backtrace: Thread 0 Crashed:: Dispatch queue: com.apple.main-thread 0 org.blenderfoundation.blender 0x000000010086150c modifier_skin_customdata_ensure + 156 1 org.blenderfoundation.blender 0x000000010085de3a ED_object_modifier_add + 426 2 org.blenderfoundation.blender 0x0000000100861b30 modifier_add_exec + 96 3 org.blenderfoundation.blender 0x0000000100838af1 wm_operator_invoke + 369 4 org.blenderfoundation.blender 0x000000010083918a wm_operator_call_internal + 282 5 org.blenderfoundation.blender 0x0000000100ac9c70 ui_apply_but_funcs_after + 256 6 org.blenderfoundation.blender 0x0000000100acd887 ui_handler_region_menu + 247 7 org.blenderfoundation.blender 0x00000001008396b6 wm_handlers_do + 678 8 org.blenderfoundation.blender 0x000000010083a19c wm_event_do_handlers + 1148 9 org.blenderfoundation.blender 0x0000000100833280 WM_main + 32 10 org.blenderfoundation.blender 0x000000010083311e main + 830 11 org.blenderfoundation.blender 0x000000010082f834 start + 52 Let me know if you need any additional help with debugging/testing. Thanks! David %%%

Changed status to: 'Open'

Changed status to: 'Open'

%%%Looks like the issue is in "source/blender/editors/object/object_modifier.c":

In particular, this code path dereferences the value of CustomData_add_layer() without checking for a null pointer first. Not being familiar with this codebase, I'm not sure if that's an issue within CustomData_add_layer() violating some expectations, or if it's this code's responsibility to check that return value first.

else if (!CustomData_has_layer(&me->vdata, CD_MVERT_SKIN)) {
	vs = CustomData_add_layer(&me->vdata,
	                          CD_MVERT_SKIN,
	                          CD_DEFAULT,
	                          NULL,
	                          me->totvert);

	/* Mark an arbitrary vertex as root */
	vs->flag |= MVERT_SKIN_ROOT;    <------------------ Crash here
}

%%%

%%%Looks like the issue is in "source/blender/editors/object/object_modifier.c": In particular, this code path dereferences the value of CustomData_add_layer() without checking for a null pointer first. Not being familiar with this codebase, I'm not sure if that's an issue within CustomData_add_layer() violating some expectations, or if it's this code's responsibility to check that return value first. else if (!CustomData_has_layer(&me->vdata, CD_MVERT_SKIN)) { vs = CustomData_add_layer(&me->vdata, CD_MVERT_SKIN, CD_DEFAULT, NULL, me->totvert); /* Mark an arbitrary vertex as root */ vs->flag |= MVERT_SKIN_ROOT; <------------------ Crash here } %%%

%%%Nick, could you please check this report? Thanks!%%%

%%%Nick, could you please check this report? Thanks!%%%

%%%Fixed in r50025%%%

%%%Fixed in r50025%%%

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
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
3 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#32362
No description provided.