Blender Crashing after "Clear Sharp" of a mesh #62324

Closed
opened 2019-03-07 17:35:23 +01:00 by Yolao Heinz · 6 comments

System Information
Operating system:
Graphics card:

Windows 7
GeForce GTX 650Ti

Blender Version
blender-2.80-a280867ac2ed-win64

Short description of error
Blender is crashing every time after i clear the sharps of a duplicated face of an object and the hitting undo.

Exact steps for others to reproduce the error

  • With the default Cube enter Edit Mode select all the edges "Ctrl + e" "Mark Sharp"
  • With the same edges selected "Ctrl + e" "Edge Bevel Weight" to 1
  • With the same edges selected "Shift + e" and crease the edges to 1.
  • Select one of the faces of the cube "Shift + D" to duplicate that face and then "P" "Selection" to separate that face into a mesh.
  • Select the newly created mesh from the face of the cube, enter edit mode, select all the edges and hot "Ctrl + e" > "Clear Sharp"
  • Enter object mode, hit "ctrl + z" for undo and Blender will crash intermediately. This happens always.
**System Information** Operating system: Graphics card: Windows 7 GeForce GTX 650Ti **Blender Version** blender-2.80-a280867ac2ed-win64 **Short description of error** Blender is crashing every time after i clear the sharps of a duplicated face of an object and the hitting undo. **Exact steps for others to reproduce the error** - With the default Cube enter Edit Mode select all the edges "Ctrl + e" "Mark Sharp" - With the same edges selected "Ctrl + e" "Edge Bevel Weight" to 1 - With the same edges selected "Shift + e" and crease the edges to 1. - Select one of the faces of the cube "Shift + D" to duplicate that face and then "P" "Selection" to separate that face into a mesh. - Select the newly created mesh from the face of the cube, enter edit mode, select all the edges and hot "Ctrl + e" > "Clear Sharp" - Enter object mode, hit "ctrl + z" for undo and Blender will crash intermediately. This happens always.
Author

Added subscriber: @Yolao

Added subscriber: @Yolao
Member

Added subscriber: @lichtwerk

Added subscriber: @lichtwerk
Member

Confirmed, checking...

Confirmed, checking...
Member

same backtrace as in #62318

Though this doesnt cause the crash alone:
As soon as you set any Edge Bevel Weight in editmode, then enter objectmode [no need to separate the face into a new object], I am getting:
write_customdata error: layer '':29 - can't be written to file

checking further...

same backtrace as in #62318 Though this doesnt cause the crash alone: As soon as you set any `Edge Bevel Weight` in editmode, then enter objectmode [no need to separate the face into a new object], I am getting: `write_customdata error: layer '':29 - can't be written to file` checking further...
Member

quick bandaid would be still need to check if this could also be handled [here ]
P930: T62324_snippet



diff --git a/source/blender/blenloader/intern/writefile.c b/source/blender/blenloader/intern/writefile.c
index c2cd6f282e8..603e68c8771 100644
--- a/source/blender/blenloader/intern/writefile.c
+++ b/source/blender/blenloader/intern/writefile.c
@@ -2126,7 +2126,7 @@ static void write_customdata(
 		else if (layer->type == CD_MDISPS) {
 			write_mdisps(wd, count, layer->data, layer->flag & CD_FLAG_EXTERNAL);
 		}
-		else if (layer->type == CD_PAINT_MASK) {
+		else if (ELEM(layer->type, CD_PAINT_MASK, CD_BWEIGHT)) {
 			const float *layer_data = layer->data;
 			writedata(wd, DATA, sizeof(*layer_data) * count, layer_data);
 		}

this will then not crash / prevent the 'corrupted' CD_BWEIGHT, but it is probably best to also put in a security check in the unfortunate case where this layer is indeed corrupted...

quick bandaid would be [still need to check if this could also be handled [here ]](https://developer.blender.org/diffusion/B/browse/master/source/blender/blenloader/intern/writefile.c$2141) [P930: T62324_snippet](https://archive.blender.org/developer/P930.txt) ``` diff --git a/source/blender/blenloader/intern/writefile.c b/source/blender/blenloader/intern/writefile.c index c2cd6f282e8..603e68c8771 100644 --- a/source/blender/blenloader/intern/writefile.c +++ b/source/blender/blenloader/intern/writefile.c @@ -2126,7 +2126,7 @@ static void write_customdata( else if (layer->type == CD_MDISPS) { write_mdisps(wd, count, layer->data, layer->flag & CD_FLAG_EXTERNAL); } - else if (layer->type == CD_PAINT_MASK) { + else if (ELEM(layer->type, CD_PAINT_MASK, CD_BWEIGHT)) { const float *layer_data = layer->data; writedata(wd, DATA, sizeof(*layer_data) * count, layer_data); } ``` this will then not crash / prevent the 'corrupted' CD_BWEIGHT, but it is probably best to also put in a security check in the unfortunate case where this layer is indeed corrupted...

Closed as duplicate of #62318

Closed as duplicate of #62318
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
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#62324
No description provided.