Regression: Crash when sculpting with Multires modifier #116843

Closed
opened 2024-01-06 13:21:44 +01:00 by Nika Kutsniashvili · 6 comments
Contributor

System Information
Operating system: Windows-10-10.0.19043-SP0 64 Bits
Graphics card: NVIDIA GeForce GTX 1650/PCIe/SSE2 NVIDIA Corporation 4.6.0 NVIDIA 537.42

Blender Version
Broken: version: 4.1.0 Alpha, branch: main, commit date: 2023-12-14 23:25, hash: c8aecac00131
Worked: version: 4.1.0 Alpha, branch: main, commit date: 2023-12-09 00:52, hash: 76bf43f44d0c

Short description of error
Sculpting with Multires modifier crashes Blender, every time, sometimes even before first stroke is applied. I checked and this has been the case at least since 7c423682bc1f.

Exact steps for others to reproduce the error

  1. Add UV Sphere.
  2. Go into sculpt mode.
  3. Add multires modifier with Ctrl-2.
  4. Start sculpting.
**System Information** Operating system: Windows-10-10.0.19043-SP0 64 Bits Graphics card: NVIDIA GeForce GTX 1650/PCIe/SSE2 NVIDIA Corporation 4.6.0 NVIDIA 537.42 **Blender Version** Broken: version: 4.1.0 Alpha, branch: main, commit date: 2023-12-14 23:25, hash: `c8aecac00131` Worked: version: 4.1.0 Alpha, branch: main, commit date: 2023-12-09 00:52, hash: `76bf43f44d0c` **Short description of error** Sculpting with Multires modifier crashes Blender, every time, sometimes even before first stroke is applied. I checked and this has been the case at least since `7c423682bc1f`. **Exact steps for others to reproduce the error** 1. Add UV Sphere. 2. Go into sculpt mode. 3. Add multires modifier with Ctrl-2. 4. Start sculpting.
Nika Kutsniashvili added the
Priority
Normal
Type
Report
Status
Needs Triage
labels 2024-01-06 13:21:45 +01:00
Iliya Katushenock added the
Interest
Sculpt, Paint & Texture
label 2024-01-06 14:18:06 +01:00
Hans Goudey added
Type
Bug
and removed
Type
Report
labels 2024-01-07 05:54:41 +01:00
Blender Bot added
Status
Resolved
and removed
Status
Confirmed
labels 2024-01-07 06:09:44 +01:00

I might be messing something up, but I can still reproduce this even after Hans's fix.

I might be messing something up, but I can still reproduce this even after Hans's fix.

Latest build on https://builder.blender.org/download/daily/ still older then fix.

Latest build on https://builder.blender.org/download/daily/ still older then fix.

I know, I built off of the tip of main.

image

> git log -n 7

commit 797013b7f460ea77466a41baf26c794006795f2a (HEAD, origin/main, origin/HEAD)
Author: Jacques Lucke <jacques@blender.org>
Date:   Sun Jan 7 13:49:02 2024 +0100

    Fix #116866: crash when adding volume

    This removed line is not necessary anymore since
    3b3b1bb1a75399cf25af2db65ed7fff57538dd5f.

    That's because the run-time data is not written to the
    .blend file anymore at all.

commit e983e47616e552ae93fe4010e35ab08ab5c2d8eb
Author: Jacques Lucke <jacques@blender.org>
Date:   Sun Jan 7 11:03:18 2024 +0100

    Cleanup: remove unused simplify level from volume runtime data

commit 28356d1f898aeb6971b1344828ade7083a9dac3d
Author: Clément Foucault <foucault.clem@gmail.com>
Date:   Sun Jan 7 22:46:30 2024 +1300

    Metal: Add debug names to compute pipelines

commit 8b8ca002701bae37740b6cedc8ec82c7b6bcad93
Author: Thomas Barlow <github@mysterymayhem.co.uk>
Date:   Sun Jan 7 10:22:25 2024 +0100

    Fix #107634: selecting random hair curves ignores operator settings

    There was a second randomization loop after the first loop which ignored
    the operator settings. This may have been accidentally left in from when
    the operator was being developed.

    Removing this second loop makes the operator work as expected.

    Pull Request: https://projects.blender.org/blender/blender/pulls/116835

commit 4b427e1b579725f1757e6754c45b0c29d6bde467
Author: Hans Goudey <hans@blender.org>
Date:   Sat Jan 6 23:58:14 2024 -0500

    Fix #116843: Multires sculpting crash in undo step creation

    The number of multires vertices was wrong after 31435c85c8ee873211cd.

I know, I built off of the tip of main. ![image](/attachments/ad16d11e-83fd-4f14-a0b6-326c83180908) ``` > git log -n 7 commit 797013b7f460ea77466a41baf26c794006795f2a (HEAD, origin/main, origin/HEAD) Author: Jacques Lucke <jacques@blender.org> Date: Sun Jan 7 13:49:02 2024 +0100 Fix #116866: crash when adding volume This removed line is not necessary anymore since 3b3b1bb1a75399cf25af2db65ed7fff57538dd5f. That's because the run-time data is not written to the .blend file anymore at all. commit e983e47616e552ae93fe4010e35ab08ab5c2d8eb Author: Jacques Lucke <jacques@blender.org> Date: Sun Jan 7 11:03:18 2024 +0100 Cleanup: remove unused simplify level from volume runtime data commit 28356d1f898aeb6971b1344828ade7083a9dac3d Author: Clément Foucault <foucault.clem@gmail.com> Date: Sun Jan 7 22:46:30 2024 +1300 Metal: Add debug names to compute pipelines commit 8b8ca002701bae37740b6cedc8ec82c7b6bcad93 Author: Thomas Barlow <github@mysterymayhem.co.uk> Date: Sun Jan 7 10:22:25 2024 +0100 Fix #107634: selecting random hair curves ignores operator settings There was a second randomization loop after the first loop which ignored the operator settings. This may have been accidentally left in from when the operator was being developed. Removing this second loop makes the operator work as expected. Pull Request: https://projects.blender.org/blender/blender/pulls/116835 commit 4b427e1b579725f1757e6754c45b0c29d6bde467 Author: Hans Goudey <hans@blender.org> Date: Sat Jan 6 23:58:14 2024 -0500 Fix #116843: Multires sculpting crash in undo step creation The number of multires vertices was wrong after 31435c85c8ee873211cd. ```
530 KiB
Blender Bot added
Status
Confirmed
and removed
Status
Resolved
labels 2024-01-07 18:00:45 +01:00

did some debugging, have to bail now (will continue this evening) but this is the progress I made so far

My crash happens because:

  • subdiv is null in multires_shape_util.cc (context_init_commoon)
  • it's null coming out of multires_reshape_create_subdiv
  • allocated in BKE_subdiv_new_from_converter
  • fine coming out of BKE_subdiv_new_from_mesh
  • freed as some kind of failure case because BKE_subdiv_eval_begin_from_mesh fails ...

TL:DR;
EVALUATING THE SUB-DIVISION FAILS BECAUSE subdiv->topology_refiner == nullptr,
comment there says

/* Happens on input mesh with just loose geometry,
 * or when OpenSubdiv is disabled */

could be related:

  • get_mesh_evaluator_settings says settings->num_vertex_data is 0 -- that can't be right? right? so the failure is actually in whatever causes that to happen?
  • I compiled a Lite build, maybe these don't include OpenSubdiv?
did some debugging, have to bail now (will continue this evening) but this is the progress I made so far My crash happens because: - subdiv is null in multires_shape_util.cc (context_init_commoon) - it's null coming out of multires_reshape_create_subdiv - allocated in BKE_subdiv_new_from_converter - fine coming out of BKE_subdiv_new_from_mesh - freed as some kind of failure case because BKE_subdiv_eval_begin_from_mesh fails ... TL:DR; EVALUATING THE SUB-DIVISION FAILS BECAUSE subdiv->topology_refiner == nullptr, comment there says ``` /* Happens on input mesh with just loose geometry, * or when OpenSubdiv is disabled */ ``` could be related: - get_mesh_evaluator_settings says settings->num_vertex_data is 0 -- that can't be right? right? so the failure is actually in whatever causes that to happen? - I compiled a Lite build, maybe these don't include OpenSubdiv?

The NULL originated in the OpenSubdiv stubs, so it was indeed because the Lite build wasn't including it ... doing a full build but I don't think this issue has actually persisted like I thought it did because the Lite build didn't work ... so in all likelihood I did indeed mess something up 😅

The NULL originated in the OpenSubdiv stubs, so it was indeed because the Lite build wasn't including it ... doing a full build but I don't think this issue has actually persisted like I thought it did because the Lite build didn't work ... so in all likelihood I did indeed mess something up 😅

Tested it on a non-Lite build, this is indeed fixed, sorry @mod_moder 😅 You can close this issue :)

Tested it on a non-Lite build, this is indeed fixed, sorry @mod_moder 😅 You can close this issue :)
Blender Bot added
Status
Archived
and removed
Status
Needs Triage
labels 2024-01-08 17:45:42 +01:00
Hans Goudey added
Status
Resolved
and removed
Status
Archived
labels 2024-01-08 17:49:36 +01:00
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser Project (Legacy)
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
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#116843
No description provided.