Forum Discussion
Criterium
8 years agoHonored Guest
OVRBoundary.GetGeometry(...) sometimes causing an error
Some of our users have reported the following error (taken from output.log) when we try to access OVRManager.boundary.GetGeometry(OVRBoundary.BoundaryType.OuterBoundary):
Which leads to our game crashing.
What could be causing this error and how could we avoid it?
These are the current versions of Unity and all Oculus related stuff:
Unity v5.5.0f3, Oculus Utilities v1.9.0, OVRPlugin v1.10.0, SDK v1.13.0.
ArgumentNullException: Argument cannot be null.
Parameter name: src
at (wrapper managed-to-native) System.Runtime.InteropServices.Marshal:copy_from_unmanaged (intptr,int,System.Array,int)
at System.Runtime.InteropServices.Marshal.Copy (IntPtr source, System.Single[] destination, Int32 startIndex, Int32 length) [0x00000] in <filename unknown>:0
at OVRBoundary.GetGeometry (BoundaryType boundaryType) [0x00000] in <filename unknown>:0 Which leads to our game crashing.
What could be causing this error and how could we avoid it?
These are the current versions of Unity and all Oculus related stuff:
Unity v5.5.0f3, Oculus Utilities v1.9.0, OVRPlugin v1.10.0, SDK v1.13.0.
5 Replies
Replies have been turned off for this discussion
- kerskMeta EmployeeHeya, thanks for reporting this.
It looks like this occurs when a user does not have a boundary configured through the Oculus setup process. This results in a 0 point boundary, which then leads to the null ref here when we're trying to Marshal.Copy data from IntPtr.Zero. This will be fixed in the next release, Oculus Utilities v1.15.0. You should also be able to work around this in v1.9.0 by checking if the user's boundary is configured first, like this:if (OVRManager.boundary.GetConfigured()){Vector3[] points = OVRManager.boundary.GetGeometry(OVRBoundary.BoundaryType.OuterBoundary);
} - CriteriumHonored GuestWonderful. Thanks for the quick answers!
- CriteriumHonored GuestOne short follow up question. Is it possible to reset the boundaries configured in the Guardian System so it is unconfigured? I wanted to re-produce this bug by emulating a user that hasn't configured his boundaries.
I've tried reinstalling the Oculus client and deleting all Oculus related folders to no avail, the boundaries in the Guardian System are always configured when I boot up the Oculus client. - kerskMeta EmployeeIn the desktop Oculus app, go to Settings -> Devices -> Configure Rift -> Sensor Setup. Then proceed through until the first screen asking to setup the boundaries and then select skip. The earlier sensor setup phase wipes out any existing boundaries, and then skipping out of the boundary config phase early leaves them unconfigured.
- CriteriumHonored GuestAgain, thanks for the swift answer.
Was able to reset the boundaries as you described and re-produce the bug.
Quick Links
- Horizon Developer Support
- Quest User Forums
- Troubleshooting Forum for problems with a game or app
- Quest Support for problems with your device
Other Meta Support
Related Content
- 4 years ago