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

Need better error message when SteamVR does not support request API version #74

Open
tomgoddard opened this issue Jan 30, 2020 · 5 comments
Assignees
Milestone

Comments

@tomgoddard
Copy link

The error message when pyopenvr fails to connect to SteamVR because an API version is not available should be more informative. Currently it says

VRInitError_Init_InterfaceNotFound (error number 105)

With this message it is not even clear that this is a software API issue -- my immediate thought was it was a hardware connection problem. It took 30 minutes of poking around to hit on the fact that SteamVR needed updating. The error message should say:

"The installed SteamVR runtime could not provide version IVRCompositor_024 requested by pyopenvr. You may need to update SteamVR. VRInitError_Init_InterfaceNotFound (error number 105)"

Even better if you could add "the installed SteamVR runtime provides version IVRCompositor_022".

The actual error came from this pyopenvr/init.py

    version_key = IVRCompositor_Version
    if not isInterfaceVersionValid(version_key):
        _checkInitError(VRInitError_Init_InterfaceNotFound)

So the information about the detailed cause of the error is available and should be reported. All uses of _checkInitError() are currently throwing away information about the cause of the error which makes for debugging nightmares.

After updating pyopenvr to 1.9.1601 in my ChimeraX app it failed to connect to SteamVR with an error message "VRInitError_Init_InterfaceNotFound (error 105)". The trouble was that my SteamVR had not been updated to 1.9.16 because I had not started Steam this month. For my customers it is not unusual that SteamVR will rarely be updated because they do not ever use Steam, and only use SteamVR when started by other apps. So having a good error message is very important. I will of course catch the pyopenvr error, check its test and add to the description that SteamVR probably needs to be updated. But it is still very important that pyopenvr not discard information about the cause of the error.

@cmbruns
Copy link
Owner

cmbruns commented Jan 30, 2020

Good investigation. I agree that a better error message would be useful here.

@cmbruns
Copy link
Owner

cmbruns commented Mar 28, 2020

Fixed in release 1.10.3001 https://github.com/cmbruns/pyopenvr/releases/tag/1.10.3001
But I did not add the additional message "the installed SteamVR runtime provides version IVRCompositor_022" information because that would be trickier.

@tomgoddard
Copy link
Author

tomgoddard commented Mar 28, 2020 via email

@cmbruns
Copy link
Owner

cmbruns commented Mar 28, 2020

@tomgoddard I did not actually test that it works as desired, because my SteamVR runtime is already beyond the SDK version. Please keep me informed if you notice it working correctly or otherwise.

@tomgoddard
Copy link
Author

tomgoddard commented Mar 28, 2020 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants