Announcement

Collapse
No announcement yet.

OVRQUITMENU command results in application crash [UE 4.17.2]

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    [GEAR VR] OVRQUITMENU command results in application crash [UE 4.17.2]

    Hi!

    Me and my team has just got back the results from the technical review that oculus have done for our game. We passed 34/35 tests and the one we failed was the behavior of back button short press.

    So I have tried to fix this but encountered an issue with the console command OVRQUITMENU which i use to open the "Exit to Oculus Home" screen on back button short press from our main menu. It works fine when you first enter the main menu scene but if you then start the game and go back to the main menu scene the game will crash once you press the back button again. The game is one scene and the menu is another so it seems that this issue arises after a scene transition has taken place.

    I will link to my post in the oculus forums where the full log is (too large to upload here). I have also attached an image of the blueprint code I use for running the OVRQUITMENU command. We are using Unreal engine 4.17.2.

    Does anyone have an idea what might be causing this crash? Or is there a better way to do this?

    My post at the oculus forums: https://forums.oculusvr.com/develope...-4-17-2#latest

    #2
    This issue has been resolved.

    The fix was to modify the function FOculusHMD::PreRenderViewFamily_RenderThread in OculusHMD.cpp by adding
    FAndroidApplication::GetJavaEnv(); before StartRHIFrame_RenderThread();

    This means you must have the Unreal Engine source code in order for the modification to take effect.

    Comment


      #3
      I'd like to chime in.

      I am having this exact issue on happen with my game on 4.18.3.
      It's causing me to fail submission on the Oculus Store.
      This is the only place I've found anywhere that talks about this specific issue, so I'd like some clarification on what your experiences were with this.

      I looked at my version of FOculusHMD::PreRenderViewFamily_RenderThread in OculusHMD.cpp,
      and it appears that the line you say to add is already there as the else of a #if !Android, so it should be activating. It's possible this got updated to include this some time between 4.17.2 and 4.18.3
      I do not have access to compiling code, as I'm using 4.18.3 available from the stock Unreal Launcher.

      Questions:
      - Is there a difference between using OVRQUITMENU and vr.oculus.ShowQuitMenu? They seem to be identical. I'm using vr.oculus.ShowQuitMenu since it's from a more recent refactor/update of VR Related console commands.
      - Did you use the vr.oculus.HandleBackButton command anywhere? It seems odd to me that Long Press inherently works with no setup (I hear this wasn't always the case), but the short press does not.
      - How do you transition your levels? Meaning, with the Open Level action in a blueprint, do you use any options? Is "Absolute" True?
      - Did you ever have any crashes with the Long Press? I didn't, but just want to compare.

      With my current setup, I only allow the Back Button to bring up the OVRQuitMenu while the Player is in my initial LoadIn Level. If they pres it any other time, it opens a custom made UI dialog widget that asks them if they wish to return to the Main Menu (Yes or No buttons). It's a work around to prevent the crash, because it seemed like as you noticed it crashed after a level transition (although it was not 100% for me). I've never had it crash while in my first level, and it meets the TRC requirement of "the Back Button always retreats one menu".
      Thankfully according to Oculus this is acceptable behavior, but for them they claim it still crashes 100% when they try to access the OVRQuitMenu after returning to my LoadIn level.

      I've included the crash log I got from when it was crashing for me, before my attempted fix which works for me but not Oculus Submission testing.
      I don't really know what to do here.
      Attached Files

      Comment


        #4
        It's been a bit, but wanted to post an update.
        I finally finally got this working for me, and passed Oculus submission!!

        Turns out I had to switch back to ANT from Gradle.
        Don't really know why this fixed it, but I saw this post saying it was bad to have multiple instances libOVRPlugin.so files in various directories, in particular the Assets/Plugins directories.
        https://forums.oculusvr.com/develope...k-as-requested

        I noticed that when I built with Gradle, I had multiple instances of the libOVRPlugin.so in several directories.
        Switched from ANT to Gradle, just to see what would happen, and I only had 1 libOVRPlugin.so.
        So gave it another submission attempt, and for some reason it passed the OVRQUITMENU crash I was failing on. I don't really understand it, but I'll take the win.

        In case anyone is interested, this is the project I've been working on:
        https://www.oculus.com/experiences/g...5279625876291/

        There is a Daydream version too:
        https://play.google.com/store/apps/d...ToLumaVR&hl=en

        Just gotta say, this site is a great resource for trouble shooting very specific issues. Always good to know we aren't alone with our problems!
        Thanks for all the help I've gotten.

        Comment

        Working...
        X