Switching to Sculpt mode crashes Blender #106358

Closed
opened 2023-03-31 06:52:20 +02:00 by Shady Hamza · 5 comments

System Information
Operating system: Windows-10-10.0.22621-SP0 64 Bits
Graphics card: GeForce RTX 2060 SUPER/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 456.71

Blender Version
Broken: version: 3.6.0 Alpha, branch: main, commit date: 2023-03-31 02:03, hash: cde99075e870
Worked: (newest version of Blender that worked as expected)

Short description of error
Switching to sculpt mode from upper tab when scene is empty or there are hidden objects crashes blender.

Exact steps for others to reproduce the error

  • Using provided file, switch to "Sculpting" tab from the top tab bar. Blender crashes.
**System Information** Operating system: Windows-10-10.0.22621-SP0 64 Bits Graphics card: GeForce RTX 2060 SUPER/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 456.71 **Blender Version** Broken: version: 3.6.0 Alpha, branch: main, commit date: 2023-03-31 02:03, hash: `cde99075e870` Worked: (newest version of Blender that worked as expected) **Short description of error** Switching to sculpt mode from upper tab when scene is empty or there are hidden objects crashes blender. **Exact steps for others to reproduce the error** - Using provided file, switch to "Sculpting" tab from the top tab bar. Blender crashes.
Shady Hamza added the
Priority
Normal
Type
Report
Status
Needs Triage
labels 2023-03-31 06:52:21 +02:00
Member

Can confirm the crash using provided Test.blend, however can't reproduce this issue with a newly created empty scene or hidden objects.

Can confirm the crash using provided `Test.blend`, however can't reproduce this issue with a newly created empty scene or hidden objects.
Iliya Katushenock added the
Interest
Sculpt, Paint & Texture
label 2023-03-31 08:38:09 +02:00
Member

This is caused by a newly opened file with no objects enabled/visible, causing me_eval==NULL when calling sculpt_update_object(). See source/blender/blenkernel/intern/paint.cc line 1674.

There's an assert there already by 9823a8f72b by @angavrilov , but apparently it needs another early return to avoid this crash because we can't really control whatever setup that's already in the file.

This is caused by a newly opened file with no objects enabled/visible, causing `me_eval==NULL` when calling `sculpt_update_object()`. See `source/blender/blenkernel/intern/paint.cc` line 1674. There's an assert there already by 9823a8f72be8 by @angavrilov , but apparently it needs another early return to avoid this crash because we can't really control whatever setup that's already in the file.
YimingWu added
Status
Confirmed
and removed
Status
Needs Triage
labels 2023-03-31 11:04:58 +02:00

That assert was simply moved into the function from its two call sites (both did the same call to BKE_object_get_evaluated_mesh(ob_eval)), so I don't think my change actually affected anything. Switching to sculpt mode also should not enter the meaningful part of the code added by my commit either, since that's for painting.

That assert was simply moved into the function from its two call sites (both did the same call to `BKE_object_get_evaluated_mesh(ob_eval)`), so I don't think my change actually affected anything. Switching to sculpt mode also should not enter the meaningful part of the code added by my commit either, since that's for painting.
Member

Alright. I guess it's not related. I'll make it into an early return and see if it works in this kind of situation. Thanks!

Alright. I guess it's not related. I'll make it into an early return and see if it works in this kind of situation. Thanks!
Member

#106371 is an attempt to fix this. Probably need developers who's more familiar with the sculpting part to tell whether this fix is appropriate or not. Tested to work correctly with the Test file in this issue.

#106371 is an attempt to fix this. Probably need developers who's more familiar with the sculpting part to tell whether this fix is appropriate or not. Tested to work correctly with the `Test` file in this issue.
Blender Bot added
Status
Resolved
and removed
Status
Confirmed
labels 2023-04-17 00:14:34 +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#106358
No description provided.