Boolean union causing crash when combined with a dependency loop (2.93 regression) #86879

Closed
opened 2021-03-24 09:51:10 +01:00 by Alaska · 12 comments
Member

System Information:
Operating system: Linux-5.10.0-4-amd64-x86_64-with-debian-bullseye-sid 64 Bits
Graphics card: GeForce RTX 3070/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 460.67

Blender Version:
Broken: 2.93.0 Alpha, branch: master, commit date: 2021-03-24 01:38, hash: 3f47df577d
Worked: 2.92 release (Technically it doesn't work in 2.92, but Blender doesn't crash when doing this which is why I've listed it as "worked")

Short description of error:
I've found that when the boolean union modifier is used on an object with the target object also having a boolean modifier that has this object as it's target, Blender will crash (in some situations). Here's my crash log:
blender.crash.txt
Technically this is a dependency loop and as such a user shouldn't be doing this, but I've found that from time to time I can accidentally select the wrong object with the eye dropper and as such this crash can occur.

Exact steps for others to reproduce the error:
Watch the video or read the steps below.

  1. With the "General" startup file, select the cube and duplicate it and move it.
  2. Now select the original cube and add a boolean modifier to it set to Difference mode and with the duplicate cube as the target.
  3. Now select the duplicate cube and give it a boolean modifier set to Union mode with the original cube as the target. Blender will crash.

Note: In step 2 I tell you to select the original cube then add the Difference boolean modifier to it. If you instead give the difference modifier to the duplicated cube, Blender will not crash unless you change a setting on the duplicate cubes modifier after setting up the union modifier. Not sure why.

Boolean union crash.mp4

EDIT:
Added a test file.
boolean_crash.blend

**System Information:** Operating system: Linux-5.10.0-4-amd64-x86_64-with-debian-bullseye-sid 64 Bits Graphics card: GeForce RTX 3070/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 460.67 **Blender Version:** Broken: 2.93.0 Alpha, branch: master, commit date: 2021-03-24 01:38, hash: `3f47df577d` Worked: 2.92 release (Technically it doesn't work in 2.92, but Blender doesn't crash when doing this which is why I've listed it as "worked") **Short description of error:** I've found that when the boolean union modifier is used on an object with the target object also having a boolean modifier that has this object as it's target, Blender will crash (in some situations). Here's my crash log: [blender.crash.txt](https://archive.blender.org/developer/F9906748/blender.crash.txt) Technically this is a dependency loop and as such a user shouldn't be doing this, but I've found that from time to time I can accidentally select the wrong object with the eye dropper and as such this crash can occur. **Exact steps for others to reproduce the error:** Watch the video or read the steps below. 1. With the "General" startup file, select the cube and duplicate it and move it. 2. Now select the original cube and add a boolean modifier to it set to `Difference` mode and with the duplicate cube as the target. 3. Now select the duplicate cube and give it a boolean modifier set to `Union` mode with the original cube as the target. Blender will crash. Note: In step 2 I tell you to select the original cube then add the `Difference` boolean modifier to it. If you instead give the difference modifier to the duplicated cube, Blender will not crash unless you change a setting on the duplicate cubes modifier after setting up the union modifier. Not sure why. [Boolean union crash.mp4](https://archive.blender.org/developer/F9906749/Boolean_union_crash.mp4) EDIT: Added a test file. [boolean_crash.blend](https://archive.blender.org/developer/F9906800/boolean_crash.blend)
Author
Member

Added subscriber: @Alaska

Added subscriber: @Alaska
Member

Added subscriber: @filedescriptor

Added subscriber: @filedescriptor
Member

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

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

I can reproduce this crash on the latest 2.93.0 Alpha, branch: master, commit date: 2021-03-24 08:34, hash: 865025c343.

I can reproduce this crash on the latest 2.93.0 Alpha, branch: master, commit date: 2021-03-24 08:34, hash: `865025c343`.
Member

Added subscriber: @HooglyBoogly

Added subscriber: @HooglyBoogly
Member

Ran this through a debug build. The crash happens in blender/source/blender/modifiers/intern/MOD_boolean.c:663 because mesh_operand is NULL.

mesh_operand = BKE_modifier_get_evaluated_mesh_from_evaluated_object(bmd->object, false);
BKE_mesh_wrapper_ensure_mdata(mesh_operand);

@HooglyBoogly Does this just need a NULL check?

The dependency graph detects the cycle correctly:

Dependency cycle detected:
  OBCube/Geometry Component/GEOMETRY_EVAL() depends on
  OBCube.001/Geometry Component/GEOMETRY_EVAL() via 'Boolean Modifier'
  OBCube/Geometry Component/GEOMETRY_EVAL() via 'Boolean Modifier'
Detected 1 dependency cycles
Ran this through a debug build. The crash happens in `blender/source/blender/modifiers/intern/MOD_boolean.c:663` because `mesh_operand` is `NULL`. ``` mesh_operand = BKE_modifier_get_evaluated_mesh_from_evaluated_object(bmd->object, false); BKE_mesh_wrapper_ensure_mdata(mesh_operand); ``` @HooglyBoogly Does this just need a `NULL` check? The dependency graph detects the cycle correctly: ``` Dependency cycle detected: OBCube/Geometry Component/GEOMETRY_EVAL() depends on OBCube.001/Geometry Component/GEOMETRY_EVAL() via 'Boolean Modifier' OBCube/Geometry Component/GEOMETRY_EVAL() via 'Boolean Modifier' Detected 1 dependency cycles ```
Member

Honestly I'm not sure, I didn't work on this code really. If a NULL check fixes this problem it looks like it would be reasonable to add.

Honestly I'm not sure, I didn't work on this code really. If a NULL check fixes this problem it looks like it would be reasonable to add.
Member

Added subscriber: @howardt

Added subscriber: @howardt
Member

@HooglyBoogly I am sorry! I meant to tag @howardt !

@HooglyBoogly I am sorry! I meant to tag @howardt !

This issue was referenced by 94079ffc7f

This issue was referenced by 94079ffc7f0e49c9eb923eb59b065973ae9cd990
Member

Changed status from 'Confirmed' to: 'Resolved'

Changed status from 'Confirmed' to: 'Resolved'
Howard Trickey self-assigned this 2021-03-31 15:36:17 +02:00
Member

Yes, a NULL check was all that was needed (and also in the similar Collection case). Thanks for the report. Fixed.

Yes, a NULL check was all that was needed (and also in the similar Collection case). Thanks for the report. Fixed.
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#86879
No description provided.