Using "Get VR Focus State" works in PIE but crashes standalone game

(Found using UE 4.12.5)

Using “Get VR Focus State” works in PIE but crashes standalone game.

To recreate this issue, open the level blueprint and add nodes as shown below. The map will play fine in PIE but crash if run in standalone mode.

With the help of some nice folk at #programming on unrealslackers.slack.com I did some debugging and found the source.

In the file…
\Source\Runtime\Engine\Private\HeadMountedDisplayFunctionLibrary.cpp

HMDDevice is null. Granted there is a warning that VR is not supported in standalone mode but I imagine you would want to do something other than have the engine just crash with no logged error like it does in this case.

Hello tmek,

I was unable to reproduce this issue on our end. I have a few questions for you that will help narrow down what issue it is that you are experiencing.

Quick questions:

  1. What VR device are you using when the crash occurs?
  2. Could you provide your complete callstack?
  3. Does the crash occur without an HMD device in use/turned on?

Hi Rudy,

  1. I’m using a CV1 (but someone with a on their system also had the crash occur when I asked them to test it)

  2. (Call stack attached)

  3. I completely unplugged the HMD from my system and UE4 did NOT crash.

(Also just wanted to reiterate that the crash Only occurs when you launch the game in Standalone mode from the UE4 editor.)

link text

Hello tmek,

After further testing I was able to reproduce this issue on our end. I have written up a report and I have submitted it to the developers for further consideration. I have provided a link the report below. Please feel free to visit the link for future updates.

Link: Unreal Engine Issues and Bug Tracker (UE-33830)

Make it a great day