Call to xrCreateActionSet returns ERROR_VALIDATION_FAILURE on Oculus Rift

I have a user reporting that when xrCreateActionSet is called it returns ERROR_VALIDATION_FAILURE.

The general OpenXR is working for them (a pure visual test application works for them) but this first step to registering action sets fails.

I am using LWJGL so this code is java but it’s a very thin layer to the underlying api

XrActionSetCreateInfo actionSetCreate = XrActionSetCreateInfo.create();
actionSetCreate.actionSetName(stringToByte("main"));
actionSetCreate.localizedActionSetName(stringToByte("Main Actions"));
actionSetCreate.priority(1);

PointerBuffer actionSetPointer = BufferUtils.createPointerBuffer(1);
int response = XR10.xrCreateActionSet(xrInstance, actionSetCreate, actionSetPointer);
// response is -1 aka ERROR_VALIDATION_FAILURE 

The call succeeds on my development environment (A Quest 2 running a SteamVR runtime) but fails for their system (an oculus rift CV1 running the Oculus runtime).

Does anyone have any idea what could be causing the call to xrCreateActionSet to return ERROR_VALIDATION_FAILURE on one system but not another?

You could try the validation layer, though it’s not perfect. The things that may cause validation failure are the valid usage and the adjacent text.

https://registry.khronos.org/OpenXR/specs/1.0/html/xrspec.html#xrCreateActionSet

Effectively, all this one says is the input must be valid. The input requirements look pretty straightforward too. You might consider using the API dump layer to see what your binding is actually sending, since my assumptions based on what your code looks like, would suggest it is right.

Is that validation layer “XR_APILAYER_LUNARG_core_validation”. That is sadly not available on the users system (I can see it try and fail to apply that layer in the logs).

Effectively, all this one says is the input must be valid. The input requirements look pretty straightforward too.

Indeed, the call is so simple (and succeeds on other devices).

A thought I had wondered about, could the entirety of the actions part of the API just be not implemented on their system; the Rift is an old device. The camera set up bit all succeeds but this is the very first call that is action related.

I found my mistake, I had omitted to call

actionSetCreate.type$Default();

Now I’m surprised it worked on my system without that

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.