Skip to content
This repository was archived by the owner on Jun 10, 2022. It is now read-only.

MRE timeouts will affect other objects in scene #251

Open
stephenc87 opened this issue Mar 26, 2021 · 1 comment
Open

MRE timeouts will affect other objects in scene #251

stephenc87 opened this issue Mar 26, 2021 · 1 comment

Comments

@stephenc87
Copy link

If there is an issue loading elements inside an MRE then other objects will affected and may not instantiate inside scene
Was able to reproduce this issue inside a TestBed, used an MRE I found online "ws://piano.norybiak.com" and duplicated 8 MicroAppRoot objects pointing to the server

Loading the Piano once will store it in cache and scene will continue to instantiate other objects on failure
Clearing cache may be necessary for reproducing error

Logs will fill with Timeout errors, and other objects will fail to be instantiated in to the scene in an unreliable manner

Here is a preview of the last error message, others are fairly similar

TimeoutException: Failed to acquire exclusive loading rights for http://piano.norybiak.com/notes/108.ogg
MixedRealityExtension.Assets.AssetFetcher`1+d__1[T].MoveNext () (at <16e38f6fcabd4ab4a3262f081b6e2453>:0)
--- End of stack trace from previous location where exception was thrown ---
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () (at :0)
System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) (at :0)
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) (at :0)
System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) (at :0)
System.Runtime.CompilerServices.TaskAwaiter`1[TResult].GetResult () (at :0)
MixedRealityExtension.Assets.AssetLoader+d__13.MoveNext () (at <16e38f6fcabd4ab4a3262f081b6e2453>:0)
--- End of stack trace from previous location where exception was thrown ---
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () (at :0)
System.Runtime.CompilerServices.AsyncMethodBuilderCore+<>c.b__6_0 (System.Object state) (at :0)
UnityEngine.UnitySynchronizationContext+WorkRequest.Invoke () (at :0)
UnityEngine.UnitySynchronizationContext:ExecuteTasks()

@stephenc87
Copy link
Author

stephenc87 commented Jul 19, 2021

Changing
private void StartApp() { Debug.Log("Starting MRE app."); MREComponent?.EnableApp() _running = true; }
to
private async void StartApp() { Debug.Log("Starting MRE app."); await MREComponent?.EnableApp() _running = true; }
in LaunchMRE.cs appears to help resolve the issue

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant