WIP: Fix #87243: Crash after undo "Mask slice to new object" #119401
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
Code Documentation
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
FBX
Interest
Freestyle
Interest
Geometry Nodes
Interest
glTF
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 & 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
Asset System
Module
Core
Module
Development Management
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline & 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
3 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#119401
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "farsthary/blender:Fix-87243-Crash-after-undo-Mask-slice-to-new-object"
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?
Fix for Crash after undo "Mask slice to new object" #87243
Workaround to eliminate the crash and no loss of functionality
has been detected compared to before.
Fix 87243 Crash after undo "Mask slice to new object"to WIP: Fix 87243 Crash after undo "Mask slice to new object"WIP: Fix 87243 Crash after undo "Mask slice to new object"to Fix 87243 Crash after undo "Mask slice to new object"Fix 87243 Crash after undo "Mask slice to new object"to Fix 87243: Crash after undo "Mask slice to new object"Fix 87243: Crash after undo "Mask slice to new object"to Fix #87243: Crash after undo "Mask slice to new object"The list of commits in this PR seems a bit strange. Did you create your branch from main and targeted it to the 4.1 branch?
For the content of the patch, it might be better to handle the null-pointer checks separately from the fix. Adding them makes discussion about the actually changed logic more tricky, and opens discussion of leaving undo stack in a potentially inconsistent state due to early returns.
And for the fix, would it help moving creation of the new object prior to the
sculpt_paint::undo::geometry_begin
?Agreed with Sergey's comment. For fixes, the change should be as minimal as possible to correct the bug. Also, the commit should mention why a "workaround" is pursued here instead of a proper fix to the undo system where the crash is happening. At least the context is important to explain why this approach is taken.
Thanks for the reviews and feedback. @Sergey it was probably a branch from main or a merge with release-4.1 that went sideways,
for that I will cherry-pick the changes from this PR to a new one.
I've tried also moving the creation of the new object prior to the sculpt_paint::undo::geometry_begin and the bug persist.
Creating that new object in the middle of sculpt mode mess up with the undo.
Fix #87243: Crash after undo "Mask slice to new object"to WIP: Fix #87243: Crash after undo "Mask slice to new object"Looks simpler now, thanks.
Not sure it's worth making a new PR here. This will get squashed once it's committed anyway.
@ -463,3 +463,3 @@
View3D *v3d = CTX_wm_view3d(C);
BKE_sculpt_mask_layers_ensure(nullptr, nullptr, ob, nullptr);
bool create_new_object = RNA_boolean_get(op->ptr, "new_object");
Could you remove the change moving the fetching of RNA properties
fill_holes
andmask_threshold
from this PR? It's just more noise that makes the actual fix less obvious.I don't think is noise , it simplifies the calling and gets reused in the 2 calls later, making them shorter so the
formatter does not have to split the function into several lines.
Sure, as a cleanup it's great. But it's not a fix
@ -469,2 +473,2 @@
if (ob->mode == OB_MODE_SCULPT) {
/* Fix for https://projects.blender.org/blender/blender/issues/87243
Undo crashes when new object is created in the middle of a sculpt */
Comment style. Also, reports can be referenced like
#87243
in comments.Closing this since I made a new PR that supersedes this one:
#119443
Pull request closed