Segfault in UI_icon_draw_cache_end on startup; fresh new build. Fresh new developer;)

I’m trying to dabble a bit in blender development; It crashed on startup after command-line build. Is this a known issue?

I’m on

commit a0886d1b6ec96878015eed94cc551f06358ce864 (HEAD -> master, origin/master, origin/HEAD)
Author: Aaron Carlisle <[email protected]>
Date:   Sun Oct 11 13:00:49 2020 -0400

Mac OS, xcode: 11.3

Path:                  /Users/USER/*/
Identifier:            org.blenderfoundation.blender
Version:               2.91.0 (2.91.0 2020-10-11)
Code Type:             X86-64 (Native)
Parent Process:        bash [37771]
Responsible:           Terminal [2313]
User ID:               502

Date/Time:             2020-10-11 12:29:12.799 -0700
OS Version:            Mac OS X 10.15.3 (19D76)
Report Version:        12
Bridge OS Version:     3.0 (14Y908)
Anonymous UUID:        33CA54A6-F0BD-521E-4F01-4F03B23204AA

Sleep/Wake UUID:       0E5816AA-0661-4E35-BFFC-3A2EC6FE4EBD

Time Awake Since Boot: 170000 seconds
Time Since Wake:       6000 seconds

System Integrity Protection: enabled

Crashed Thread:        0  Dispatch queue:

Exception Type:        EXC_BAD_ACCESS (SIGSEGV)
Exception Codes:       KERN_INVALID_ADDRESS at 0x000000000000010c
Exception Note:        EXC_CORPSE_NOTIFY

Termination Signal:    Segmentation fault: 11
Termination Reason:    Namespace SIGNAL, Code 0xb
Terminating Process:   exc handler [64178]

VM Regions Near 0x10c:
    __TEXT                 000000010a801000-0000000114f5c000 [167.4M] r-x/r-x SM=COW  /Users/USER/*/

Thread 0 Crashed:: Dispatch queue:
0   org.blenderfoundation.blender 	0x0000000110d5c469 blender::gpu::GLStateManager::texture_bind(blender::gpu::Texture*, eGPUSamplerState, int) + 57
1   org.blenderfoundation.blender 	0x000000010b57874c icon_draw_cache_texture_flush_ex + 108
2   org.blenderfoundation.blender 	0x000000010b576673 UI_icon_draw_cache_end + 83
3   org.blenderfoundation.blender 	0x000000010b546036 UI_block_draw + 934
4   org.blenderfoundation.blender 	0x000000010b548964 UI_blocklist_draw + 52
5   org.blenderfoundation.blender 	0x000000010b23bc28 ED_region_header_draw + 264
6   org.blenderfoundation.blender 	0x000000010b236cb2 ED_region_do_draw + 338
7   org.blenderfoundation.blender 	0x000000010ad228cd wm_draw_update + 1773
8   org.blenderfoundation.blender 	0x000000010ad20480 WM_main + 48
9   org.blenderfoundation.blender 	0x000000010a94203c main + 892
10  libdyld.dylib                 	0x00007fff640c27fd start + 1


Model: MacBookPro13,3, BootROM, 4 processors, Quad-Core Intel Core i7, 2.9 GHz, 16 GB, SMC 2.38f8
Graphics: kHW_IntelHDGraphics530Item, Intel HD Graphics 530, spdisplays_builtin
Graphics: kHW_AMDRadeonPro460Item, AMD Radeon Pro 460, spdisplays_pcie_device, 4 GB
Memory Module: BANK 0/DIMM0, 8 GB, LPDDR3, 2133 MHz, 0x802C, 0x4D5435324C31473332443450472D30393320
Memory Module: BANK 1/DIMM0, 8 GB, LPDDR3, 2133 MHz, 0x802C, 0x4D5435324C31473332443450472D30393320
AirPort: spairport_wireless_card_type_airport_extreme (0x14E4, 0x15A), Broadcom BCM43xx 1.0 ( AirPortDriverBrcmNIC-1440.1)
Bluetooth: Version 7.0.3f5, 3 services, 27 devices, 1 incoming serial ports
Network Service: Wi-Fi, AirPort, en0
USB Device: USB 3.0 Bus
USB Device: Apple T1 Controller
Thunderbolt Bus: MacBook Pro, Apple Inc., 41.2
Thunderbolt Bus: MacBook Pro, Apple Inc., 41.2

I can’t really tell without exact steps of how you did your build but and I’m not really fluent in macs but: Master is not always stable. Crashes on startup are rare, but they do happen.

You can try to first checkout a known working version, for example;

git checkout v2.90.0

(git tag to list available tags)

And build that. If that also crashes, you can be sure something wrong in your build setup.

That did it! I’m unblocked.

So I guess that’s something for your mac maintainer to look into.

Thanks for the help!

You can try to checkout master again in a few days and see it it’s fixed. There are lot’s of people using macs, so I can’t imagine it being broken for long.

I don’t get a crash on intel HD 6000, macOS Mojave. Same commit as yours.
If this also happens in the build created by make lite (or
cmake -C ../blender/build_files/cmake/config/blender_lite.cmake ../blender
), then you may want to do a git bisect to find the problematic commit.
Also try changing the GPU.

side note, icon_draw_cache_texture_flush_ex is in my suppression file for leak sanitiser.