Assert in debug for dyntopo sculpt #111574
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#111574
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: Windows-10-10.0.19045-SP0 64 Bits
Graphics card: NVIDIA GeForce GTX 1060 6GB/PCIe/SSE2 NVIDIA Corporation 4.6.0 NVIDIA 527.56
Blender Version
Broken: Today main.
Worked: (newest version of Blender that worked as expected)
Short description of error
See attached stack trace file.
Exact steps for others to reproduce the error
In debug:
See the crash.
Can you take a look at this @HooglyBoogly /
I can confirm the assert hit.
Regression: Asser in debug for dyntopo sculptto Regression: Assert in debug for dyntopo sculptI tested main from 1 month ago and the assert still triggered. I don't understand what the assert is supposed to test for, so not sure there's much I can do here.
I'll lower the priority then.
(Also unclear to us whether this is a regression or not)
Regression: Assert in debug for dyntopo sculptto Assert in debug for dyntopo sculptStarted looking into this because I'm doing a bit of work on dyntopo related features.
The commit that added a lot of the relevant code is here:
7f133b7a38
I'll do a build of this older commit to see if this assert has failed since this was added, but I'm confused as to how this codepath doesn't cause a segfault with dereferencing a nullptr when the assert is disabled.
If
BLI_ghash_haskey
is returning false, thenBLI_ghash_lookup
should returnNULL
which I assume would causelv->co
to then crash blender.Yeah, this assert has been here since I started dealing with dyntopo code last year or the year before.
It doesn't segfault because
offsetof(BMVert::co) == 0
, and the caller has a null check on the returned float pointer.But I still can't make any sense of this area, so I don't really have a suggestion besides "remove the assert, add some more null checks"
Building the code has it crash to an entirely different assert well before it even gets to the topology update. I don't think further digging is going to be particularly useful.
The original assert according to the git history has been around since this file was made back in 2012 - my current understanding of the code added that's calling
BM_log_original_vert_co
is that it was used for some transitionary code for a deprecated attribute of the PBVH.It seems like an oversight of the calling code in the end -
BM_log_original_vert_co
doesn't have a "safe" variant and just assumes that if you're requesting a vertex it has to be in the BMesh Log.I can see a few options:
BM_log_original_vert_co
so that it checks foruse_original
before even attempting to access the log, since the sculpt codepath that is triggering this assert doesnt even want this information.BM_log_has_vert
method and do something similar to 1 so the solution is slightly more robust.bm_orco
usage and see if it can be safely removed and this update step entirely removed.