UE 5.1 VR crashes when using planar reflection

Hi,
im trying to get planar reflections working for VR in UE 5.1, but my editor crashes as soon as the planar reflection comes into view. I created a fresh VR Template and I enabled support global clip plane in the rendering settings and restarted the engine, recompiling the shaders. I dragged in a planar reflection actor and placed it on the ground for testing. In the viewport everything behaves like expected. I also tried disabling instanced stereo, with no effect.

I get the following error:

Assertion failed: ViewIndex != INDEX_NONE [File:D:\build++UE5\Sync\Engine\Plugins\Runtime\OpenXR\Source\OpenXRHMD\Private\OpenXRHMD.cpp] [Line: 3343]

UnrealEditor_OpenXRHMD
UnrealEditor_Renderer
UnrealEditor_Renderer
UnrealEditor_RenderCore
UnrealEditor_RenderCore
UnrealEditor_RenderCore
UnrealEditor_RenderCore
UnrealEditor_Core
UnrealEditor_Core
UnrealEditor_Core
UnrealEditor_Core
UnrealEditor_Core
UnrealEditor_Core
UnrealEditor_Core
UnrealEditor_Core
kernel32
ntdll

Searching through forums planar reflections seems to not crash the editor for other people, so where did i go wrong?

2 Likes

Hi, i am also having the same issue.

I’m getting the following crash report:
[2023.03.15-22.36.54:900][501]LogWindows: Error: appError called: Assertion failed: ViewIndex != INDEX_NONE [File:D:\build++UE5\Sync\Engine\Plugins\Runtime\OpenXR\Source\OpenXRHMD\Private\OpenXRHMD.cpp] [Line: 3356]

Any help would be much appreciated

Sadly, I’m seeing the same issue as JoshHD22, OpenXRHMD.cpp Line: 3356.
I also have planar reflections in the scene that are toggled on and off as I enter/leave a trigger volume. As I enter the trigger volume, the game crashes with the assertion failed error. I’ve just upgraded the project from UE4.27.2 but I removed all the VR stuff from that project and created it anew for 5.1.1 Without planar reflection, it seems to work fine.
Planar reflections are incredibly important to the level, so I hope this can be addressed, or I’ll have to go back to 4.27.2 for now.

Hey there @bubb1eDragon @JoshHD22 and @IntelliToasters! Welcome back to the community all of you! A couple of questions for each of you!

May I know your specs/HMDs?

Does this still occur with forward rendering on/off?

How about Mobile HDR?

Did this occur with the HMD off?

I see the error’s pointing at view index for OpenXR which I assume (without looking at the source) refers to the left eye/right eye rendering. If we can gather some info, we might be able to find a common link.

Hi SupportiveEntity, thank you for reaching out. I’ve tried with both HP Reverb G2 (WMR) and with Vive Pro (Trackers) and the same thing happens on both. However, one oddity I noticed, is that if I use WMR when emulating a headset in Windows, UE5 doesn’t crash. The planar reflections turn on/off correctly when moving into the trigger volume. Might be significant, especially since there is only one ‘eye’ in the emulation? I haven’t turned forward rendering off as it will require a recompile of the shaders which takes hours, same for mobile HDR - this is switched off in my config. If it’s critical to try deferred rendering to diagnose the issue, please let me know and I’ll give it a go (and wait around while it recompiles! :slight_smile: )

Not sure if it’d be critical or a waste of your time, as it’s seemingly not a rendering issue, but more of OpenXR communication with the headset issue. I only had a hunch that it was related to an issue a user had that was breaking the OpenXR runtime somewhat similarly but with a different error. Planar reflection on the local Quest 2 here is working as intended, so it’s likely more data needed.

I also encounter the same issue

I am running on 5.1 with deferred shading (forward off)
Assertion failed: ViewIndex != INDEX_NONE [File:D:\build++UE5\Sync\Engine\Plugins\Runtime\OpenXR\Source\OpenXRHMD\Private\OpenXRHMD.cpp] [Line: 3356]

To add to this, also with forward shading it crashes with the exact same log

Reagarding this post, could you please help up to fix that issue? Our upcoming game needs planar reflections

Hey there @H4x03D! I plan to a look into the source a bit, but I’m not likely able to make a PR to correct this issue unless it’s a relatively unconnected component (and considering it’s part of the base of the plugin, probably not). Though more reporting on the matter could help it get resolved earlier!

HI! I see, thank you so much!! :slight_smile:

Hi @H4x03D , did you get this resolved? I just tested again in UE5.2 and I still get the same crashing behaviour. Seems like it’s either a deeply entrenched issue, it only happens on upgraded projects or nobody is using planar reflections in VR… I expect the last two cases are uncommon situations. I’m hoping you were able to make some progress?

EDIT: Just to be absolutely certain, I created a new VR project in UE5.2 and added a planar reflection. I did not make any other changes to the VR template instance. Pressing play in VR from the editor crashed the game with the same error:
Assertion failed: ViewIndex != INDEX_NONE [File:D:\build++UE5\Sync\Engine\Plugins\Runtime\OpenXR\Source\OpenXRHMD\Private\OpenXRHMD.cpp] [Line: 3821]

Looks like this is a bug in the OpenXR HMD driver.

3 Likes

Hi, turns out the error still exists. I’m using UE5.2 as well and on adding Planar Reflection to the scene, UE just crashes.

Assertion failed: ViewIndex != INDEX_NONE [File:D:\build++UE5\Sync\Engine\Plugins\Runtime\OpenXR\Source\OpenXRHMD\Private\OpenXRHMD.cpp] [Line: 3821]

UnrealEditor_OpenXRHMD
UnrealEditor_Renderer
UnrealEditor_Renderer
UnrealEditor_RenderCore
UnrealEditor_RenderCore
UnrealEditor_RenderCore
UnrealEditor_RenderCore
UnrealEditor_RenderCore
UnrealEditor_Core
UnrealEditor_Core
UnrealEditor_Core
UnrealEditor_Core
UnrealEditor_Core
UnrealEditor_Core
UnrealEditor_Core
UnrealEditor_Core
kernel32
ntdll

1 Like

Hey there @sinnik! Thanks for the update! Will update a report on this issue on my side!

1 Like