I somehow managed to get my Windows system into a broken state were the driver reports 145 extensions, but extension #144 is an empty string.
Therefore Godot will crash while initializing Vulkan and looking for requested device extensions.
Steps to reproduce
Execute the following code:
HashMap<CharString, bool> requested_device_extensions;
CharString extension_name("");
CharString extension_name2("Hello");
requested_device_extensions.insert("HashMap must not be empty", true);
if (requested_device_extensions.has(extension_name2))
printf("Has Hello\n");
if (requested_device_extensions.has(extension_name))
printf("Has <empty>\n");
Godot version
4.2.x master [5df98679672c12d96b4ac4d96ee17f1559207401]
System information
Linux - GCC g++ 9.4.0 - Ubuntu 20.04 LTS
Issue description
I somehow managed to get my Windows system into a broken state were the driver reports 145 extensions, but extension
#144
is an empty string.Therefore Godot will crash while initializing Vulkan and looking for requested device extensions.
Steps to reproduce
Execute the following code:
It will crash before. Callstack:
The reason is that CharString decided to not create a pointer at all to save memory. Hence when hash_djb2 tries to read the first byte, it crashes.
Minimal reproduction project
N / A