Regression: Multires: Enabling "Sculpt Base Mesh" after using transform tools crashes Blender #107092

Closed
opened 2023-04-18 17:39:10 +02:00 by Julien Kaspar · 6 comments
Member

System Information
Operating system: Linux-6.2.11-gentoo-x86_64-AMD_Ryzen_Threadripper_1950X_16-Core_Processor-with-glibc2.36 64 Bits, X11 UI
Graphics card: Quadro GP100/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 530.41.03

Blender Version
Broken: version: 3.6.0 Alpha, branch: main, commit date: 2023-04-18 15:15, hash: 5bb3a3f1575d

Caused by b86fc55d30

Short description of error
When using any transform tool or operator in sculpt mode and afterwards toggling on the "Sculpt Base Mesh" feature in the Multiresolution panel, Blender crashes.

Exact steps for others to reproduce the error

  • Add a cube
  • Add a Multires modifier and subdivide
  • Enter Sculpt Mode
  • Use the Move Tool
  • Enable "Sculpt Base Mesh" in the Multires modifier
**System Information** Operating system: Linux-6.2.11-gentoo-x86_64-AMD_Ryzen_Threadripper_1950X_16-Core_Processor-with-glibc2.36 64 Bits, X11 UI Graphics card: Quadro GP100/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 530.41.03 **Blender Version** Broken: version: 3.6.0 Alpha, branch: main, commit date: 2023-04-18 15:15, hash: `5bb3a3f1575d` Caused by b86fc55d30054d454c2d3c8bf0f91fdfbb5d0a29 **Short description of error** When using any transform tool or operator in sculpt mode and afterwards toggling on the "Sculpt Base Mesh" feature in the Multiresolution panel, Blender crashes. **Exact steps for others to reproduce the error** - Add a cube - Add a Multires modifier and subdivide - Enter Sculpt Mode - Use the Move Tool - Enable "Sculpt Base Mesh" in the Multires modifier
Julien Kaspar added the
Priority
Normal
Type
Report
Status
Needs Triage
labels 2023-04-18 17:39:11 +02:00
Author
Member

Actually, the crash can also be caused by just toggling the visibility of the Multires modifier instead of this specific option.

Actually, the crash can also be caused by just toggling the visibility of the Multires modifier instead of this specific option.
Iliya Katushenock added the
Interest
Sculpt, Paint & Texture
label 2023-04-18 19:34:43 +02:00

The 2 crashes are actually separate issues.

Toggling "Sculpt Base Mesh" triggers an assert:

BLI_assert failed: source/blender/blenkernel/intern/pbvh.cc:3207, BKE_pbvh_vert_coords_apply(), at '0'
  PBVH: Given deforming vcos number does not match PBVH vertex number!

Toggling the visibility causes a use-after-free memory error:

==7462==ERROR: AddressSanitizer: heap-use-after-free on address 0x61100134ec08 at pc 0x0000014fadf8 bp 0x7ffe48693fa0 sp 0x7ffe48693f90
READ of size 8 at 0x61100134ec08 thread T0
    #0 0x14fadf7 in BKE_pbvh_get_grid_updates /home/deadpin/source/blender-git/blender/source/blender/blenkernel/intern/pbvh.cc:1974
    #1 0x150927f in BKE_pbvh_update_normals /home/deadpin/source/blender-git/blender/source/blender/blenkernel/intern/pbvh.cc:3047
    #2 0x4e0cf6e in drw_sculpt_generate_calls /home/deadpin/source/blender-git/blender/source/blender/draw/intern/draw_manager_data.cc:1361

0x61100134ec08 is located 8 bytes inside of 200-byte region [0x61100134ec00,0x61100134ecc8)
freed by thread T40 here:
    #0 0x7f03a0e25517 in __interceptor_free ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:127
    #1 0x1d4e45bc in MEM_lockfree_freeN /home/deadpin/source/blender-git/blender/intern/guardedalloc/intern/mallocn_lockfree_impl.c:102
    #2 0x17e3dea in BKE_subdiv_ccg_destroy /home/deadpin/source/blender-git/blender/source/blender/blenkernel/intern/subdiv_ccg.cc:640
    #3 0x110ca32 in free_subdiv_ccg /home/deadpin/source/blender-git/blender/source/blender/blenkernel/intern/mesh_runtime.cc:68
    #4 0x110fb73 in BKE_mesh_runtime_clear_geometry /home/deadpin/source/blender-git/blender/source/blender/blenkernel/intern/mesh_runtime.cc:219
The 2 crashes are actually separate issues. Toggling "Sculpt Base Mesh" triggers an assert: ``` BLI_assert failed: source/blender/blenkernel/intern/pbvh.cc:3207, BKE_pbvh_vert_coords_apply(), at '0' PBVH: Given deforming vcos number does not match PBVH vertex number! ``` Toggling the visibility causes a use-after-free memory error: ``` ==7462==ERROR: AddressSanitizer: heap-use-after-free on address 0x61100134ec08 at pc 0x0000014fadf8 bp 0x7ffe48693fa0 sp 0x7ffe48693f90 READ of size 8 at 0x61100134ec08 thread T0 #0 0x14fadf7 in BKE_pbvh_get_grid_updates /home/deadpin/source/blender-git/blender/source/blender/blenkernel/intern/pbvh.cc:1974 #1 0x150927f in BKE_pbvh_update_normals /home/deadpin/source/blender-git/blender/source/blender/blenkernel/intern/pbvh.cc:3047 #2 0x4e0cf6e in drw_sculpt_generate_calls /home/deadpin/source/blender-git/blender/source/blender/draw/intern/draw_manager_data.cc:1361 0x61100134ec08 is located 8 bytes inside of 200-byte region [0x61100134ec00,0x61100134ecc8) freed by thread T40 here: #0 0x7f03a0e25517 in __interceptor_free ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:127 #1 0x1d4e45bc in MEM_lockfree_freeN /home/deadpin/source/blender-git/blender/intern/guardedalloc/intern/mallocn_lockfree_impl.c:102 #2 0x17e3dea in BKE_subdiv_ccg_destroy /home/deadpin/source/blender-git/blender/source/blender/blenkernel/intern/subdiv_ccg.cc:640 #3 0x110ca32 in free_subdiv_ccg /home/deadpin/source/blender-git/blender/source/blender/blenkernel/intern/mesh_runtime.cc:68 #4 0x110fb73 in BKE_mesh_runtime_clear_geometry /home/deadpin/source/blender-git/blender/source/blender/blenkernel/intern/mesh_runtime.cc:219 ```
Jesse Yurkovich added
Status
Confirmed
and removed
Status
Needs Triage
labels 2023-04-18 21:40:16 +02:00
Member

Similar to #107068 (I assume) this seems to be a recent regression.

Will try my luck bisecting again

Similar to #107068 (I assume) this seems to be a recent regression. Will try my luck bisecting again
Member

Caused by b86fc55d30

CC @JosephEagar

Caused by b86fc55d30054d454c2d3c8bf0f91fdfbb5d0a29 CC @JosephEagar
Philipp Oeser changed title from Multires: Enabling "Sculpt Base Mesh" after using transform tools crashes Blender to Regression: Multires: Enabling "Sculpt Base Mesh" after using transform tools crashes Blender 2023-04-19 10:07:13 +02:00
Author
Member

@lichtwerk Are both the above mentioned crashes caused by that commit?

@lichtwerk Are both the above mentioned crashes caused by that commit?
Member

I followed the repro steps, so enable "Sculpt Base Mesh" is what I bisected

I followed the repro steps, so enable "Sculpt Base Mesh" is what I bisected
Julien Kaspar added
Type
Bug
and removed
Type
Report
labels 2023-04-24 14:47:56 +02:00
Blender Bot added
Status
Resolved
and removed
Status
Confirmed
labels 2023-04-24 21:20:13 +02:00
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
3 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#107092
No description provided.