Page MenuHome

crash when adding texture paint workspace for the first time or going into texture paint mode
Closed, DuplicatePublic

Description

System Information
Operating system: WINDOWS 10
Graphics card: NVIDIA GEFORCE 940 MX

Blender Version
Broken:a2.80, 246604937, blender 2.8, 2018-12-19

Worked: (optional)

Short description of error

If you do not have the tabs across the top of your screen, press add button, go to texture paint, click on it and blender will crash, this also happens if you go into texture paint mode via the 3d view by going up to the mode switcher button in the top left corner and clicking texture paint mode, it will also produce a crash.

Details

Type
Bug

Event Timeline

Texture paint will make Blender crash if you don't have material.

Reproduce Step---
New project.
Delete a default box's material. ( - button)
Go to the Texture Paint tab.

Sebastian Parborg (zeddb) triaged this task as Confirmed, Medium priority.Dec 19 2018, 4:13 PM

I'm guessing that the current drawing code did not take into account the corner case were there would be no material on the object.

I'll just add the backtrace I got:

Thread 1 "blender" received signal SIGSEGV, Segmentation fault.
0x0000555557c7b975 in DRW_shgroup_call_add (shgroup=0x7fffd1f132e0, geom=0x7fffd4c63ec8, obmat=0x7fffefbf5ce0)
    at /home/zed/programmering/blender_master/blender/source/blender/draw/intern/draw_manager_data.c:393
393		BLI_LINKS_APPEND(&shgroup->calls, call);
(gdb) bt
#0  0x0000555557c7b975 in DRW_shgroup_call_add (shgroup=0x7fffd1f132e0, geom=0x7fffd4c63ec8, obmat=0x7fffefbf5ce0)
    at /home/zed/programmering/blender_master/blender/source/blender/draw/intern/draw_manager_data.c:393
#1  0x0000555557c9ff10 in PAINT_TEXTURE_cache_populate (vedata=0x7fffd6423a88, ob=0x7fffefbf5a08)
    at /home/zed/programmering/blender_master/blender/source/blender/draw/modes/paint_texture_mode.c:285
#2  0x0000555557c760f3 in drw_engines_cache_populate (ob=0x7fffefbf5a08)
    at /home/zed/programmering/blender_master/blender/source/blender/draw/intern/draw_manager.c:1017
#3  0x0000555557c77353 in DRW_draw_render_loop_ex (depsgraph=0x7fffdc83ba08, engine_type=0x55555d0d4fc0 <DRW_engine_viewport_eevee_type>, ar=0x7fffeab7ec88,
    v3d=0x7fffef14ab08, viewport=0x7fffd4c63748, evil_C=0x7fffefc30288)
    at /home/zed/programmering/blender_master/blender/source/blender/draw/intern/draw_manager.c:1483
#4  0x0000555557c76f5f in DRW_draw_view (C=0x7fffefc30288) at /home/zed/programmering/blender_master/blender/source/blender/draw/intern/draw_manager.c:1409
#5  0x0000555557191f6d in view3d_draw_view (C=0x7fffefc30288, ar=0x7fffeab7ec88)
    at /home/zed/programmering/blender_master/blender/source/blender/editors/space_view3d/view3d_draw.c:1334
#6  0x000055555719201d in view3d_main_region_draw (C=0x7fffefc30288, ar=0x7fffeab7ec88)
    at /home/zed/programmering/blender_master/blender/source/blender/editors/space_view3d/view3d_draw.c:1355
#7  0x000055555764ad92 in ED_region_do_draw (C=0x7fffefc30288, ar=0x7fffeab7ec88)
    at /home/zed/programmering/blender_master/blender/source/blender/editors/screen/area.c:567
#8  0x000055555704ab60 in wm_draw_window_offscreen (C=0x7fffefc30288, win=0x7fffeaa82888, stereo=false)
    at /home/zed/programmering/blender_master/blender/source/blender/windowmanager/intern/wm_draw.c:580
#9  0x000055555704b0de in wm_draw_window (C=0x7fffefc30288, win=0x7fffeaa82888)
    at /home/zed/programmering/blender_master/blender/source/blender/windowmanager/intern/wm_draw.c:712
#10 0x000055555704b5ea in wm_draw_update (C=0x7fffefc30288)
    at /home/zed/programmering/blender_master/blender/source/blender/windowmanager/intern/wm_draw.c:866
#11 0x00005555570482a1 in WM_main (C=0x7fffefc30288) at /home/zed/programmering/blender_master/blender/source/blender/windowmanager/intern/wm.c:433
#12 0x0000555557042bee in main (argc=1, argv=0x7fffffffdd28) at /home/zed/programmering/blender_master/blender/source/creator/creator.c:521