Debug build BM_mesh_triangulate() will hang forever if mesh face count is high. #87625
Labels
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
4 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#87625
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
System Information
Operating system: Xubuntu 20.04
Graphics card: NVidia K5100M
Blender Version
Broken ONLY WITH
Debug
build: Blender 3.0.0 Alpha (It should have been broken way earlier)Worked only with
Release
and 'RelWithDebInfo' build: Blender 3.0.0 AlphaShort description of error
The call to
BM_mesh_triangulate(bm, quad_method, ngon_method, 4, false, NULL, NULL, NULL)
does not exit on some bigger meshes. Specifically, it seems to have been stuck insideBM_face_kill(bm, faces_double->link);
.(if you call it with bmesh
op
andslot_in/out
arguments it will run properly)Exact steps for others to reproduce the error
On my machine the bucket runs fine with subdiv levels 1-2 and above 3 the bug shows. The subdiv value in that file is 3.
Note that the bug is only reproducible in
Debug
build. Seems that function doesn't like meshes that has face count higher than a certain amount...My guess would be there's a lot of checks in debug code path in the function, somewhere it reaches a case where the memory pool gets corrupted. It never quits, in the task manager, memory doesn't show any changes at all. (It's way below my 32G system memory so it can't be there being not enough memory).
Since this triangulation call is related to sculpt as well so I'm gonna ask if this happens to @PabloDobarro in debug build...
0_rouge_bucket.blend
Added subscribers: @PabloDobarro, @ChengduLittleA
Added subscriber: @ankitm
It's not stuck as in a lock or a freeze. It's doing the work in the first
#ifndef NDEBUG
section ofBLI_mempool_free
.That explains it being a problem in debug build.
Added subscribers: @Sergey, @dfelinto
@Sergey you added this (the NDEBUG code in BLI_mempool_free) 8 years ago. Care to comment on this?
After 20 minutes, Blender becomes functional again.
@dfelinto, clearly that was a way to catch issues with misuse of memory pools, to ensure only addresses from the pool are freed.
You can move the check inside of
if (UNLIKELY(mempool_debug_memset)) {
(maybe call the flag more explicit). But you should also check that the pool is used properly. The fact that the code shows up in the profiles means that there are a lot of chunks, meaning, pool might not be really saving up on allocations. It might be all fine, but that's what you need to check.Changed status from 'Needs Triage' to: 'Confirmed'