Description
Summary
Trying to get the XRApi via GetApi() causes an exception, rendering the whole binding system unusable.
System.ArgumentNullException: 'Value cannot be null. Parameter name: key'
This exception was originally thrown at this call stack:
System.Collections.Concurrent.ConcurrentDictionary<TKey, TValue>.TryAdd(TKey, TValue)
Silk.NET.OpenXR.XR.PostInit()
Silk.NET.OpenXR.XR.XR(Silk.NET.Core.Contexts.INativeContext)
Silk.NET.OpenXR.XR.GetApi()
Steps to reproduce
Just try to call XR.GetApi()
Comments
This is where I'm trying to get the API in my engine:
https://github.com/phr00t/FocusEngine/blob/master/sources/engine/Xenko.VirtualReality/OpenXR/OpenXRHmd.cs#L142
Discord Kai (Beast) said:
"that's a big error 👀 @Perksey apparently we try to insert a null key into the concurrent dictionary"
Perksey added:
"I don’t think there’s anything you can do to work around this at the moment. The fix will involve making the key of the VTable dictionary something that isn’t null (could probably just make the key non-nullable and use default?)"