Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash on xrCreateSession #447

Closed
BanTheRewind opened this issue Dec 21, 2023 · 3 comments
Closed

Crash on xrCreateSession #447

BanTheRewind opened this issue Dec 21, 2023 · 3 comments
Labels
synced to gitlab Synchronized to OpenXR internal GitLab

Comments

@BanTheRewind
Copy link

I'm on Windows 11, VS2022, latest Oculus app with Quest 3 over Quest Link (Windows build, not Android atm). Using Vulkan for graphics. RTX 3080 and overall up-to-date machine. I pulled down the repo today, so the code is current.

I get a crash when I call xrCreateSession, specifically inside this method...:

extern "C" LOADER_EXPORT XRAPI_ATTR XrResult XRAPI_CALL xrCreateSession(
    XrInstance                                  instance,
    const XrSessionCreateInfo*                  createInfo,
    XrSession*                                  session) XRLOADER_ABI_TRY {
    LoaderInstance* loader_instance;
    XrResult result = ActiveLoaderInstance::Get(&loader_instance, "xrCreateSession");
    if (XR_SUCCEEDED(result)) {
        result = loader_instance->DispatchTable()->CreateSession(instance, createInfo, session);
    }
    return result;
}
XRLOADER_ABI_CATCH_FALLBACK

It crashes at loader_instance->DispatchTable()->CreateSession(instance, createInfo, session);

Inspecting the loader_instance, it appears that _messenger is null and loader_instance is 0. All other members appear to be valid. The arguments I'm passing in are also valid, and I am successfully calling xrGetVulkanGraphicsRequirements2KHR before creating the session. The SDK is working otherwise. It connects to OpenXR when Oculus is running, and it appears to detect HMD changes. Once the HMD is ready to connect, it crashes after doing all the expected prep.

Here is the actual exception.

Exception thrown at 0x00007FFC1CAE077F (LibOVRRT64_1.dll) in MyApp.exe: 0xC0000005: Access violation reading location 0xFFFFFFFFFFFFFFFF.
@rpavlik-bot
Copy link
Collaborator

An issue (number 2178) has been filed to correspond to this issue in the internal Khronos GitLab (Khronos members only: KHR:openxr/openxr#2178 ), to facilitate working group processes.

This GitHub issue will continue to be the main site of discussion.

@rpavlik-bot rpavlik-bot added the synced to gitlab Synchronized to OpenXR internal GitLab label Jan 3, 2024
@johnkearney
Copy link

@BanTheRewind This is going to be very difficult to debug without some example code. I would suspect that you are hitting some crash related to Vulkan initialization (similar to https://communityforums.atmeta.com/t5/OpenXR-Development/Nullpointer-crash-during-xrCreateSession-inside-oculus-drivers/td-p/1073890) - but without full sample code / a sample binary it is difficult to be sure.

@BanTheRewind
Copy link
Author

You are correct. I figured it out. I lost track of this issue, but meant to close it once I had solved it. The notification from your reply led me back here. Closing now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
synced to gitlab Synchronized to OpenXR internal GitLab
Projects
None yet
Development

No branches or pull requests

3 participants