Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

iOS GVR App (GVR 1.40) Crashes when Virtual Reality Support enabled

Discussion in 'AR/VR (XR) Discussion' started by SvenR, May 3, 2017.

  1. SvenR

    SvenR

    Joined:
    Feb 2, 2015
    Posts:
    5
    Hi together,

    I hope you can help me, I have a problem with a little 360° Virtual Reality Player I made with Unity 5.6 f03 for Cardboard.

    I use one scene as navigation and other scenes where 5 diffrent movies are played in a sphere. I change the scenes with a small UI and with a script on a Button:
    SceneManager.LoadScene(sceneName, LoadSceneMode.Single);

    I imported the GVR SDK 1.40 and I use the GvrViewerMain, GvrEventSystem, GvrRecticlePointer from the SDK in my scenes for virtual reality.

    On Android it works fine, but I unfortunately have a probleme with the app on iOS. Under iOS the app crashes when I click a button to change the scene. Xcode tells me:
    Thread 1: EXC_BAD_ACCESS(code=1, address=0xd8)

    If I deactivate the "Virtual Reality Support" in Unitys Player Settings the app does not crash and the scene change works fine, but I have no virtual reality of course.

    Can someone help to solve this problem? I already work for some days on this issue but I don't have an idea why this happens.

    Greetings
    Sven
     
  2. joejo

    joejo

    Unity Technologies

    Joined:
    May 26, 2016
    Posts:
    958
    Can you provide more details on the crash log beyond just the bad access? You might also want to try to build a debug build to see if you can get anymore information.

    If none of that helps can you do the following:
    1. Make a copy of your project folder
    2. Open that copy in Unity and remove anything at all that does not pertain to the repro problem. Delete assets, remove unnecessary scenes, remove unnecessary game objects, etc. This will allow us to focus on the issue more quickly. It may also have the side benefit of pointing the root cause of the issue out to you that you didn't see before.
    3. Close Unity.
    4. In that copy delete everything but Assets and ProjectSettings
    5. Zip up the copy and post it with a reply to this thread.
     
  3. mattSydney

    mattSydney

    Joined:
    Nov 10, 2011
    Posts:
    171
    Are you changing VR Settings from enabled to disabled? I noticed that if one scene had VRSettings set to true or false and you changed them in the next scene it crashed on iOS. However if I set the VR settings on and off in the same scene the crash did not occur. This issue does not happen on Android.
     
  4. joejo

    joejo

    Unity Technologies

    Joined:
    May 26, 2016
    Posts:
    958
    @mattSydney Can you file a bug with a small repro project and report the case id here?
     
  5. MrWidget

    MrWidget

    Joined:
    Nov 3, 2014
    Posts:
    1
    I have the same problem.

    I made a new project, Imported the latest cardboardSDK, then create a small script to load the included VideoDemo after the GVRDemo. Crash.
     
  6. mattSydney

    mattSydney

    Joined:
    Nov 10, 2011
    Posts:
    171
  7. joejo

    joejo

    Unity Technologies

    Joined:
    May 26, 2016
    Posts:
    958