Forum Discussion

🚨 This forum is archived and read-only. To submit a forum post, please visit our new Developer Forum. 🚨
kitotron's avatar
kitotron
Explorer
6 months ago

Can't use Meta XR Simulator with Effect Mesh building block. OverflowException. v77 with Unity 6.

Hi all,

I'm developing a mixed reality app using All in One SDK v77 with Unity 6000.0.54f1. Meta XR Simulator seems to work ok, however when I put a default Effect Mesh building block, the XR Simulator fails with an overflow exception using any one of the provided synthetic environments.

I've found that if in the Effect Mesh, under Labels, for example if I only activate the CEILING flag, it works, I can select a synthetic environment and by trial and error manage to activate some of the flags like FLOOR, WINDOW, etc. without causing the overflow exception. However, this defeats the purpose and effects of the app I'm trying to build, for example, I'm sliding the ceiling in order to display a virtual sky, however it looks all wrong if I don't enable all the flags on Effect Mesh code block.

I've tested all of the available synthetic environments but no dice, they all fail with overflow exception if all flags are enabled on the effect mesh.

On the other hand, I tried and researched how could I export the scanned data from the headset on my room as a JSON, in order to test with my own environment on the XR Simulator hoping this would prevent the overflow crash, however apparently this isn't possible anymore! there is just no way of exporting your scanned room as a JSON file. I even installed the SceneDataRecorder.apk from SDK version 65 into my headset, but this just launches the current room scanner on Quest 3, so, no JSON file is exported at all.

 I also searched for a valid JSON file of a scanned room on the internet, tried to start the JSON server, selected the JSON file, but nothing happened, the synthetic environment selected under preferences started, and proceeded to crash with the overflow exception.

Is there some way around this? or I'll just have to deal with developing using the headset all day, every day? App works fine exported to the headset.

Any help is greatly appreciated.

The exact error is the following:
OverflowException
Meta.XR.MRUtilityKit.Utilities.SetupAnchorMeshGeometry (Meta.XR.MRUtilityKit.MRUKAnchor anchorInfo, System.Boolean useFunctionalSurfaces, Meta.XR.MRUtilityKit.EffectMesh+TextureCoordinateModes[] textureCoordinateModes) (at ./Library/PackageCache/com.meta.xr.mrutilitykit@928cc60c2a92/Core/Scripts/Utilities.cs:123)
Meta.XR.MRUtilityKit.EffectMesh.CreateEffectMesh (Meta.XR.MRUtilityKit.MRUKAnchor anchorInfo) (at ./Library/PackageCache/com.meta.xr.mrutilitykit@928cc60c2a92/Core/Scripts/EffectMesh.cs:778)
Meta.XR.MRUtilityKit.EffectMesh.CreateMesh (Meta.XR.MRUtilityKit.MRUKRoom room, System.Collections.Generic.List`1[T] connectedRooms) (at ./Library/PackageCache/com.meta.xr.mrutilitykit@928cc60c2a92/Core/Scripts/EffectMesh.cs:687)
Meta.XR.MRUtilityKit.EffectMesh.CreateMesh (Meta.XR.MRUtilityKit.MRUKRoom room) (at ./Library/PackageCache/com.meta.xr.mrutilitykit@928cc60c2a92/Core/Scripts/EffectMesh.cs:655)
Meta.XR.MRUtilityKit.EffectMesh.<Start>b__30_0 () (at ./Library/PackageCache/com.meta.xr.mrutilitykit@928cc60c2a92/Core/Scripts/EffectMesh.cs:307)
UnityEngine.Events.InvokableCall.Invoke () (at <0ce54f5b9f2640ff972376aa8047c49d>:0)
UnityEngine.Events.UnityEvent.Invoke () (at <0ce54f5b9f2640ff972376aa8047c49d>:0)
Meta.XR.MRUtilityKit.MRUK.InitializeScene () (at ./Library/PackageCache/com.meta.xr.mrutilitykit@928cc60c2a92/Core/Scripts/MRUK.cs:331)
UnityEngine.Debug:LogException(Exception)
Meta.XR.MRUtilityKit.MRUK:InitializeScene() (at ./Library/PackageCache/com.meta.xr.mrutilitykit@928cc60c2a92/Core/Scripts/MRUK.cs:335)
Meta.XR.MRUtilityKit.<LoadSceneFromDeviceSharedLib>d__93:MoveNext() (at ./Library/PackageCache/com.meta.xr.mrutilitykit@928cc60c2a92/Core/Scripts/MRUK.Shared.cs:200)
System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1:SetResult(LoadDeviceResult)
Meta.XR.MRUtilityKit.<WaitForDiscoveryFinished>d__118:MoveNext() (at ./Library/PackageCache/com.meta.xr.mrutilitykit@928cc60c2a92/Core/Scripts/MRUK.Shared.cs:933)
System.Runtime.CompilerServices.MoveNextRunner:Run()
OVRTask`1:TryInvokeContinuation() (at ./Library/PackageCache/com.meta.xr.sdk.core@8e7305f79034/Scripts/Util/Async/OVRTask.cs:519)
OVRTask`1:SetResult(LoadDeviceResult) (at ./Library/PackageCache/com.meta.xr.sdk.core@8e7305f79034/Scripts/Util/Async/OVRTask.cs:547)
Meta.XR.MRUtilityKit.MRUK:OnDiscoveryFinished(MrukResult, IntPtr) (at ./Library/PackageCache/com.meta.xr.mrutilitykit@928cc60c2a92/Core/Scripts/MRUK.Shared.cs:919)
System.Object:wrapper_native_00007FFF690C2700(UInt64)
Meta.XR.MRUtilityKit.MRUK:UpdateAnchorStore() (at ./Library/PackageCache/com.meta.xr.mrutilitykit@928cc60c2a92/Core/Scripts/MRUK.Shared.cs:120)
Meta.XR.MRUtilityKit.MRUK:Update() (at ./Library/PackageCache/com.meta.xr.mrutilitykit@928cc60c2a92/Core/Scripts/MRUK.cs:734)

 

4 Replies

Replies have been turned off for this discussion
  • Alright, so I didn't manage to solve the core issue, however I did manage to get a JSON recording out of the headset, but it doesn't work at all since the room geometry is not entirely correct (only floor, walls and ceiling are correct, rest is garbage), and it still crashes with an overflow exception while using the Effect Mesh.

    For anyone interested:

    • I discovered that the SceneDataRecorder.apk was located in C:\Users\my_username\AppData\Local\MetaXR\MetaXrSimulator\77\data_recorders
    • For it to work, after installing, I had to give the installed SceneDataRecorder app write permissions, and spatial data permissions. On your headset, go to settings > privacy and security > app permissions > spatial data, storage.
    • After launching SceneDataRecorder from unknown origins, and scanning my room, a file appeared at the ROOT of the device storage, not on sdcard > android > data > com.oculus.vrshell, but on the root path (sdcard). File name is scene_recorder_out.json
    • I extracted this file using SideQuest to my computer. 
    • Then, I renamed this file myroom.json and put it on C:\Users\my_username\AppData\Local\MetaXR\MetaXrSimulator\77\config
    • There, I found 2 other JSON rooms for testing

     

    Now, for running these JSON files on the Meta XR Simulator:

    • In Unity, go to Edit > Settings > Meta XR
    • In Unity go to Meta > Meta XR Simulator > JSON Server > Launch JSON Server
    • A file dialogue will appear, go to C:\Users\my_username\AppData\Local\MetaXR\MetaXrSimulator\77\config and select one of the JSON files
    • Press play

    So, this launches the selected JSON room, however for me it still crashes with an overflow exception if I have the Effect Mesh block enabled.

    I really wish Meta would at least update their docs.

    • MetaStoreHelp's avatar
      MetaStoreHelp
      Community Manager

      Hi there Kitotron, 

       

      Thank you for bringing this to our attention. We can see that you're having some trouble with the Meta XR simulator and we're happy to help! 

       

      We have been looking into this for you and based on the issues that you're experiencing, we would recommend reaching out to our developer support team so that they can take a closer look for you. We have left a link below where you can contact them. 

       

      Developer Support. 

      • kitotron's avatar
        kitotron
        Explorer

        Hi, thanks, I've submitted a ticket via Developer Support Portal.