Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
3
Question by Mammoth_VR · May 03, 2017 at 11:40 AM · vrcrashopengl

Switching VR platforms via VRSettings

We're trying to create an app (iOS and Android) that is able to swap between Cardboard and Gyroscope control. We're doing this via a script that looks like this:

(Based on the script found in the VRSettings.LoadDeviceByName documentation.)

 IEnumerator LoadDevice(string newDevice)
     {
         VRSettings.LoadDeviceByName(newDevice);
         yield return null;
         if (!(newDevice == string.Empty)) { 
         VRSettings.enabled = true;
         }
         else
         {
             VRSettings.enabled = false;
         }
     }

However we're encountering some problems with loading new devices. We're swapping the devices using a toggle script, and running the above as a Coroutine. What's been happening is on the first toggle, GoogleVR gives some errors:

 05-01 10:57:21.845  7774  7774 E Unity   : Error trying to call delegated method unload. null
 05-01 10:57:21.846  7774  7774 E Unity   : Google VR Error [Cardboard]: Exception caught while loading GoogleVR. Attempt to invoke virtual method 'java.lang.Object com.unity3d.player.l.a(java.lang.String, java.lang.Object[])' on a null object reference
 05-01 10:57:21.846  7774  7800 E Unity   : Google VR Error [Cardboard]: Google VR had a fatal issue while loading. VR will not be available.

The app functions as expected, just without a cardboard viewer. However, if you toggle back to gyro controls and then back to cardboard, it shows the expected cardboard viewer, but unity now spams this error to the console:

 05-01 11:00:41.160  7774  7800 E Unity   : OPENGL NATIVE PLUG-IN ERROR: GL_INVALID_VALUE: Numeric argument out of range
 05-01 11:00:41.160  7774  7800 E Unity   :
 05-01 11:00:41.160  7774  7800 E Unity   : (Filename: ./Runtime/GfxDevice/opengles/GfxDeviceGLES.cpp Line: 366)

After a few seconds of this, the application quits without an error code or a "App stopped unexpectedly" window. We are not using any custom plugins and are not using the GoogleVR Unity plugin as the native plugin performs all the functions we need it to (Additionally we did install the GoogleVR Plugin to see if it would fix our issues, it did not). Any help at all would be great, thanks.

Comment
Add comment · Show 2
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image jlfreund · May 23, 2017 at 02:51 PM 0
Share

I'm getting the same problem. I'm running Unity 5.6.0f3 Personal (64bit) on Windows 10. I created my very first Hello World Gvr$$anonymous$$ain Daydream app with a grand total of around 10 lines of code to create a handful of prefab geometry.

The app runs fine on Android 7.1 PixelXL for about 10 seconds while spam$$anonymous$$g the following error message, and then it freezes (but I didn't see the Android crash dialog).

 05-20 18:49:04.335  1101  6414 I nanohub : queueFlush: sensor=49, handle=41
 05-20 18:49:04.344  6698  6733 W Adreno-GSL: <gsl_ldd_control:477>: ioctl fd 44 code 0xc0140933 (IOCTL_$$anonymous$$GSL_TI$$anonymous$$ESTA$$anonymous$$P_EVENT) failed: errno 24 Too many open files
 05-20 18:49:04.344  6698  6733 W Adreno-GSL: <ioctl_kgsl_syncobj_create:3269>: (2d, 15, 26152) fail 24 Too many open files
 05-20 18:49:04.345  6698  6733 E Unity   : OPENGL NATIVE PLUG-IN ERROR: GL_INVALID_VALUE: Numeric argument out of range
 05-20 18:49:04.345  6698  6733 E Unity   :
 05-20 18:49:04.345  6698  6733 E Unity   : (Filename: ./Runtime/GfxDevice/opengles/GfxDeviceGLES.cpp Line: 366)
 05-20 18:49:04.345  6698  6733 E Unity   :
 05-20 18:49:04.348  1101  6414 I nanohub : queueFlush: sensor=50, handle=42
 05-20 18:49:04.354  6698  6733 E Surface : dequeueBuffer: IGraphicBufferProducer::requestBuffer failed: -2147483646
 05-20 18:49:04.354  6698  6733 I Adreno  : DequeueBuffer: dequeueBuffer failed
 05-20 18:49:04.363  6698  6733 I Unity   : NullReferenceException: Object reference not set to an instance of an object
 05-20 18:49:04.363  6698  6733 I Unity   :   at StereoController.OnPreCull () [0x00000] in <filename unknown>:0
 05-20 18:49:04.363  6698  6733 I Unity   :
 05-20 18:49:04.363  6698  6733 I Unity   : (Filename:  Line: -1)
 05-20 18:49:04.363  6698  6733 I Unity   :
 05-20 18:49:04.374  1101  1403 D ActivityRecognitionHAL: OnFlush published

avatar image taxvi · May 25, 2017 at 07:07 PM 0
Share

@jlfreund I've converted your answer to a comment (I can't remove it), you can remove your other comment, I guess... this is confusing :/

0 Replies

· Add your reply
  • Sort: 

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

6 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

[VR] Failed to load OVRPlugin.dll 3 Answers

gpus_ReturnNotPermittedKillClient crashes on iOS 1 Answer

Play video using native code in Unity3d via NDK 0 Answers

How Texture2D.CreateExternalTexture works with Direct3D11? 1 Answer

when XR settings is enabled and cardboard is added to list, loadImage() functions crashes app when PNG is loaded 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges