Crash when texture painting across multiple materials #96213

Closed
opened 2022-03-07 12:55:29 +01:00 by Keen Foong · 20 comments

System Information
Operating system: Windows-10-10.0.19043-SP0 64 Bits
Graphics card: NVIDIA GeForce RTX 2080 Ti/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 497.09

Blender Version
Broken: version: 3.1.0 Release Candidate, branch: master, commit date: 2022-03-04 14:21, hash: 45079b169d
Caused by d743ef91df

Short description of error
Crashes when painting inbetween two materials on the same object.
blender_qd2WhrnJ8d.mp4

Exact steps for others to reproduce the error
texturecrash.blend
Paint in-between the two materials. Painting on one only doesn't crash. Only crashes when you paint in between the two.

Each material has it's own texture that you can paint to.

**System Information** Operating system: Windows-10-10.0.19043-SP0 64 Bits Graphics card: NVIDIA GeForce RTX 2080 Ti/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 497.09 **Blender Version** Broken: version: 3.1.0 Release Candidate, branch: master, commit date: 2022-03-04 14:21, hash: `45079b169d` Caused by d743ef91df **Short description of error** Crashes when painting inbetween two materials on the same object. [blender_qd2WhrnJ8d.mp4](https://archive.blender.org/developer/F12900502/blender_qd2WhrnJ8d.mp4) **Exact steps for others to reproduce the error** [texturecrash.blend](https://archive.blender.org/developer/F12900503/texturecrash.blend) Paint in-between the two materials. Painting on one only doesn't crash. Only crashes when you paint in between the two. Each material has it's own texture that you can paint to.
Author

Added subscriber: @kfoong

Added subscriber: @kfoong
Author
Crash file: [texturecrash.crash.txt](https://archive.blender.org/developer/F12900507/texturecrash.crash.txt)
Member

Added subscriber: @PratikPB2123

Added subscriber: @PratikPB2123
Member

Broke between eb0f8317e2 - eabdcdcd44
Will bisect.

Broke between eb0f8317e231 - eabdcdcd44b9 Will bisect.
Member

Added subscribers: @Jeroen-Bakker, @ThomasDinges

Added subscribers: @Jeroen-Bakker, @ThomasDinges
Member

@Jeroen-Bakker hi, can you take a look? First bad commit appears to be d743ef91df

@Jeroen-Bakker hi, can you take a look? First bad commit appears to be d743ef91df
Member

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

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

Added subscriber: @Raimund58

Added subscriber: @Raimund58
Jeroen Bakker self-assigned this 2022-03-07 14:57:42 +01:00
Member

@PratikPB2123 I am not able to reproduce it on my system (Linux+AMD). Can someone add a stack trace?
20220308_T96213.mp4

@PratikPB2123 I am not able to reproduce it on my system (Linux+AMD). Can someone add a stack trace? [20220308_T96213.mp4](https://archive.blender.org/developer/F12906073/20220308_T96213.mp4)
Member

Can someone add a stack trace?

(Will also upload video recording)

blender.exe         :0x00007FF7222E2E10  image_gpu_texture_try_partial_update C:\Users\Pratik\Desktop\BlenderOSP\blender\source\blender\blenkernel\intern\image_gpu.cc:358
blender.exe         :0x00007FF7222E2870  image_get_gpu_texture C:\Users\Pratik\Desktop\BlenderOSP\blender\source\blender\blenkernel\intern\image_gpu.cc:408
blender.exe         :0x00007FF7226CF4F0  workbench_image_setup_ex C:\Users\Pratik\Desktop\BlenderOSP\blender\source\blender\draw\engines\workbench\workbench_materials.c:252
blender.exe         :0x00007FF722686B60  workbench_cache_populate C:\Users\Pratik\Desktop\BlenderOSP\blender\source\blender\draw\engines\workbench\workbench_engine.c:397
blender.exe         :0x00007FF72264DE30  drw_engines_cache_populate C:\Users\Pratik\Desktop\BlenderOSP\blender\source\blender\draw\intern\draw_manager.c:1061
blender.exe         :0x00007FF72264A650  DRW_draw_render_loop_ex C:\Users\Pratik\Desktop\BlenderOSP\blender\source\blender\draw\intern\draw_manager.c:1664
blender.exe         :0x00007FF72264B720  DRW_draw_view C:\Users\Pratik\Desktop\BlenderOSP\blender\source\blender\draw\intern\draw_manager.c:1586
blender.exe         :0x00007FF722CA65D0  view3d_main_region_draw C:\Users\Pratik\Desktop\BlenderOSP\blender\source\blender\editors\space_view3d\view3d_draw.c:1564
blender.exe         :0x00007FF722237980  ED_region_do_draw C:\Users\Pratik\Desktop\BlenderOSP\blender\source\blender\editors\screen\area.c:547
blender.exe         :0x00007FF72221F400  wm_draw_window_offscreen C:\Users\Pratik\Desktop\BlenderOSP\blender\source\blender\windowmanager\intern\wm_draw.c:716
blender.exe         :0x00007FF72221F250  wm_draw_window C:\Users\Pratik\Desktop\BlenderOSP\blender\source\blender\windowmanager\intern\wm_draw.c:868
blender.exe         :0x00007FF72221ED90  wm_draw_update C:\Users\Pratik\Desktop\BlenderOSP\blender\source\blender\windowmanager\intern\wm_draw.c:1067
blender.exe         :0x00007FF7221F9880  WM_main C:\Users\Pratik\Desktop\BlenderOSP\blender\source\blender\windowmanager\intern\wm.c:629
blender.exe         :0x00007FF7221F5060  main C:\Users\Pratik\Desktop\BlenderOSP\blender\source\creator\creator.c:549
blender.exe         :0x00007FF723146754  __scrt_common_main_seh d:\a01\_work\12\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:288
KERNEL32.DLL        :0x00007FFE0DC07020  BaseThreadInitThunk
ntdll.dll           :0x00007FFE0F262630  RtlUserThreadStart```
> Can someone add a stack trace? (Will also upload video recording) ``` blender.exe :0x00007FF7222E2E10 image_gpu_texture_try_partial_update C:\Users\Pratik\Desktop\BlenderOSP\blender\source\blender\blenkernel\intern\image_gpu.cc:358 blender.exe :0x00007FF7222E2870 image_get_gpu_texture C:\Users\Pratik\Desktop\BlenderOSP\blender\source\blender\blenkernel\intern\image_gpu.cc:408 blender.exe :0x00007FF7226CF4F0 workbench_image_setup_ex C:\Users\Pratik\Desktop\BlenderOSP\blender\source\blender\draw\engines\workbench\workbench_materials.c:252 blender.exe :0x00007FF722686B60 workbench_cache_populate C:\Users\Pratik\Desktop\BlenderOSP\blender\source\blender\draw\engines\workbench\workbench_engine.c:397 blender.exe :0x00007FF72264DE30 drw_engines_cache_populate C:\Users\Pratik\Desktop\BlenderOSP\blender\source\blender\draw\intern\draw_manager.c:1061 blender.exe :0x00007FF72264A650 DRW_draw_render_loop_ex C:\Users\Pratik\Desktop\BlenderOSP\blender\source\blender\draw\intern\draw_manager.c:1664 blender.exe :0x00007FF72264B720 DRW_draw_view C:\Users\Pratik\Desktop\BlenderOSP\blender\source\blender\draw\intern\draw_manager.c:1586 blender.exe :0x00007FF722CA65D0 view3d_main_region_draw C:\Users\Pratik\Desktop\BlenderOSP\blender\source\blender\editors\space_view3d\view3d_draw.c:1564 blender.exe :0x00007FF722237980 ED_region_do_draw C:\Users\Pratik\Desktop\BlenderOSP\blender\source\blender\editors\screen\area.c:547 blender.exe :0x00007FF72221F400 wm_draw_window_offscreen C:\Users\Pratik\Desktop\BlenderOSP\blender\source\blender\windowmanager\intern\wm_draw.c:716 blender.exe :0x00007FF72221F250 wm_draw_window C:\Users\Pratik\Desktop\BlenderOSP\blender\source\blender\windowmanager\intern\wm_draw.c:868 blender.exe :0x00007FF72221ED90 wm_draw_update C:\Users\Pratik\Desktop\BlenderOSP\blender\source\blender\windowmanager\intern\wm_draw.c:1067 blender.exe :0x00007FF7221F9880 WM_main C:\Users\Pratik\Desktop\BlenderOSP\blender\source\blender\windowmanager\intern\wm.c:629 blender.exe :0x00007FF7221F5060 main C:\Users\Pratik\Desktop\BlenderOSP\blender\source\creator\creator.c:549 blender.exe :0x00007FF723146754 __scrt_common_main_seh d:\a01\_work\12\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:288 KERNEL32.DLL :0x00007FFE0DC07020 BaseThreadInitThunk ntdll.dll :0x00007FFE0F262630 RtlUserThreadStart```
Member

Video recorded on build of master branch: 901a03725e (same for 3.1.0)
To get the crash- Hold and drag LMB from one to other material
#96213.gif

Operating system : Windows-10-10.0.18362-SP0 64 Bits
Graphics card : AMD Radeon(TM) 535 ATI Technologies .```
Video recorded on build of master branch: 901a03725ed58166e5b2401dfadd7c1cb7e490a2 (same for 3.1.0) To get the crash- Hold and drag LMB from one to other material ![#96213.gif](https://archive.blender.org/developer/F12906107/T96213.gif) ```System Information Operating system : Windows-10-10.0.18362-SP0 64 Bits Graphics card : AMD Radeon(TM) 535 ATI Technologies .```
Member

Hmm will try on windows. the line itself is a bit weird...

According to my source tree the crash happens at

BLI_rcti_size_x(&clipped_update_region),

which is just subtracting two integers on the stack...

Hmm will try on windows. the line itself is a bit weird... According to my source tree the crash happens at ``` BLI_rcti_size_x(&clipped_update_region), ``` which is just subtracting two integers on the stack...
Member

According to my source tree the crash happens at BLI_rcti_size_x(&clipped_update_region)

You probably have checked the code on 3.1 branch
On master it shows crash at image_gpu_texture_partial_update_changes_available(image, changes);

> According to my source tree the crash happens at `BLI_rcti_size_x(&clipped_update_region)` You probably have checked the code on 3.1 branch On master it shows crash at [image_gpu_texture_partial_update_changes_available(image, changes); ](https://developer.blender.org/diffusion/B/browse/master/source/blender/blenkernel/intern/image_gpu.cc$358)
Member

Which is still strange. What can possible go wrong there that leads to a crash... Currently building a similar system to reproduce the issue...

Which is still strange. What can possible go wrong there that leads to a crash... Currently building a similar system to reproduce the issue...
Member

I am able to reproduce the issue on release builds on windows.

I am able to reproduce the issue on release builds on windows.

This issue was referenced by 1d902a6367

This issue was referenced by 1d902a6367d1d18670ed75e3508cd0db00021350
Member

Changed status from 'Confirmed' to: 'Resolved'

Changed status from 'Confirmed' to: 'Resolved'

Added subscriber: @rolandmm

Added subscriber: @rolandmm

This comment was removed by @rolandmm

*This comment was removed by @rolandmm*

This comment was removed by @rolandmm

*This comment was removed by @rolandmm*
Thomas Dinges added this to the 3.1 milestone 2023-02-08 15:52:44 +01: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
6 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#96213
No description provided.