Regression: Switching shading color type crashes blender (using the sculpting template) #98842

Closed
opened 2022-06-13 13:39:32 +02:00 by Nelson · 11 comments

System Information
Operating system: Windows 10

Blender Version
Broken: blender-3.3.0-alpha+master.c55dac9904d7-windows.amd64-release
Worked: 3.2 (Prior to 285a68b7bb?)

Short description of error
This is a follow up of #98784 (Sculpting template crash)
The initial crash was resolved, but it now crashes if I choose the Texture color type after choosing something else first.

Exact steps for others to reproduce the error
File/New/Sculpting
In the shading popover switch to a color type like "Single" for example
Then switch to "Texture"
Crash

blender_2022-06-13_06-34-41.mp4
And as @TheRedWaxPolice found out, it seems like switching back to material color type also crashes
blender.crash.txt

**System Information** Operating system: Windows 10 **Blender Version** Broken: blender-3.3.0-alpha+master.`c55dac9904d7`-windows.amd64-release Worked: 3.2 (Prior to 285a68b7bb?) **Short description of error** This is a follow up of #98784 (Sculpting template crash) The initial crash was resolved, but it now crashes if I choose the Texture color type after choosing something else first. **Exact steps for others to reproduce the error** File/New/Sculpting In the shading popover switch to a color type like "Single" for example Then switch to "Texture" Crash [blender_2022-06-13_06-34-41.mp4](https://archive.blender.org/developer/F13154301/blender_2022-06-13_06-34-41.mp4) And as @TheRedWaxPolice found out, it seems like switching back to material color type also crashes [blender.crash.txt](https://archive.blender.org/developer/F13154300/blender.crash.txt)
Author

Added subscribers: @TheRedWaxPolice, @NelsonNAS

Added subscribers: @TheRedWaxPolice, @NelsonNAS

Added subscriber: @deadpin

Added subscriber: @deadpin

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

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

Looks like there's still issues for a variety of cases of switching back and forth between those shading types:

==52680==ERROR: AddressSanitizer: heap-use-after-free on address 0x124559f1c4f0 at pc 0x7ff7d566a026 bp 0x00f2c6ffdbc0 sp 0x00f2c6ffdbc8
WRITE of size 8 at 0x124559f1c4f0 thread T0
    - 0 0x7ff7d566a025 in GPU_batch_set_shader D:\source\blender-git\blender\source\blender\gpu\intern\gpu_batch.cc:214
    - 1 0x7ff7c732e1d1 in draw_geometry_bind D:\source\blender-git\blender\source\blender\draw\intern\draw_manager_exec.c:534
    - 2 0x7ff7c732e266 in draw_geometry_execute D:\source\blender-git\blender\source\blender\draw\intern\draw_manager_exec.c:557
    - 3 0x7ff7c73311f0 in draw_call_single_do D:\source\blender-git\blender\source\blender\draw\intern\draw_manager_exec.c:868
    - 4 0x7ff7c7332c15 in draw_shgroup D:\source\blender-git\blender\source\blender\draw\intern\draw_manager_exec.c:1040
    - 5 0x7ff7c73338d4 in drw_draw_pass_ex D:\source\blender-git\blender\source\blender\draw\intern\draw_manager_exec.c:1177
    - 6 0x7ff7c732c6fd in DRW_draw_pass D:\source\blender-git\blender\source\blender\draw\intern\draw_manager_exec.c:1217
    - 7 0x7ff7c745c82e in workbench_draw_sample D:\source\blender-git\blender\source\blender\draw\engines\workbench\workbench_engine.c:540
    - 8 0x7ff7c745f438 in workbench_draw_scene D:\source\blender-git\blender\source\blender\draw\engines\workbench\workbench_engine.c:615
    - 9 0x7ff7c72fc24d in drw_engines_draw_scene D:\source\blender-git\blender\source\blender\draw\intern\draw_manager.c:1092
    - 10 0x7ff7c72eb424 in DRW_draw_render_loop_ex D:\source\blender-git\blender\source\blender\draw\intern\draw_manager.c:1714
    - 11 0x7ff7c72e9f60 in DRW_draw_view D:\source\blender-git\blender\source\blender\draw\intern\draw_manager.c:1593
    #12 0x7ff7cb137ef1 in view3d_draw_view D:\source\blender-git\blender\source\blender\editors\space_view3d\view3d_draw.c:1540

0x124559f1c4f0 is located 176 bytes inside of 256-byte region [0x124559f1c440,0x124559f1c540)
freed by thread T0 here:
    - 0 0x7ffe23d105b2  (D:\source\blender-git\build-full-asan\bin\Debug\clang_rt.asan_dbg_dynamic-x86_64.dll+0x1800505b2)
    - 1 0x7ff7d60207f9 in MEM_lockfree_freeN D:\source\blender-git\blender\intern\guardedalloc\intern\mallocn_lockfree_impl.c:116
    - 2 0x7ff7d56745d1 in blender::gpu::GLBatch::operator delete(void *) D:\source\blender-git\blender\source\blender\gpu\opengl\gl_batch.hh:113
    - 3 0x7ff7d56749a6 in blender::gpu::GLBatch::`vector deleting dtor'(unsigned int) (D:\source\blender-git\build-full-asan\bin\Debug\blender.exe+0x1522549a6)
    - 4 0x7ff7d566951c in GPU_batch_discard D:\source\blender-git\blender\source\blender\gpu\intern\gpu_batch.cc:114
    - 5 0x7ff7d56641fb in gpu_pbvh_buffers_clear D:\source\blender-git\blender\source\blender\gpu\intern\gpu_buffers.c:1455
    - 6 0x7ff7d565fe26 in GPU_pbvh_buffers_free D:\source\blender-git\blender\source\blender\gpu\intern\gpu_buffers.c:1481
    - 7 0x7ff7c60aaf64 in pbvh_free_draw_buffers D:\source\blender-git\blender\source\blender\blenkernel\intern\pbvh.c:1389
    - 8 0x7ff7c60b6bdb in pbvh_update_draw_buffers D:\source\blender-git\blender\source\blender\blenkernel\intern\pbvh.c:1465
    - 9 0x7ff7c609c560 in BKE_pbvh_draw_cb D:\source\blender-git\blender\source\blender\blenkernel\intern\pbvh.c:2890
    - 10 0x7ff7c7325dd6 in drw_sculpt_generate_calls D:\source\blender-git\blender\source\blender\draw\intern\draw_manager_data.c:1236
    - 11 0x7ff7c731a044 in DRW_shgroup_call_sculpt D:\source\blender-git\blender\source\blender\draw\intern\draw_manager_data.c:1265
    - 12 0x7ff7c7564023 in OVERLAY_sculpt_cache_populate D:\source\blender-git\blender\source\blender\draw\engines\overlay\overlay_sculpt.c:56
    - 13 0x7ff7c7458310 in OVERLAY_cache_populate D:\source\blender-git\blender\source\blender\draw\engines\overlay\overlay_engine.c:429
    - 14 0x7ff7c72fbca8 in drw_engines_cache_populate D:\source\blender-git\blender\source\blender\draw\intern\draw_manager.c:1062
    - 15 0x7ff7c72eb296 in DRW_draw_render_loop_ex D:\source\blender-git\blender\source\blender\draw\intern\draw_manager.c:1683
    #16 0x7ff7c72e9f60 in DRW_draw_view D:\source\blender-git\blender\source\blender\draw\intern\draw_manager.c:1593
Looks like there's still issues for a variety of cases of switching back and forth between those shading types: ``` ==52680==ERROR: AddressSanitizer: heap-use-after-free on address 0x124559f1c4f0 at pc 0x7ff7d566a026 bp 0x00f2c6ffdbc0 sp 0x00f2c6ffdbc8 WRITE of size 8 at 0x124559f1c4f0 thread T0 - 0 0x7ff7d566a025 in GPU_batch_set_shader D:\source\blender-git\blender\source\blender\gpu\intern\gpu_batch.cc:214 - 1 0x7ff7c732e1d1 in draw_geometry_bind D:\source\blender-git\blender\source\blender\draw\intern\draw_manager_exec.c:534 - 2 0x7ff7c732e266 in draw_geometry_execute D:\source\blender-git\blender\source\blender\draw\intern\draw_manager_exec.c:557 - 3 0x7ff7c73311f0 in draw_call_single_do D:\source\blender-git\blender\source\blender\draw\intern\draw_manager_exec.c:868 - 4 0x7ff7c7332c15 in draw_shgroup D:\source\blender-git\blender\source\blender\draw\intern\draw_manager_exec.c:1040 - 5 0x7ff7c73338d4 in drw_draw_pass_ex D:\source\blender-git\blender\source\blender\draw\intern\draw_manager_exec.c:1177 - 6 0x7ff7c732c6fd in DRW_draw_pass D:\source\blender-git\blender\source\blender\draw\intern\draw_manager_exec.c:1217 - 7 0x7ff7c745c82e in workbench_draw_sample D:\source\blender-git\blender\source\blender\draw\engines\workbench\workbench_engine.c:540 - 8 0x7ff7c745f438 in workbench_draw_scene D:\source\blender-git\blender\source\blender\draw\engines\workbench\workbench_engine.c:615 - 9 0x7ff7c72fc24d in drw_engines_draw_scene D:\source\blender-git\blender\source\blender\draw\intern\draw_manager.c:1092 - 10 0x7ff7c72eb424 in DRW_draw_render_loop_ex D:\source\blender-git\blender\source\blender\draw\intern\draw_manager.c:1714 - 11 0x7ff7c72e9f60 in DRW_draw_view D:\source\blender-git\blender\source\blender\draw\intern\draw_manager.c:1593 #12 0x7ff7cb137ef1 in view3d_draw_view D:\source\blender-git\blender\source\blender\editors\space_view3d\view3d_draw.c:1540 0x124559f1c4f0 is located 176 bytes inside of 256-byte region [0x124559f1c440,0x124559f1c540) freed by thread T0 here: - 0 0x7ffe23d105b2 (D:\source\blender-git\build-full-asan\bin\Debug\clang_rt.asan_dbg_dynamic-x86_64.dll+0x1800505b2) - 1 0x7ff7d60207f9 in MEM_lockfree_freeN D:\source\blender-git\blender\intern\guardedalloc\intern\mallocn_lockfree_impl.c:116 - 2 0x7ff7d56745d1 in blender::gpu::GLBatch::operator delete(void *) D:\source\blender-git\blender\source\blender\gpu\opengl\gl_batch.hh:113 - 3 0x7ff7d56749a6 in blender::gpu::GLBatch::`vector deleting dtor'(unsigned int) (D:\source\blender-git\build-full-asan\bin\Debug\blender.exe+0x1522549a6) - 4 0x7ff7d566951c in GPU_batch_discard D:\source\blender-git\blender\source\blender\gpu\intern\gpu_batch.cc:114 - 5 0x7ff7d56641fb in gpu_pbvh_buffers_clear D:\source\blender-git\blender\source\blender\gpu\intern\gpu_buffers.c:1455 - 6 0x7ff7d565fe26 in GPU_pbvh_buffers_free D:\source\blender-git\blender\source\blender\gpu\intern\gpu_buffers.c:1481 - 7 0x7ff7c60aaf64 in pbvh_free_draw_buffers D:\source\blender-git\blender\source\blender\blenkernel\intern\pbvh.c:1389 - 8 0x7ff7c60b6bdb in pbvh_update_draw_buffers D:\source\blender-git\blender\source\blender\blenkernel\intern\pbvh.c:1465 - 9 0x7ff7c609c560 in BKE_pbvh_draw_cb D:\source\blender-git\blender\source\blender\blenkernel\intern\pbvh.c:2890 - 10 0x7ff7c7325dd6 in drw_sculpt_generate_calls D:\source\blender-git\blender\source\blender\draw\intern\draw_manager_data.c:1236 - 11 0x7ff7c731a044 in DRW_shgroup_call_sculpt D:\source\blender-git\blender\source\blender\draw\intern\draw_manager_data.c:1265 - 12 0x7ff7c7564023 in OVERLAY_sculpt_cache_populate D:\source\blender-git\blender\source\blender\draw\engines\overlay\overlay_sculpt.c:56 - 13 0x7ff7c7458310 in OVERLAY_cache_populate D:\source\blender-git\blender\source\blender\draw\engines\overlay\overlay_engine.c:429 - 14 0x7ff7c72fbca8 in drw_engines_cache_populate D:\source\blender-git\blender\source\blender\draw\intern\draw_manager.c:1062 - 15 0x7ff7c72eb296 in DRW_draw_render_loop_ex D:\source\blender-git\blender\source\blender\draw\intern\draw_manager.c:1683 #16 0x7ff7c72e9f60 in DRW_draw_view D:\source\blender-git\blender\source\blender\draw\intern\draw_manager.c:1593 ```
Author

wait, crashes are not high prio anymore?

wait, crashes are not high prio anymore?

Will raise to High since this is a recent regression most likely related to the work done for 285a68b7bb

Will raise to High since this is a recent regression most likely related to the work done for 285a68b7bb
Pratik Borhade changed title from Sculpt: Switching shading color type crashes blender (using the sculpting template) to Regression: Switching shading color type crashes blender (using the sculpting template) 2022-06-14 08:07:08 +02:00
Member

Added subscriber: @PratikPB2123

Added subscriber: @PratikPB2123
Member

In #98836#1381417, @deadpin wrote:
I'm no longer able to reproduce this issue or #98842 as well... these 2 issues must've been addressed as part of other changes.

@NelsonNAS hi, could you check again in fresh 3.3 build?: https://builder.blender.org/download/daily

> In #98836#1381417, @deadpin wrote: > I'm no longer able to reproduce this issue or #98842 as well... these 2 issues must've been addressed as part of other changes. @NelsonNAS hi, could you check again in fresh 3.3 build?: https://builder.blender.org/download/daily
Author

@PratikPB2123 Fixed. It's not crashing anymore. (blender-3.3.0-alpha+master.7a44f62bdb60-windows.amd64-release)

@PratikPB2123 Fixed. It's not crashing anymore. (blender-3.3.0-alpha+master.7a44f62bdb60-windows.amd64-release)
Member

Changed status from 'Confirmed' to: 'Resolved'

Changed status from 'Confirmed' to: 'Resolved'
Pratik Borhade self-assigned this 2022-06-28 09:21:38 +02:00
Member

@NelsonNAS, thanks, closing this report :)

@NelsonNAS, thanks, closing this report :)
Pratik Borhade removed their assignment 2022-06-28 09:21:45 +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#98842
No description provided.