Regression: Crash upon undo in sculpt mode after a stroke with no effect #101430

Closed
opened 2022-09-28 12:37:55 +02:00 by Simon Thommes · 17 comments
Member

System Information
Operating system: Linux-5.17.15-76051715-generic-x86_64-with-glibc2.35 64 Bits
Graphics card: Quadro RTX 6000/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 515.48.07

Blender Version
Broken: version: 3.4.0 Alpha, branch: master, commit date: 2022-09-27 08:19, hash: 5f6d66c1c5
Worked: 3.3

Bisected to 02575bcbd0.

Short description of error
After a stroke is made that does not actually change the geometry, then another regular one is done, undoing multiple times causes settings to be lost and a crash.
sculpt_undo_crash-2022-09-28_12.32.59.mp4

Exact steps for others to reproduce the error

  • turn on dyntopo
  • do some strokes actually changing the geometry
  • do a stroke outside of the geometry
  • do another regular stroke on the geometry
  • undo -> dyntopo setting is off
  • undo further -> crash
**System Information** Operating system: Linux-5.17.15-76051715-generic-x86_64-with-glibc2.35 64 Bits Graphics card: Quadro RTX 6000/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 515.48.07 **Blender Version** Broken: version: 3.4.0 Alpha, branch: master, commit date: 2022-09-27 08:19, hash: `5f6d66c1c5` Worked: 3.3 Bisected to 02575bcbd0a91f499f13d15860adc3896920b9ff. **Short description of error** After a stroke is made that does not actually change the geometry, then another regular one is done, undoing multiple times causes settings to be lost and a crash. [sculpt_undo_crash-2022-09-28_12.32.59.mp4](https://archive.blender.org/developer/F13586972/sculpt_undo_crash-2022-09-28_12.32.59.mp4) **Exact steps for others to reproduce the error** - turn on dyntopo - do some strokes actually changing the geometry - do a stroke outside of the geometry - do another regular stroke on the geometry - undo -> dyntopo setting is off - undo further -> crash
Author
Member

Added subscriber: @SimonThommes

Added subscriber: @SimonThommes
Member

Added subscriber: @OmarEmaraDev

Added subscriber: @OmarEmaraDev
Member

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

Changed status from 'Needs Triage' to: 'Confirmed'
Member
* thread #1, name = 'blender', stop reason = signal SIGSEGV: invalid address (fault address: 0x0)
  * frame #0: 0x0000000000879ac6 blender`::BKE_sculpt_attribute_destroy(ob=0x0000000019306ea8, attr=0x0000000000000000) at paint.cc:2816:30
    frame #1: 0x000000000204519e blender`SCULPT_dynamic_topology_disable_ex(bmain=0x000000001e9fa898, depsgraph=0x000000001b474868, scene=0x00000000192aa048, ob=0x0000000019306ea8, unode=0x000000001ee63208) at sculpt_dyntopo.c:150:3
    frame #2: 0x000000000204513d blender`SCULPT_dynamic_topology_disable(C=0x0000000018ab67b8, unode=0x000000001ee63208) at sculpt_dyntopo.c:221:3
    frame #3: 0x000000000208f5e6 blender`sculpt_undo_bmesh_restore_begin(C=0x0000000018ab67b8, unode=0x000000001ee63208, ob=0x0000000019306ea8, ss=0x000000001e9fb558) at sculpt_undo.c:563:5
    frame #4: 0x000000000208dff6 blender`sculpt_undo_bmesh_restore(C=0x0000000018ab67b8, unode=0x000000001ee63208, ob=0x0000000019306ea8, ss=0x000000001e9fb558) at sculpt_undo.c:687:7
    frame #5: 0x000000000208d5a0 blender`sculpt_undo_restore_list(C=0x0000000018ab67b8, depsgraph=0x000000001b474868, lb=0x000000001f5efdc0) at sculpt_undo.c:797:9
    frame #6: 0x000000000208d1d1 blender`sculpt_undosys_step_decode_undo_impl(C=0x0000000018ab67b8, depsgraph=0x000000001b474868, us=0x000000001f5efd58) at sculpt_undo.c:1755:3
    frame #7: 0x000000000208cce5 blender`sculpt_undosys_step_decode_undo(C=0x0000000018ab67b8, depsgraph=0x000000001b474868, us=0x000000001f5efd58, is_final=false) at sculpt_undo.c:1788:5
    frame #8: 0x000000000208c43d blender`sculpt_undosys_step_decode(C=0x0000000018ab67b8, bmain=0x000000001e9fa898, us_p=0x000000001f5efd58, dir=STEP_UNDO, is_final=false) at sculpt_undo.c:1870:5
    frame #9: 0x0000000000a13be4 blender`undosys_step_decode(C=0x0000000018ab67b8, bmain=0x000000001e9fa898, ustack=0x000000001b48ca48, us=0x000000001f5efd58, dir=STEP_UNDO, is_final=false) at undo_system.c:200:3
    frame #10: 0x0000000000a13887 blender`BKE_undosys_step_load_data_ex(ustack=0x000000001b48ca48, C=0x0000000018ab67b8, us_target=0x000000001e560ec8, us_reference=0x000000001f5efd58, use_skip=true) at undo_system.c:780:5
    frame #11: 0x0000000000a13df6 blender`BKE_undosys_step_undo_with_data_ex(ustack=0x000000001b48ca48, C=0x0000000018ab67b8, us_target=0x000000001e560ec8, use_skip=true) at undo_system.c:826:10
    frame #12: 0x0000000000a13e3a blender`BKE_undosys_step_undo_with_data(ustack=0x000000001b48ca48, C=0x0000000018ab67b8, us_target=0x000000001e560ec8) at undo_system.c:831:10
    frame #13: 0x0000000000a13e88 blender`BKE_undosys_step_undo(ustack=0x000000001b48ca48, C=0x0000000018ab67b8) at undo_system.c:837:12
    frame #14: 0x0000000002146723 blender`ed_undo_step_direction(C=0x0000000018ab67b8, step=STEP_UNDO, reports=0x000000001ed56ad8) at ed_undo.c:287:5
    frame #15: 0x0000000002146fa7 blender`ed_undo_exec(C=0x0000000018ab67b8, op=0x00000000204cac78) at ed_undo.c:507:13
    frame #16: 0x0000000000a57a19 blender`wm_operator_invoke(C=0x0000000018ab67b8, ot=0x0000000019075398, event=0x000000001f69fcb8, properties=0x000000001b71fb68, reports=0x0000000000000000, poll_only=false, use_last_properties=true) at wm_event_system.cc:1454:16
    frame #17: 0x0000000000a5a85a blender`wm_handler_operator_call(C=0x0000000018ab67b8, handlers=0x0000000019275f70, handler_base=0x0000000019921068, event=0x000000001f69fcb8, properties=0x000000001b71fb68, kmi_idname="ED_OT_undo") at wm_event_system.cc:2477:16
    frame #18: 0x0000000000a59267 blender`wm_handlers_do_keymap_with_keymap_handler(C=0x0000000018ab67b8, event=0x000000001f69fcb8, handlers=0x0000000019275f70, handler=0x0000000019921068, keymap=0x000000001a4ae4a8, do_debug_handler=false) at wm_event_system.cc:2869:21
    frame #19: 0x0000000000a588c5 blender`wm_handlers_do_intern(C=0x0000000018ab67b8, win=0x0000000019275e68, event=0x000000001f69fcb8, handlers=0x0000000019275f70) at wm_event_system.cc:3195:26
    frame #20: 0x0000000000a511dc blender`wm_handlers_do(C=0x0000000018ab67b8, event=0x000000001f69fcb8, handlers=0x0000000019275f70) at wm_event_system.cc:3462:19
    frame #21: 0x0000000000a4fd38 blender`::wm_event_do_handlers(C=0x0000000018ab67b8) at wm_event_system.cc:4006:21
    frame #22: 0x0000000000a41a87 blender`WM_main(C=0x0000000018ab67b8) at wm.c:640:5
    frame #23: 0x0000000000230ee9 blender`main(argc=1, argv=0x00007fffffffe9e8) at creator.c:575:5
    frame #24: 0x00007ffff7de9290 libc.so.6`___lldb_unnamed_symbol3142 + 128
    frame #25: 0x00007ffff7de934a libc.so.6`__libc_start_main + 138
    frame #26: 0x0000000000230aa5 blender`_start at start.S:115
``` * thread #1, name = 'blender', stop reason = signal SIGSEGV: invalid address (fault address: 0x0) * frame #0: 0x0000000000879ac6 blender`::BKE_sculpt_attribute_destroy(ob=0x0000000019306ea8, attr=0x0000000000000000) at paint.cc:2816:30 frame #1: 0x000000000204519e blender`SCULPT_dynamic_topology_disable_ex(bmain=0x000000001e9fa898, depsgraph=0x000000001b474868, scene=0x00000000192aa048, ob=0x0000000019306ea8, unode=0x000000001ee63208) at sculpt_dyntopo.c:150:3 frame #2: 0x000000000204513d blender`SCULPT_dynamic_topology_disable(C=0x0000000018ab67b8, unode=0x000000001ee63208) at sculpt_dyntopo.c:221:3 frame #3: 0x000000000208f5e6 blender`sculpt_undo_bmesh_restore_begin(C=0x0000000018ab67b8, unode=0x000000001ee63208, ob=0x0000000019306ea8, ss=0x000000001e9fb558) at sculpt_undo.c:563:5 frame #4: 0x000000000208dff6 blender`sculpt_undo_bmesh_restore(C=0x0000000018ab67b8, unode=0x000000001ee63208, ob=0x0000000019306ea8, ss=0x000000001e9fb558) at sculpt_undo.c:687:7 frame #5: 0x000000000208d5a0 blender`sculpt_undo_restore_list(C=0x0000000018ab67b8, depsgraph=0x000000001b474868, lb=0x000000001f5efdc0) at sculpt_undo.c:797:9 frame #6: 0x000000000208d1d1 blender`sculpt_undosys_step_decode_undo_impl(C=0x0000000018ab67b8, depsgraph=0x000000001b474868, us=0x000000001f5efd58) at sculpt_undo.c:1755:3 frame #7: 0x000000000208cce5 blender`sculpt_undosys_step_decode_undo(C=0x0000000018ab67b8, depsgraph=0x000000001b474868, us=0x000000001f5efd58, is_final=false) at sculpt_undo.c:1788:5 frame #8: 0x000000000208c43d blender`sculpt_undosys_step_decode(C=0x0000000018ab67b8, bmain=0x000000001e9fa898, us_p=0x000000001f5efd58, dir=STEP_UNDO, is_final=false) at sculpt_undo.c:1870:5 frame #9: 0x0000000000a13be4 blender`undosys_step_decode(C=0x0000000018ab67b8, bmain=0x000000001e9fa898, ustack=0x000000001b48ca48, us=0x000000001f5efd58, dir=STEP_UNDO, is_final=false) at undo_system.c:200:3 frame #10: 0x0000000000a13887 blender`BKE_undosys_step_load_data_ex(ustack=0x000000001b48ca48, C=0x0000000018ab67b8, us_target=0x000000001e560ec8, us_reference=0x000000001f5efd58, use_skip=true) at undo_system.c:780:5 frame #11: 0x0000000000a13df6 blender`BKE_undosys_step_undo_with_data_ex(ustack=0x000000001b48ca48, C=0x0000000018ab67b8, us_target=0x000000001e560ec8, use_skip=true) at undo_system.c:826:10 frame #12: 0x0000000000a13e3a blender`BKE_undosys_step_undo_with_data(ustack=0x000000001b48ca48, C=0x0000000018ab67b8, us_target=0x000000001e560ec8) at undo_system.c:831:10 frame #13: 0x0000000000a13e88 blender`BKE_undosys_step_undo(ustack=0x000000001b48ca48, C=0x0000000018ab67b8) at undo_system.c:837:12 frame #14: 0x0000000002146723 blender`ed_undo_step_direction(C=0x0000000018ab67b8, step=STEP_UNDO, reports=0x000000001ed56ad8) at ed_undo.c:287:5 frame #15: 0x0000000002146fa7 blender`ed_undo_exec(C=0x0000000018ab67b8, op=0x00000000204cac78) at ed_undo.c:507:13 frame #16: 0x0000000000a57a19 blender`wm_operator_invoke(C=0x0000000018ab67b8, ot=0x0000000019075398, event=0x000000001f69fcb8, properties=0x000000001b71fb68, reports=0x0000000000000000, poll_only=false, use_last_properties=true) at wm_event_system.cc:1454:16 frame #17: 0x0000000000a5a85a blender`wm_handler_operator_call(C=0x0000000018ab67b8, handlers=0x0000000019275f70, handler_base=0x0000000019921068, event=0x000000001f69fcb8, properties=0x000000001b71fb68, kmi_idname="ED_OT_undo") at wm_event_system.cc:2477:16 frame #18: 0x0000000000a59267 blender`wm_handlers_do_keymap_with_keymap_handler(C=0x0000000018ab67b8, event=0x000000001f69fcb8, handlers=0x0000000019275f70, handler=0x0000000019921068, keymap=0x000000001a4ae4a8, do_debug_handler=false) at wm_event_system.cc:2869:21 frame #19: 0x0000000000a588c5 blender`wm_handlers_do_intern(C=0x0000000018ab67b8, win=0x0000000019275e68, event=0x000000001f69fcb8, handlers=0x0000000019275f70) at wm_event_system.cc:3195:26 frame #20: 0x0000000000a511dc blender`wm_handlers_do(C=0x0000000018ab67b8, event=0x000000001f69fcb8, handlers=0x0000000019275f70) at wm_event_system.cc:3462:19 frame #21: 0x0000000000a4fd38 blender`::wm_event_do_handlers(C=0x0000000018ab67b8) at wm_event_system.cc:4006:21 frame #22: 0x0000000000a41a87 blender`WM_main(C=0x0000000018ab67b8) at wm.c:640:5 frame #23: 0x0000000000230ee9 blender`main(argc=1, argv=0x00007fffffffe9e8) at creator.c:575:5 frame #24: 0x00007ffff7de9290 libc.so.6`___lldb_unnamed_symbol3142 + 128 frame #25: 0x00007ffff7de934a libc.so.6`__libc_start_main + 138 frame #26: 0x0000000000230aa5 blender`_start at start.S:115 ```
Omar Emara changed title from Crash with undo in sculpt mode to Regression: Crash upon undo in sculpt mode after a stroke with no effect 2022-09-28 13:55:03 +02:00
Member

Doesn't happen in 3.3, so looks like a regression. Let me know if you want me to bisect.

Doesn't happen in 3.3, so looks like a regression. Let me know if you want me to bisect.

Added subscriber: @TheRedWaxPolice

Added subscriber: @TheRedWaxPolice
Member

Added subscribers: @JosephEagar, @JulienKaspar

Added subscribers: @JosephEagar, @JulienKaspar
Member

@OmarEmaraDev Bisecting would be good.
@JosephEagar Can you take a look at this?

@OmarEmaraDev Bisecting would be good. @JosephEagar Can you take a look at this?
Member

Okay, will bisect.

Okay, will bisect.
Member

Crash bisected to 02575bcbd0.

Crash bisected to 02575bcbd0a91f499f13d15860adc3896920b9ff.
Member

Changed status from 'Confirmed' to: 'Resolved'

Changed status from 'Confirmed' to: 'Resolved'
Joseph Eagar self-assigned this 2022-09-30 23:57:20 +02:00

This issue was referenced by 6b9f45c1d1

This issue was referenced by 6b9f45c1d1bfafffe6fe251ac7330bc5e5ba8ec2
Member

Changed status from 'Resolved' to: 'Confirmed'

Changed status from 'Resolved' to: 'Confirmed'
Member

@JosephEagar I can still reproduce this bug in the latest master. Please check again and commit another fix.

@JosephEagar I can still reproduce this bug in the latest master. Please check again and commit another fix.

This issue was referenced by ed7f5713f8

This issue was referenced by ed7f5713f8f9d605e3cd4cce42e40fb5c6bf4bf5
Member

Okay this should finally be fixed.

Okay this should finally be fixed.
Member

Changed status from 'Confirmed' to: 'Resolved'

Changed status from 'Confirmed' to: 'Resolved'
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
6 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#101430
No description provided.