Fix #125157: Sculpt multires crashes on box mask and duplicated stroke #125268
No reviewers
Labels
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset System
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
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
Viewport & EEVEE
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Asset Browser Project
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
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
Module
Viewport & EEVEE
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Severity
High
Severity
Low
Severity
Normal
Severity
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#125268
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "Sean-Kim/blender:fix-125157"
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?
Introduced in
d527e3a6bd
.The change to update PBVH normals before destroying the PBVH to fix
shading on duplicate meshes issues had the unfortunate side effect of
causing crashes for multires due to a race condition. This commit
simply avoids performing this flushing for multires to allow for
further iteration in the future instead of reverting the offending
commit entirely.
For more information, the unreported issue that's alluded to in the original post of this PR is likely a race condition that I missed encountering when testing the initial implementation. That crash can be reproduced in current main, hence why I'm advocating to revert this in both this branch and in the 4.2 release branch.
Also, the reason the mask tool encounters this error in 4.2 but not in current main is because prior to
90c4c48bbf (diff-7ea99a817b555b40cfc6c3601aeb8a8de5048f54)
the mask gestures would tag a normal update for multires for some reason. While removing this call in the 4.2 branch fixes the problem for the mask tool, the larger multires crash with sculpting on duplicated objects still remains.An alternative here is to apply the following fix to simply ignore this update for multires, I'm currently undecided if this seems less risky & worth doing. It has the benefit of keeping curve stroke normals working for normal meshes:
I think it will be fine to go with your suggestion about
BKE_pbvh_type(*ss->pbvh) != PBVH_GRIDS
. Just add a comment with a reference to the report/PR, to make it easier to re-iterate in the future.Revert "Fix #122947: Curve stroke on duplicate object doesn't update normals"to Fix #125157: Sculpt multires crashes on box mask and duplicated stroke@ -2052,1 +2052,3 @@
if (ss->pbvh) {
/* Avoid performing the following normal update for Multires, as it causes race conditions
* and other intermittent crashes with shared meshes.
* See !125268 and #125157 for more information. */
. */
->. */
Yes, just reverting the change for multires makes sense to me.
but: if (ss->pbvh && BKE_pbvh_type(*ss->pbvh) != PBVH_GRIDS) { compiled fine
![image](/blender/blender/attachments/d79b5aee-e0ed-4e9e-8ce9-3a5be947f82c)
Refactored in 4.3 with this commit:
7daefd730b
Sean Kim referenced this pull request2024-07-24 01:44:57 +02:00