Segfault when MND_headless enabled and creating session with graphics binding
This can be tested by modifying the hello_vr program in Khronos' OpenXR SDK Sources repository, though I initially discovered it in my own projects.
Where the segfault occurs depends on which graphics binding is used (in client_gl_compositor_init
for OpenGL, and oxr_vk_get_physical_device
for Vulkan), at least with my build of Monado. I believe this occurs because the compositor is left uninitialized as a result of this line of code in oxr_instance_create
:
// Create the compositor, if we are not headless.
if (!inst->extensions.MND_headless) {
The OpenXR spec only says that applications that enable MND_headless
extension may (not must) omit the graphics binding, though I'm aware it seems unusual to use MND_headless
but not make a headless session.