When Bevel modifier is applied to specific mesh Blender crashes #50064

Closed
opened 2016-11-17 19:56:15 +01:00 by Chaz Fried · 15 comments

System Information
Windows 7 professional 64-bit
Processor:
Intel Core 2 duo CPU p8400@2.26GHz
RAM: 2GB
Graphics: Mobile Intel 4 Series Express Chipset Family (apologies if not correct, will correct if need be)

Blender Version
Broken: 2.77 abf6f08

A previously applied bevel modifier was added to a .blend, and made invisible. After editing and joining 2 meshes, array modifier was tested, and worked wonderfully. Bevel modifier was made visible and cause blender to crash immediately.

Exact steps for others to reproduce the errorGears; (time 5_53).blend

  1. Open .blend
  2. Make bevel modifier visible
  3. Crash

or

  1. Remove bevel modifier
  2. reapply bevel
  3. Blender crashes
**System Information** Windows 7 professional 64-bit Processor: Intel Core 2 duo CPU p8400@2.26GHz RAM: 2GB Graphics: Mobile Intel 4 Series Express Chipset Family (apologies if not correct, will correct if need be) **Blender Version** Broken: 2.77 abf6f08 A previously applied bevel modifier was added to a .blend, and made invisible. After editing and joining 2 meshes, array modifier was tested, and worked wonderfully. Bevel modifier was made visible and cause blender to crash immediately. **Exact steps for others to reproduce the error**[Gears; (time 5_53).blend](https://archive.blender.org/developer/F402743/Gears___time_5_53_.blend) 1. Open .blend 2. Make bevel modifier visible 3. Crash or 1. Remove bevel modifier 2. reapply bevel 3. Blender crashes
Author

Changed status to: 'Open'

Changed status to: 'Open'
Author

Added subscriber: @PhantomModeler

Added subscriber: @PhantomModeler

Added subscribers: @howardt, @Sergey

Added subscribers: @howardt, @Sergey
Howard Trickey was assigned by Sergey Sharybin 2016-11-18 10:43:41 +01:00

Can reproduce crash with latest master.

@howardt, mind having a look here? :) Thanks!

Can reproduce crash with latest master. @howardt, mind having a look here? :) Thanks!
Member

Hope to get to this soon.

Hope to get to this soon.
Member

Looking at this now. It seems that the mesh in the test file violates the assumed invariants about BMeshes. If you start blender with --debug, and then toggle into Edit mode, the validation code reports that a particular face has a duplicate vertex and a duplicate edge.

I will try to make bevel not crash when this happens, but curious if you (PhantomModeler) remember how you made this mesh, as we should try to figure out which editing tool created this mess. (By the way, even without the integrity problem, there also some vertices that are extremely close together that you probably intended to merge. I'm guessing that perhaps Knife was used and it didn't snap to a vertex, but instead to an edge near the intended vertex.)

Looking at this now. It seems that the mesh in the test file violates the assumed invariants about BMeshes. If you start blender with --debug, and then toggle into Edit mode, the validation code reports that a particular face has a duplicate vertex and a duplicate edge. I will try to make bevel not crash when this happens, but curious if you (PhantomModeler) remember how you made this mesh, as we should try to figure out which editing tool created this mess. (By the way, even without the integrity problem, there also some vertices that are extremely close together that you probably intended to merge. I'm guessing that perhaps Knife was used and it didn't snap to a vertex, but instead to an edge near the intended vertex.)
Member

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'
Member

We write our tools under the assumption that the meshes are 'valid'. (If you run the python command mesh.validate(True) it can tell you whether the mesh is valid or not. Rather than try to put all sorts of protective code in all the tools, our policy is to instead make sure no tools produce invalid meshes. At any rate, even if Blender didn't crash, most tools could produce crap results on invalid meshes. Clearly some tool has produced your corrupt mesh -- in the example .blend file that you uploaded -- but without help understanding how that mesh was produced, I'm afraid there's nothing more than can be done here.
Closing this bug, but feel free to open a new bug or reopen this if you can reproduce the mesh corruption (that is, can provide an uncorrupted model and instructions for a next step that causes corruption).
Thanks anyway for the report.

We write our tools under the assumption that the meshes are 'valid'. (If you run the python command mesh.validate(True) it can tell you whether the mesh is valid or not. Rather than try to put all sorts of protective code in all the tools, our policy is to instead make sure no tools produce invalid meshes. At any rate, even if Blender didn't crash, most tools could produce crap results on invalid meshes. Clearly some tool has produced your corrupt mesh -- in the example .blend file that you uploaded -- but without help understanding how that mesh was produced, I'm afraid there's nothing more than can be done here. Closing this bug, but feel free to open a new bug or reopen this if you can reproduce the mesh corruption (that is, can provide an uncorrupted model and instructions for a next step that causes corruption). Thanks anyway for the report.

Added subscriber: @Zweistein

Added subscriber: @Zweistein

Cant you simply add that test "mesh.validate(True)" before you add the modifier? Blender keeps crashing and my work is not saved. This is really annoying as that crash happens all the time. Im using boolean to create my meshes.

Cant you simply add that test "mesh.validate(True)" before you add the modifier? Blender keeps crashing and my work is not saved. This is really annoying as that crash happens all the time. Im using boolean to create my meshes.

Added subscriber: @ideasman42

Added subscriber: @ideasman42

Validate is too slow, it needs to be done for any operation that might generate bad data.

It seems there is a bug in the gears add-on. Will check on making it validate all its output.

Validate is too slow, it needs to be done for any operation that might generate bad data. It seems there is a bug in the gears add-on. Will check on making it validate all its output.

Changed status from 'Resolved' to: 'Archived'

Changed status from 'Resolved' to: 'Archived'
Member

Hi Matthias,

We'd rather have the buggy tools that create invalid meshes call validate() afterwards (this fixes most of the problems), rather than have every tool in blender call validate() before running. In case of original report here, Gears is known to be buggy. Carve boolean is also known to be buggy -- is that the one you are using?

Hi Matthias, We'd rather have the buggy tools that create invalid meshes call validate() afterwards (this fixes most of the problems), rather than have every tool in blender call validate() before running. In case of original report here, Gears is known to be buggy. Carve boolean is also known to be buggy -- is that the one you are using?

Note if you can re-create the cause of a corrupt mesh, this is worth reporting as a separate bug.

Note if you can re-create the cause of a corrupt mesh, this is worth reporting as a separate bug.
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
5 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#50064
No description provided.