# Call to xrCreateActionSet returns ERROR\_VALIDATION\_FAILURE on Oculus Rift

**URL:** <https://community.khronos.org/t/call-to-xrcreateactionset-returns-error-validation-failure-on-oculus-rift/110243>\
**Category:** OpenXR\
**Created:** [November 9, 2023, 9:59pm UTC](https://community.khronos.org/t/call-to-xrcreateactionset-returns-error-validation-failure-on-oculus-rift/110243 "2023-11-09T21:59:29Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![richtea](https://community.khronos.org/letter_avatar_proxy/v4/letter/r/eada6e/32.png) [@richtea](https://community.khronos.org/u/richtea)\
**Post date:** [November 9, 2023, 9:59pm UTC](https://community.khronos.org/t/call-to-xrcreateactionset-returns-error-validation-failure-on-oculus-rift/110243/1 "2023-11-09T21:59:29Z")

</div>

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

```auto
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?

---

<div class="post-metadata">

**Author:** ![ryliepavlik](https://community.khronos.org/user_avatar/community.khronos.org/ryliepavlik/32/12972_2.png) [@ryliepavlik](https://community.khronos.org/u/ryliepavlik)\
**Post date:** [November 13, 2023, 7:08pm UTC](https://community.khronos.org/t/call-to-xrcreateactionset-returns-error-validation-failure-on-oculus-rift/110243/2 "2023-11-13T19:08:11Z")

</div>

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](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.

---

<div class="post-metadata">

**Author:** ![richtea](https://community.khronos.org/letter_avatar_proxy/v4/letter/r/eada6e/32.png) [@richtea](https://community.khronos.org/u/richtea)\
**Post date:** [November 13, 2023, 8:21pm UTC](https://community.khronos.org/t/call-to-xrcreateactionset-returns-error-validation-failure-on-oculus-rift/110243/3 "2023-11-13T20:21:19Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![richtea](https://community.khronos.org/letter_avatar_proxy/v4/letter/r/eada6e/32.png) [@richtea](https://community.khronos.org/u/richtea)\
**Post date:** [November 16, 2023, 4:19pm UTC](https://community.khronos.org/t/call-to-xrcreateactionset-returns-error-validation-failure-on-oculus-rift/110243/4 "2023-11-16T16:19:38Z")

</div>

I found my mistake, I had omitted to call

```
actionSetCreate.type$Default();

```

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

---

<div class="post-metadata">

**Author:** ![system](https://community.khronos.org/uploads/default/original/2X/b/ba89cb49313a0e869198c8be354afde8bcae027e.png) [@system](https://community.khronos.org/u/system)\
**Post date:** [May 17, 2024, 4:19pm UTC](https://community.khronos.org/t/call-to-xrcreateactionset-returns-error-validation-failure-on-oculus-rift/110243/5 "2024-05-17T16:19:56Z")

</div>

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