Page MenuHome

Crash when texture painting across multiple materials
Closed, ResolvedPublic

Description

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: rB45079b169dc5
Caused by rBd743ef91df74: Fix 3d texture painting artifacts.

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

Exact steps for others to reproduce the error


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.

Event Timeline

Keen Foong (kfoong) updated the task description. (Show Details)

Crash file:

Broke between eb0f8317e231 - eabdcdcd44b9
Will bisect.

Pratik Borhade (PratikPB2123) changed the task status from Needs Triage to Confirmed.Mar 7 2022, 2:01 PM
Pratik Borhade (PratikPB2123) updated the task description. (Show Details)

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

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

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

System Information
Operating system : Windows-10-10.0.18362-SP0 64 Bits
Graphics card : AMD Radeon(TM) 535 ATI Technologies .

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...

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);

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

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

This comment was removed by Jordan Miller (rolandmm).