WEKIT-ECS / MIRAGE-XR

MirageXR is a reference implementation of an XR training system. MirageXR enables experts and learners to share experience via XR and wearables using ghost tracks, realtime feedback, and anchored instruction.
Other
28 stars 4 forks source link

Tapping 'home' too fast triggers error in local save #1745

Open fwild opened 5 months ago

fwild commented 5 months ago

The following was flagged during my testing activity. It can be reproduced by:

  1. add new activity
  2. add three steps
  3. add 3D model of apple to one step and
  4. quickly tap home, while it still is saving the 3D model: the two save processes are interfering?
[ERROR] Error when saving activity: System.IO.IOException: Sharing violation on path /storage/emulated/0/Android/data/com.WEKIT.MirageXR/files/session-2024-02-06_13-22-15-activity.json
  at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, System.Int32 bufferSize, System.Boolean anonymous, System.IO.FileOptions options) [0x00000] in <00000000000000000000000000000000>:0 
  at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, System.Int32 bufferSize, System.IO.FileOptions options) [0x00000] in <00000000000000000000000000000000>:0 
  at System.IO.StreamWriter..ctor (System.String path, System.Boolean append, System.Text.Encoding encoding, System.Int32 bufferSize) [0x00000] in <00000000000000000000000000000000>:0 
  at System.IO.File.WriteAllText (System.String path, System.String contents) [0x00000] in <00000000000000000000000000000000>:0 
  at MirageXR.ActivityLocalFiles.SaveData (MirageXR.Activity activity) [0x00000] in <00000000000000000000000000000000>:0 
  at UnityEngine.Events.UnityEvent.Invoke () [0x00000] in <00000000000000000000000000000000>:0 
  at Microsoft.MixedReality.Toolkit.UI.BoundsControl.BoundsControl.DropController () [0x00000] in <00000000000000000000000000000000>:0 
  at Microsoft.MixedReality.Toolkit.UI.BoundsControl.BoundsControl.OnPointerUp (Microsoft.MixedReality.Toolkit.Input.MixedRealityPointerEventData eventData) [0x00000] in <00000000000000000000000000000000>:0 
  at UnityEngine.Events.UnityEvent`1[T0].Invoke (T0 arg0) [0x00000] in <00000000000000000000000000000000>:0 
  at Microsoft.MixedReality.Toolkit.Input.PointerHandler.Microsoft.MixedReality.Toolkit.Input.IMixedRealityPointerHandler.OnPointerUp (Microsoft.MixedReality.Toolkit.Input.MixedRealityPointerEventData eventData) [0x00000] in <00000000000000000000000000000000>:0 
  at UnityEngine.EventSystems.ExecuteEvents.Execute[T] (UnityEngine.GameObject target, UnityEngine.EventSystems.BaseEventData eventData, UnityEngine.EventSystems.ExecuteEvents+EventFunction`1[T1] functor) [0x00000] in <00000000000000000000000000000000>:0 
  at UnityEngine.EventSystems.ExecuteEvents.ExecuteHierarchy[T] (UnityEngine.GameObject root, UnityEngine.EventSystems.BaseEventData eventData, UnityEngine.EventSystems.ExecuteEvents+EventFunction`1[T1] callbackFunction) [0x00000] in <00000000000000000000000000000000>:0 
  at Microsoft.MixedReality.Toolkit.Input.MixedRealityInputSystem.DispatchEventToObjectFocusedByPointer[T] (Microsoft.MixedReality.Toolkit.Input.IMixedRealityPointer mixedRealityPointer, Microsoft.MixedReality.Toolkit.Input.BaseInputEventData baseInputEventData, System.Boolean modalEventHandled, UnityEngine.EventSystems.ExecuteEvents+EventFunction`1[T1] eventHandler) [0x00000] in <00000000000000000000000000000000>:0 
  at Microsoft.MixedReality.Toolkit.Input.MixedRealityInputSystem.HandlePointerEvent[T] (UnityEngine.EventSystems.BaseEventData eventData, UnityEngine.EventSystems.ExecuteEvents+EventFunction`1[T1] eventHandler) [0x00000] in <00000000000000000000000000000000>:0 
  at Microsoft.MixedReality.Toolkit.Input.MixedRealityInputSystem.RaisePointerUp (Microsoft.MixedReality.Toolkit.Input.IMixedRealityPointer pointer, Microsoft.MixedReality.Toolkit.Input.MixedRealityInputAction inputAction, Microsoft.MixedReality.Toolkit.Utilities.Handedness handedness, Microsoft.MixedReality.Toolkit.Input.IMixedRealityInputSource inputSource) [0x00000] in <00000000000000000000000000000000>:0 
  at Microsoft.MixedReality.Toolkit.Input.BaseControllerPointer.OnDisable () [0x00000] in <00000000000000000000000000000000>:0 
  at Microsoft.MixedReality.Toolkit.Input.BaseInputDeviceManager.RecyclePointers (Microsoft.MixedReality.Toolkit.Input.IMixedRealityInputSource inputSource) [0x00000] in <00000000000000000000000000000000>:0 
  at Microsoft.MixedReality.Toolkit.Input.UnityInput.UnityTouchDeviceManager.RemoveTouchController (UnityEngine.Touch touch) [0x00000] in <00000000000000000000000000000000>:0 
  at Microsoft.MixedReality.Toolkit.Input.UnityInput.UnityTouchDeviceManager.Update () [0x00000] in <00000000000000000000000000000000>:0 
  at Microsoft.MixedReality.Toolkit.BaseDataProviderAccessCoreSystem.Update () [0x00000] in <00000000000000000000000000000000>:0 
  at Microsoft.MixedReality.Toolkit.MixedRealityToolkit.ExecuteOnAllServicesInOrder (System.Action`1[T] execute) [0x00000] in <00000000000000000000000000000000>:0 
  at Microsoft.MixedReality.Toolkit.MixedRealityToolkit.UpdateAllServices () [0x00000] in <00000000000000000000000000000000>:0 
fwild commented 5 months ago

Happened twice during my short testing activity