Memory corruption in xrCreateSession when EXTX_overlay is supported by runtime
rcelyte opened this issue · comments
Configuration
Wolvic version: any since 4a2fac1
Hardware: any
Steps to Reproduce
- Use a runtime that supports XR_EXTX_overlay (i.e. Monado)
- Attempt to launch Wolvic
- Observe errors and immediate crash
Current Behavior
The extension struct for enabling XR_EXTX_overlay is out of scope when passed to xrCreateSession()
, resulting in the memory getting clobbered:
wolvic/app/src/openxr/cpp/DeviceDelegateOpenXR.cpp
Lines 1549 to 1560 in a33d5de
Expected Behavior
Not crashing on startup
Possible Solution
Hoist the declaration of overlayInfo
outside of the if
statement so it remains in scope
Error Logs and Stack Traces
I VRB : BrowserWorld::InitializeGL
D OXR : XR_ERROR_GRAPHICS_DEVICE_INVALID: xrCreateSession(createInfo->next) Argument chain does not contain any known graphics bindings
E libc++abi: terminating with uncaught exception of type std::logic_error: XrResult failure [XR_ERROR_GRAPHICS_DEVICE_INVALID]
E libc++abi: Origin: xrCreateSession(m.instance, &createInfo, &m.session)