[Solved]Vulkan crashes when creating VkInstance

I have been trying to use vulkan recently, but i ran into this problem. Whenever i try to create a new vulkan instance, it crashes with


# A fatal error has been detected by the Java Runtime Environment:
#
#  EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x00007ffdd84a6e07, pid=4536, tid=0x0000000000001bcc

any help would be appreciated.

Thanks in advance anyway.

Edit:
It was all the api version. I updated my drivers and it worked.

There are literally three million things you could’ve done wrong, none of which we can analyze without any information.
For a working absolute minimal demo, see these thousand lines of code.

The api version was missing in my code. That fixed part of it, but then the same thing happened to the device function, and even when i tried switching it to the exact code in the demo, it still crashed at VK10.vkEnumeratePhysicalDevices

The error log says the error is coming from vulkan-1.dll the last operation is vulkan-1.dll+0x26ccf