Crash With Exact Self Booleans With > ~1.5M Triangles #83012

Closed
opened 2020-11-25 18:34:59 +01:00 by Philip Holzmann · 6 comments

System Information
Operating system: Windows 64 bit
Graphics card: Nivida GTX 750 Ti

Blender Version
Broken: 2.91.0 release
Worked: never?

Short description of error
High poly meshes cause the exact booleans to crash, due to a failed memory allocation. This, however, only occurs with the Self flag checked.
I have 16 GB of RAM, of which only about 2 GB is used, and the allocation also seems to be exactly 2 GB, which is quite suspicious. I'm not sure what's going wrong here.

For me, this makes the exact boolean unusable for combining parts of a large sculpt, since the Collection mode implies Self.

Exact steps for others to reproduce the error
boolean_highpoly.blend
Tick the Self in the modifier options. Crash ensues after a few seconds.

blender_system_info.txt
blender_debug_output.txt

**System Information** Operating system: Windows 64 bit Graphics card: Nivida GTX 750 Ti **Blender Version** Broken: 2.91.0 release Worked: never? **Short description of error** High poly meshes cause the exact booleans to crash, due to a failed memory allocation. This, however, only occurs with the *Self* flag checked. I have 16 GB of RAM, of which only about 2 GB is used, and the allocation also seems to be *exactly* 2 GB, which is quite suspicious. I'm not sure what's going wrong here. For me, this makes the exact boolean unusable for combining parts of a large sculpt, since the *Collection* mode implies *Self*. **Exact steps for others to reproduce the error** [boolean_highpoly.blend](https://archive.blender.org/developer/F9373866/boolean_highpoly.blend) Tick the *Self* in the modifier options. Crash ensues after a few seconds. [blender_system_info.txt](https://archive.blender.org/developer/F9373876/blender_system_info.txt) [blender_debug_output.txt](https://archive.blender.org/developer/F9373873/blender_debug_output.txt)

Added subscriber: @Foaly

Added subscriber: @Foaly
Philip Holzmann changed title from Crash With Exact Seö > ~1.5M Triangles to Crash With Exact Self Booleans With > ~1.5M Triangles 2020-11-25 18:35:23 +01:00

Added subscriber: @rjg

Added subscriber: @rjg

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

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

The measurements of the used memory seem to be incorrect. After enabling Self the memory usage peaks at approximately 19.4 GB. This means you're running out of memory. You will either have to use less complex mesh or a computer with more RAM.

The measurements of the used memory seem to be incorrect. After enabling *Self* the memory usage peaks at approximately 19.4 GB. This means you're running out of memory. You will either have to use less complex mesh or a computer with more RAM.

I have tried this again with a debugger attached. At the time of crash, Blender has only allocated a total of ~4GB.
I will try to investigate further.

I have tried this again with a debugger attached. At the time of crash, Blender has only allocated a total of ~4GB. I will try to investigate further.

Okay, I must have misinterpreted something here, it appears the crash was indeed due to running out of memory.
The crash happened in source\blender\blenlib\intern\mesh_intersect.cc:trimesh_nary_intersect() in the call itt_map.reserve(tri_ov.overlap().size());.

I tried replacing the hash map with a regular std::unordered_map, which results in it running without crashing and peaking at 7.8 GB (less than half the peak you reported!).
Due to this, I think it might be worth looking into replacing Blender's own hash map implementation, at least for the booleans.

Okay, I must have misinterpreted something here, it appears the crash was indeed due to running out of memory. The crash happened in `source\blender\blenlib\intern\mesh_intersect.cc:trimesh_nary_intersect()` in the call `itt_map.reserve(tri_ov.overlap().size());`. I tried replacing the hash map with a regular `std::unordered_map`, which results in it running without crashing and peaking at 7.8 GB (less than half the peak you reported!). Due to this, I think it might be worth looking into replacing Blender's own hash map implementation, at least for the booleans.
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
2 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#83012
No description provided.