Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vkGetInstanceProcAddr Crash #1808

Closed
viniciusmiguel opened this issue Jan 2, 2023 · 6 comments
Closed

vkGetInstanceProcAddr Crash #1808

viniciusmiguel opened this issue Jan 2, 2023 · 6 comments

Comments

@viniciusmiguel
Copy link

When calling GlfwWindow.Create the MoltenVK function vkGetInstanceProcAddr crashes the runtime.

For context:
dotnet/Silk.NET#1192

The same solution works on windows.
I tried to execute visa Rosetta and native arm64.

crash-report-arm64.txt
crashreport.txt

@viniciusmiguel
Copy link
Author

vulkan-dump.txt

Adding log from the Vulkan Configurator in API dump mode.

@billhollings
Copy link
Contributor

Your vulkan-dump.txt log indicates that the validation layers are not happy with the instance parameter of vkGetInstanceProcAddr.

It's not clear from your crashreport.txt and crash-report-arm64.txt reports what function vkGetInstanceProcAddr is retrieving. Is there any way you can debug or trap this to determine which function is being retrieved and what the instance value is?

If vkGetInstanceProcAddr is trying to retrieve itself, and the instance is actually NULL, it's possible that MoltenVK will segfault here. PR #1818 includes a fix for that. Can you test with the latest MoltenVK code and check that please?

@hartmutbehrens
Copy link

I'm getting a similar crash when running through chapter 2 of the updated vulkan guide, the section on "Setting up ImGui".

An exception with EXC_BAD_ACCESS, code 2 is raised when trying to call vkGetInstanceProcAddr at this point. The calling code in the application is here.

image

@hartmutbehrens
Copy link

This is on "Apple M1" with Vulkan 1.2.275 driver.

@billhollings
Copy link
Contributor

Have you enabled the VK_KHR_dynamic_rendering extension?

@billhollings billhollings removed the Bug label Feb 8, 2024
@hartmutbehrens
Copy link

I tracked this down to Dear ImGui loading vulkan.h while volk was also in use, resulting in symbol name conflicts.
Basically this issue here: ocornut/imgui#4854
Sorry for the noise.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants