Regression: Sculpting on a linked copy of an objects crashes Blender #98889

Closed
opened 2022-06-14 18:25:08 +02:00 by Steffen Hartmann · 35 comments

System Information
Operating system: Windows-10-10.0.19044-SP0 64 Bits
Graphics card: NVIDIA GeForce RTX 3060/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 512.96

Blender Version
Broken: version: 3.2.0, branch: master, commit date: 2022-06-08 10:22, hash: e05e1e3691
Worked: 3.2 alpha and mabye betas

This apparently started with eae36be372

Short description of error
Sculpting on a linked copy of an objects crashes Blender

Exact steps for others to reproduce the error

  • Open Blender
  • Create duplicate linked of default cube: {key Alt D}
  • In sculpt mode draw with brush on linked copy OR
  • switch to wireframe viewport shading mode and just enter sculptmode

(No crash when i sculpt on the original Object though.)

NVIDIA_Share_nm7AkRc7Ad.mp4

**System Information** Operating system: Windows-10-10.0.19044-SP0 64 Bits Graphics card: NVIDIA GeForce RTX 3060/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 512.96 **Blender Version** Broken: version: 3.2.0, branch: master, commit date: 2022-06-08 10:22, hash: `e05e1e3691` Worked: 3.2 alpha and mabye betas This apparently started with eae36be372 **Short description of error** Sculpting on a linked copy of an objects crashes Blender **Exact steps for others to reproduce the error** - Open Blender - Create duplicate linked of default cube: {key Alt D} - In sculpt mode draw with brush on linked copy OR - switch to wireframe viewport shading mode and just enter sculptmode (No crash when i sculpt on the original Object though.) [NVIDIA_Share_nm7AkRc7Ad.mp4](https://archive.blender.org/developer/F13202250/NVIDIA_Share_nm7AkRc7Ad.mp4)

Added subscriber: @Harti

Added subscriber: @Harti

#100840 was marked as duplicate of this issue

#100840 was marked as duplicate of this issue

#98983 was marked as duplicate of this issue

#98983 was marked as duplicate of this issue
Member

Added subscriber: @JosephEagar

Added subscriber: @JosephEagar
Member

Looks like this is being caused by objects in sculpt mode not being assigned their own runtime mesh instance?

Looks like this is being caused by objects in sculpt mode not being assigned their own runtime mesh instance?
Member

Added subscriber: @PratikPB2123

Added subscriber: @PratikPB2123
Member

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

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

Hi, thanks for reporting. I can replicate the crash.
Will bisect just in case if that's needed

Hi, thanks for reporting. I can replicate the crash. Will bisect just in case if that's needed
Pratik Borhade changed title from Sculpting on a linked copy of an objects crashes Blender to Regression: Sculpting on a linked copy of an objects crashes Blender 2022-06-15 06:06:13 +02:00
Member

I'm not able to confirm crash in buildbot builds (3.2, 3.3)
Can redo only in lite build

blender.exe         :0x00007FF62F27DA90  GPU_batch_draw_advanced C:\Users\Pratik\Desktop\BlenderOSP\blender\source\blender\gpu\intern\gpu_batch.cc:252
blender.exe         :0x00007FF62E8740F0  draw_call_single_do C:\Users\Pratik\Desktop\BlenderOSP\blender\source\blender\draw\intern\draw_manager_exec.c:868
blender.exe         :0x00007FF62E874570  draw_shgroup C:\Users\Pratik\Desktop\BlenderOSP\blender\source\blender\draw\intern\draw_manager_exec.c:996
blender.exe         :0x00007FF62E873970  DRW_draw_pass C:\Users\Pratik\Desktop\BlenderOSP\blender\source\blender\draw\intern\draw_manager_exec.c:1217
blender.exe         :0x00007FF62E891CD0  workbench_draw_sample C:\Users\Pratik\Desktop\BlenderOSP\blender\source\blender\draw\engines\workbench\workbench_engine.c:542
blender.exe         :0x00007FF62E891250  workbench_draw_scene C:\Users\Pratik\Desktop\BlenderOSP\blender\source\blender\draw\engines\workbench\workbench_engine.c:618
blender.exe         :0x00007FF62E854F40  drw_engines_draw_scene C:\Users\Pratik\Desktop\BlenderOSP\blender\source\blender\draw\intern\draw_manager.c:1094
blender.exe         :0x00007FF62E851620  DRW_draw_render_loop_ex C:\Users\Pratik\Desktop\BlenderOSP\blender\source\blender\draw\intern\draw_manager.c:1717
blender.exe         :0x00007FF62E852710  DRW_draw_view C:\Users\Pratik\Desktop\BlenderOSP\blender\source\blender\draw\intern\draw_manager.c:1593
blender.exe         :0x00007FF62EF87BE0  view3d_main_region_draw C:\Users\Pratik\Desktop\BlenderOSP\blender\source\blender\editors\space_view3d\view3d_draw.c:1564
blender.exe         :0x00007FF62E3D9690  ED_region_do_draw C:\Users\Pratik\Desktop\BlenderOSP\blender\source\blender\editors\screen\area.c:547
blender.exe         :0x00007FF62E3C0230  wm_draw_window_offscreen C:\Users\Pratik\Desktop\BlenderOSP\blender\source\blender\windowmanager\intern\wm_draw.c:853
blender.exe         :0x00007FF62E3C0080  wm_draw_window C:\Users\Pratik\Desktop\BlenderOSP\blender\source\blender\windowmanager\intern\wm_draw.c:1020
blender.exe         :0x00007FF62E3BFB20  wm_draw_update C:\Users\Pratik\Desktop\BlenderOSP\blender\source\blender\windowmanager\intern\wm_draw.c:1231
blender.exe         :0x00007FF62E399A90  WM_main C:\Users\Pratik\Desktop\BlenderOSP\blender\source\blender\windowmanager\intern\wm.c:630
blender.exe         :0x00007FF62E395210  main C:\Users\Pratik\Desktop\BlenderOSP\blender\source\creator\creator.c:552
blender.exe         :0x00007FF62F5457F4  __scrt_common_main_seh d:\a01\_work\12\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:288
KERNEL32.DLL        :0x00007FFEEFC27020  BaseThreadInitThunk
ntdll.dll           :0x00007FFEF0142630  RtlUserThreadStart
I'm not able to confirm crash in buildbot builds (3.2, 3.3) Can redo only in lite build ```lines=10 blender.exe :0x00007FF62F27DA90 GPU_batch_draw_advanced C:\Users\Pratik\Desktop\BlenderOSP\blender\source\blender\gpu\intern\gpu_batch.cc:252 blender.exe :0x00007FF62E8740F0 draw_call_single_do C:\Users\Pratik\Desktop\BlenderOSP\blender\source\blender\draw\intern\draw_manager_exec.c:868 blender.exe :0x00007FF62E874570 draw_shgroup C:\Users\Pratik\Desktop\BlenderOSP\blender\source\blender\draw\intern\draw_manager_exec.c:996 blender.exe :0x00007FF62E873970 DRW_draw_pass C:\Users\Pratik\Desktop\BlenderOSP\blender\source\blender\draw\intern\draw_manager_exec.c:1217 blender.exe :0x00007FF62E891CD0 workbench_draw_sample C:\Users\Pratik\Desktop\BlenderOSP\blender\source\blender\draw\engines\workbench\workbench_engine.c:542 blender.exe :0x00007FF62E891250 workbench_draw_scene C:\Users\Pratik\Desktop\BlenderOSP\blender\source\blender\draw\engines\workbench\workbench_engine.c:618 blender.exe :0x00007FF62E854F40 drw_engines_draw_scene C:\Users\Pratik\Desktop\BlenderOSP\blender\source\blender\draw\intern\draw_manager.c:1094 blender.exe :0x00007FF62E851620 DRW_draw_render_loop_ex C:\Users\Pratik\Desktop\BlenderOSP\blender\source\blender\draw\intern\draw_manager.c:1717 blender.exe :0x00007FF62E852710 DRW_draw_view C:\Users\Pratik\Desktop\BlenderOSP\blender\source\blender\draw\intern\draw_manager.c:1593 blender.exe :0x00007FF62EF87BE0 view3d_main_region_draw C:\Users\Pratik\Desktop\BlenderOSP\blender\source\blender\editors\space_view3d\view3d_draw.c:1564 blender.exe :0x00007FF62E3D9690 ED_region_do_draw C:\Users\Pratik\Desktop\BlenderOSP\blender\source\blender\editors\screen\area.c:547 blender.exe :0x00007FF62E3C0230 wm_draw_window_offscreen C:\Users\Pratik\Desktop\BlenderOSP\blender\source\blender\windowmanager\intern\wm_draw.c:853 blender.exe :0x00007FF62E3C0080 wm_draw_window C:\Users\Pratik\Desktop\BlenderOSP\blender\source\blender\windowmanager\intern\wm_draw.c:1020 blender.exe :0x00007FF62E3BFB20 wm_draw_update C:\Users\Pratik\Desktop\BlenderOSP\blender\source\blender\windowmanager\intern\wm_draw.c:1231 blender.exe :0x00007FF62E399A90 WM_main C:\Users\Pratik\Desktop\BlenderOSP\blender\source\blender\windowmanager\intern\wm.c:630 blender.exe :0x00007FF62E395210 main C:\Users\Pratik\Desktop\BlenderOSP\blender\source\creator\creator.c:552 blender.exe :0x00007FF62F5457F4 __scrt_common_main_seh d:\a01\_work\12\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:288 KERNEL32.DLL :0x00007FFEEFC27020 BaseThreadInitThunk ntdll.dll :0x00007FFEF0142630 RtlUserThreadStart ```

Added subscriber: @Baardaap

Added subscriber: @Baardaap

Can't replicate in 3.2.0 release. Maybe it's an assert, which only fires in debug mode?

Can't replicate in 3.2.0 release. Maybe it's an assert, which only fires in debug mode?

Can't replicate in a debug build (current master, 3.3 alpha, linux) either.

Can't replicate in a debug build (current master, 3.3 alpha, linux) either.
Member

@Baardaap, thanks for checking :)
No, not an assert hit. It's a crash which I can repro in lite debug build and also in lite ninja build

@Baardaap, thanks for checking :) No, not an assert hit. It's a crash which I can repro in lite debug build and also in lite ninja build
Member

Added subscriber: @Floatharr

Added subscriber: @Floatharr
Member

What's happening is that, during the draw cache build:

  1. First linked duplicated builds a batch and inserts it into the draw cache.
  2. Second duplicate that's in sculpt mode frees the batch built in step 1.
  3. Since the batch is still in the draw cache the result is a crash.

If you put a breakpoint in DRW_mesh_batch_cache_validate you'll
see it clear the cache twice for the same me pointer when entering
sculpt mode.

What's happening is that, during the draw cache build: 1. First linked duplicated builds a batch and inserts it into the draw cache. 2. Second duplicate that's in sculpt mode frees the batch built in step 1. 3. Since the batch is still in the draw cache the result is a crash. If you put a breakpoint in `DRW_mesh_batch_cache_validate` you'll see it clear the cache twice for the same `me` pointer when entering sculpt mode.
Member

Added subscriber: @lichtwerk

Added subscriber: @lichtwerk
Member

Can also repro in master buildbot build (if you set viewport shading mode to wireframe).
This apparently started with eae36be372

Can also repro in master buildbot build (if you set viewport shading mode to wireframe). This apparently started with eae36be372

Added subscriber: @ThomasDinges

Added subscriber: @ThomasDinges

Blender 3.2.1 is scheduled for release soon. Any chance to fix this still? @JosephEagar

Blender 3.2.1 is scheduled for release soon. Any chance to fix this still? @JosephEagar
Member

I need someone from the viewport module to look at this. The sculpt object needs to always been its own independent part of the draw cache apart from any other objects that use the same underlying Mesh block.

I need someone from the viewport module to look at this. The sculpt object needs to always been its own independent part of the draw cache apart from any other objects that use the same underlying Mesh block.

Removed subscriber: @Baardaap

Removed subscriber: @Baardaap

Added subscriber: @holonet

Added subscriber: @holonet

I have a slightly different trigger for this crash. Here's info:

System Information
Operating system: Windows-10-10.0.19044-SP0 64 Bits
Graphics card: NVIDIA GeForce RTX 3060/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 512.15

Blender Version
Broken: version: 3.2.2, branch: master, commit date: 2022-08-02 18:15, hash: bcfdb14560
Worked: (newest version of Blender that worked as expected)

So, in my case, I created 2 linked duplicates of the object. One of them, I made a change to (scaled). If I have that scaled-down duplicate selected, and then click the Sculpting workflow/tab, Blender crashes right away, before I would even try to sculpt on it. I noticed that, when playing around, if I clicked the linked dupe that I did not alter, it sometimes crashes...but the smaller dupe always crashes. I'm attaching the .blend file & the log file.LinkedDupeCrash.blend

LinkedDupe_SculptingCrash.crash.txt

I have a slightly different trigger for this crash. Here's info: **System Information** Operating system: Windows-10-10.0.19044-SP0 64 Bits Graphics card: NVIDIA GeForce RTX 3060/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 512.15 **Blender Version** Broken: version: 3.2.2, branch: master, commit date: 2022-08-02 18:15, hash: `bcfdb14560` Worked: (newest version of Blender that worked as expected) So, in my case, I created 2 linked duplicates of the object. One of them, I made a change to (scaled). If I have that scaled-down duplicate selected, and then click the Sculpting workflow/tab, Blender crashes right away, before I would even try to sculpt on it. I noticed that, when playing around, if I clicked the linked dupe that I did *not* alter, it *sometimes* crashes...but the smaller dupe always crashes. I'm attaching the .blend file & the log file.[LinkedDupeCrash.blend](https://archive.blender.org/developer/F13418073/LinkedDupeCrash.blend) [LinkedDupe_SculptingCrash.crash.txt](https://archive.blender.org/developer/F13418076/LinkedDupe_SculptingCrash.crash.txt)

Added subscribers: @TonatiuhdeSanJulian, @mano-wii

Added subscribers: @TonatiuhdeSanJulian, @mano-wii

Added subscriber: @TheRedWaxPolice

Added subscriber: @TheRedWaxPolice

Don't know why but that bug (crash) is somewhat gone in my latest personal project. 2022-10-12 11-21-55.mp4
I get some weird blinking when sculpting on linked duplicates but not a crash.

When i copy the linked objects to a fresh file, Blender is crashing once i switch to sculpt mode.

edit: I deleted all other objects and isolated the linked objects. Test for yourself. no crash.blend
Feel free to also copy the objects to a fesh Blender project and see if you get an instant crash like me.

Don't know why but that bug (crash) is somewhat gone in my latest personal project. [2022-10-12 11-21-55.mp4](https://archive.blender.org/developer/F13665986/2022-10-12_11-21-55.mp4) I get some weird blinking when sculpting on linked duplicates but not a crash. When i copy the linked objects to a fresh file, Blender is crashing once i switch to sculpt mode. edit: I deleted all other objects and isolated the linked objects. Test for yourself. [no crash.blend](https://archive.blender.org/developer/F13666038/no_crash.blend) Feel free to also copy the objects to a fesh Blender project and see if you get an instant crash like me.
Member

Added subscriber: @JulienKaspar

Added subscriber: @JulienKaspar
Member

I can still reproduce the crash on Linux with the no_crash.blend file and there are still viewport flickering issues in general.

I can still reproduce the crash on Linux with the `no_crash.blend` file and there are still viewport flickering issues in general.

The bug (crash and blinking) seems to be fixed in latest 3.4 alphas. Can someone else confirm this?

The bug (crash and blinking) seems to be fixed in latest 3.4 alphas. Can someone else confirm this?

In #98889#1432931, @Harti wrote:
The bug (crash and blinking) seems to be fixed in latest 3.4 alphas. Can someone else confirm this?

No crash or blinking here either... so yeah...

> In #98889#1432931, @Harti wrote: > The bug (crash and blinking) seems to be fixed in latest 3.4 alphas. Can someone else confirm this? No crash or blinking here either... so yeah...
Member

I can still reproduce the crash, especially in the no_crash.blend provided in the comments. For me it's necessary to select a different object and enter sculpt mode to cause the crash.
But I can confirm that the visual glitches in general are fixed.

I can still reproduce the crash, especially in the `no_crash.blend` provided in the comments. For me it's necessary to select a different object and enter sculpt mode to cause the crash. But I can confirm that the visual glitches in general are fixed.
Member

I can't reproduce the crash.

I can't reproduce the crash.
Member

Changed status from 'Confirmed' to: 'Resolved'

Changed status from 'Confirmed' to: 'Resolved'
Julien Kaspar self-assigned this 2022-10-17 13:07:47 +02:00
Member

Ah I see. Something unrelated was causing the crash for me.
Will close this then.

Ah I see. Something unrelated was causing the crash for me. Will close this then.

Yup no crash with the steps from my video in the post. Looks like it's fixed.

Yup no crash with the steps from my video in the post. Looks like it's fixed.
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
12 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#98889
No description provided.