MoltenVK
MoltenVK copied to clipboard
vkQueuePresentKHR often crashes
About 1 in 10-15 times, when I run my code (even a simple tutorial engine), MoltenVK crashes (upon the first frame) with this error:
MVKCrashTest(11214,0x7ff855dd27c0) malloc: Heap corruption detected, free list is damaged at 0x600000124ee0
*** Incorrect guard value: 183628
MVKCrashTest(11214,0x7ff855dd27c0) malloc: *** set a breakpoint in malloc_error_break to debug
The error occurs when calling return disp->QueuePresentKHR(queue, pPresentInfo);
Using the LLDB Debugger, I have found that vkQueuePresentKHR
causes this for no discernible reason. I am on the latest release. My hardware is an AMD Radeon 757 Pro 4GB and an Intel(R) Core(TM) i5-7600 CPU @ 3.50GHz. I upgraded the memory to be 32 GB 2400 MHz DDR4. This is a 27-inch 5K iMac from 2017 running macOS ventura 13.6.7
The code works 100% of the time on the same machine when booted into ubuntu and win11. I started up the application 200 times on win11, ubuntu, and macos. On macOS, it failed 23 times. It did not fail on either of the other operating systems. I am using the VK_LAYER_KHRONOS_validation
layer, and am seeing no errors.