blender crash when adding segments on bevel modifier #73450

Closed
opened 2020-01-28 08:58:41 +01:00 by fadil fikrillah · 12 comments

System Information
Operating system: Linux-5.4.0-3-amd64-x86_64-with-debian-bullseye-sid 64 Bits
Graphics card: AMD Radeon R6 Graphics (CARRIZO, DRM 3.35.0, 5.4.0-3-amd64, LLVM 9.0.1) X.Org 4.5 (Core Profile) Mesa 19.3.2

Blender Version
Broken: version: 2.81 (sub 16), branch: Unknown, commit date: Unknown Unknown, hash: rBUnknown
Worked: (optional)

Short description of error
blender crash when adding segments on bevel modifier

Exact steps for others to reproduce the error

  1. open the file attached
  2. increment Segments in Bevel modifier
  3. blender should crash

file_updated.blend

**System Information** Operating system: Linux-5.4.0-3-amd64-x86_64-with-debian-bullseye-sid 64 Bits Graphics card: AMD Radeon R6 Graphics (CARRIZO, DRM 3.35.0, 5.4.0-3-amd64, LLVM 9.0.1) X.Org 4.5 (Core Profile) Mesa 19.3.2 **Blender Version** Broken: version: 2.81 (sub 16), branch: Unknown, commit date: Unknown Unknown, hash: `rBUnknown` Worked: (optional) **Short description of error** blender crash when adding segments on bevel modifier **Exact steps for others to reproduce the error** 1. open the file attached 2. increment `Segments` in Bevel modifier 3. blender should crash [file_updated.blend](https://archive.blender.org/developer/F8307116/file_updated.blend)

Added subscriber: @fikrillah

Added subscriber: @fikrillah
Member

Changed status from 'Needs Triage' to: 'Confirmed'

Changed status from 'Needs Triage' to: 'Confirmed'
Member

Added subscribers: @HooglyBoogly, @howardt, @JacquesLucke

Added subscribers: @HooglyBoogly, @howardt, @JacquesLucke
Member

It crashes in snap_to_pipe_profile due to a failed matrix inversion.

It crashes in `snap_to_pipe_profile` due to a failed matrix inversion.

Added subscriber: @Pasang

Added subscriber: @Pasang

Doesn't crash in my system though...

Doesn't crash in my system though...
Member

It might be that it only crashes deterministically in debug builds because an assert is hit in the code. The error might go unnoticed in release builds when you are unlucky.

It might be that it only crashes deterministically in debug builds because an assert is hit in the code. The error might go unnoticed in release builds when you are unlucky.
Member

I'll look into this as soon as I get a chance.

I'll look into this as soon as I get a chance.
Member

I looked into it some. The problem is that the start and end of some profiles (e.g., for edge 33 between vertices 16 and 93) are the same point. This seems to be because when offset_meet is called during build_boundary, the left and right offsets of beveled edges 33, 35, and 37 are zero. They got set properly in bevel_vert_construct, so not sure where they got reset.

We should fix the snap-to-pipe code to detect when the profile start and end points are the same, and just return the coords of one of those points and avoid the matrix inversion. That will stop the crash. But we should try to figure out why those points are identical in this case, too.

I looked into it some. The problem is that the start and end of some profiles (e.g., for edge 33 between vertices 16 and 93) are the same point. This seems to be because when offset_meet is called during build_boundary, the left and right offsets of beveled edges 33, 35, and 37 are zero. They got set properly in bevel_vert_construct, so not sure where they got reset. We should fix the snap-to-pipe code to detect when the profile start and end points are the same, and just return the coords of one of those points and avoid the matrix inversion. That will stop the crash. But we should try to figure out why those points are identical in this case, too.
Member

The problem is provoked because the input mesh has some edges that form a zero-degree angle, causing clamp overlap to set the offsets to approximately zero (hence, even with bug fix, this mesh will not bevel noticeably with clamp overlap turned on). Information for bug reporter: an example of the problem are the vertices with indices 44, 17, 73, 10, which form a chain in that order, while it looks like what was intended was that vertex 17 would be in the center of edges going to 10, 73, and 44. You can see vertex indices by selecting Developer Extras in Preferences, then clicking "Indices" in the Display Overlap options, then selecting all the vertices.

My next commit will protect against crashes in this situation and close this bug.

The problem is provoked because the input mesh has some edges that form a zero-degree angle, causing clamp overlap to set the offsets to approximately zero (hence, even with bug fix, this mesh will not bevel noticeably with clamp overlap turned on). Information for bug reporter: an example of the problem are the vertices with indices 44, 17, 73, 10, which form a chain in that order, while it looks like what was intended was that vertex 17 would be in the center of edges going to 10, 73, and 44. You can see vertex indices by selecting Developer Extras in Preferences, then clicking "Indices" in the Display Overlap options, then selecting all the vertices. My next commit will protect against crashes in this situation and close this bug.

This issue was referenced by 30963eecfb

This issue was referenced by 30963eecfb3be0dd50624d54f2111e7f1ed49d6b
Member

Changed status from 'Confirmed' to: 'Resolved'

Changed status from 'Confirmed' to: 'Resolved'
Howard Trickey self-assigned this 2020-01-30 13:58:22 +01:00
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#73450
No description provided.