Search Issue Tracker

Fixed

Fixed in 1.5.0

Votes

0

Found in [Package]

1.4.3

1.5.0

Issue ID

MARS-1438

Regression

No

MARS crash during AR Simulation

Package: MARS

-

+Synopsis+
Using the Normal Meshes scene in the AR Foundation Samples project, entering AR Simulation mode crashes the Editor if MARS is installed. Removing MARS enables the scene to run in AR Simulation mode without crashing. See Stack Trace below. 

 

This is not a regression.  In addition to the current configuration below, the crash also occurs using released MARS 1.4.2 with released AR Foundation 5.0.0-pre.12.

 

+Configuration+
Unity 2022.2.0a19
AR Foundation 5.0.0-pre.13
MARS 1.4.3
Built-in RP
MacBook Pro
MacOS 12.4

 

+To See The Bug+
Use Unity 2022.2.0a19 to open the repro project (see attached).
When prompted, open Content Manager.
Project Settings > XR Plug-in Management > disable MARS Simulation.
Project Settings > XR Plug-in Management > enable XR Simulation.
Open Assets/Scenes/Meshing/NormalMeshes.
Window > XR > AR Foundation > AR Environment.
Click the Play button to enter AR Sim.
Unity crashes. This is the bug.
Launch Unity and open the scene again.
In Package Manager remove Unity MARS, Unity MARS AR Foundation, and Unity MARS Nav Mesh.
Window > XR > AR Foundation > AR Environment.
Click the Play button to enter AR Sim.
This time Unity does not crash. This is a clue.

 

+Stack Trace+
Obtained 33 stack frames.
#0 0x00000148086f2f in MARSMeshingProvider::AddOrUpdateMesh16(UnityXRMeshId, int, float const*, float const*, int, unsigned short const*)
#1 0x0000014808723e in MARSXRSubsystem_AddOrUpdateMesh
#2 0x000001760204ca in (wrapper managed-to-native) Unity.MARS.XRSubsystem.MeshSubscriber:AddMesh (ulong,ulong,int,void*,void*,int,void*,bool) [

{0x7f8bb2fda7f0}

+ 0xca] (0x176020400 0x176020563) [0x14dac2a80 - Unity Child Domain]
#3 0x0000017601d393 in Unity.MARS.XRSubsystem.MeshSubscriber:MeshAddedOrUpdated (Unity.MARS.Data.MRMesh) [

{0x7f8bb2fd9c20}

+ 0x563] [/Users/dennisd/Documents/Unity Projects/2022.2/ARF_5pre13_BIRP/samples/Library/PackageCache/com.unity.mars-ar-foundation-providers@1.4.3-preview.1/Editor/MARSXRSubsystem/MeshSubscriber.cs :: 69u] (0x17601ce30 0x17601dd9b) [0x14dac2a80 - Unity Child Domain]
#4 0x0000017601cab1 in Unity.MARS.Providers.Synthetic.SimulatedMeshSnapshotProvider:AddMRMesh (UnityEngine.Mesh,string) [

{0x7f8c67b02600}

+ 0x391] [/Users/dennisd/Documents/Unity Projects/2022.2/MARS/NormalMeshCrash/Library/PackageCache/com.unity.mars@1.4.3-preview.1/Runtime/Scripts/Providers/SimulatedProviders/SimulatedMeshSnapshotProvider.cs :: 323u] (0x17601c720 0x17601cae3) [0x14dac2a80 - Unity Child Domain]
#5 0x0000017601b7f3 in Unity.MARS.Providers.Synthetic.SimulatedMeshSnapshotProvider:AddMeshesWithClassification (System.Collections.Generic.List`1<UnityEngine.MeshFilter>,UnityEngine.Matrix4x4,Unity.MARS.Simulation.Rendering.XRayRegion,string,Unity.MARS.Simulation.SimulatedMeshingSettings) [

{0x7f8c67b02588}

+ 0xa13] [/Users/dennisd/Documents/Unity Projects/2022.2/MARS/NormalMeshCrash/Library/PackageCache/com.unity.mars@1.4.3-preview.1/Runtime/Scripts/Providers/SimulatedProviders/SimulatedMeshSnapshotProvider.cs :: 213u] (0x17601ade0 0x17601b911) [0x14dac2a80 - Unity Child Domain]
#6 0x0000017601a943 in Unity.MARS.Providers.Synthetic.SimulatedMeshSnapshotProvider:AddMeshes (UnityEngine.GameObject) [

{0x7f8c67b02560}

+ 0x923] [/Users/dennisd/Documents/Unity Projects/2022.2/MARS/NormalMeshCrash/Library/PackageCache/com.unity.mars@1.4.3-preview.1/Runtime/Scripts/Providers/SimulatedProviders/SimulatedMeshSnapshotProvider.cs :: 135u] (0x17601a020 0x17601aac8) [0x14dac2a80 - Unity Child Domain]
#7 0x0000017601a013 in Unity.MARS.Providers.Synthetic.SimulatedMeshSnapshotProvider/<>c_{_}DisplayClass24_0:<OnEnvironmentReady>b{_}_0 () [

{0x7f8c6497fe10}

+ 0x23] [/Users/dennisd/Documents/Unity Projects/2022.2/MARS/NormalMeshCrash/Library/PackageCache/com.unity.mars@1.4.3-preview.1/Runtime/Scripts/Providers/SimulatedProviders/SimulatedMeshSnapshotProvider.cs :: 78u] (0x176019ff0 0x17601a01c) [0x14dac2a80 - Unity Child Domain]
#8 0x00000175f3a50e in (wrapper runtime-invoke) object:runtime_invoke_void (object,intptr,intptr,intptr) [

{0x7f8bb306dd50}

+ 0x7e] (0x175f3a490 0x175f3a583) [0x14dac2a80 - Unity Child Domain]
#9 0x0000014deec06c in mono_jit_runtime_invoke
#10 0x0000014e0a20eb in do_runtime_invoke
#11 0x0000014e0a2028 in mono_runtime_invoke
#12 0x000001025b6717 in scripting_method_invoke(ScriptingMethodPtr, ScriptingObjectPtr, ScriptingArguments&, ScriptingExceptionPtr*, bool)
#13 0x000001025939c6 in ScriptingInvocation::Invoke(ScriptingExceptionPtr*, bool)
#14 0x000001026b5576 in Scripting::UnityEditor::EditorApplicationProxy::Internal_CallDelayFunctions(ScriptingExceptionPtr*)
#15 0x000001031ebba1 in Application::TickTimer()
#16 0x000001046251d9 in -[EditorApplication TickTimer]
#17 0x007ff80b233f51 in __NSFireTimer
#18 0x007ff80a3a8f59 in _{_}CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION{_}_
#19 0x007ff80a3a8a48 in __CFRunLoopDoTimer
#20 0x007ff80a3a85b8 in __CFRunLoopDoTimers
#21 0x007ff80a38ecf6 in __CFRunLoopRun
#22 0x007ff80a38de5c in CFRunLoopRunSpecific
#23 0x007ff8130355e6 in RunCurrentEventLoopInMode
#24 0x007ff81303534a in ReceiveNextEventCommon
#25 0x007ff8130350e5 in _BlockUntilNextEventMatchingListInModeWithFilter
#26 0x007ff80cdcd1fd in _DPSNextEvent
#27 0x007ff80cdcb8ba in -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:]
#28 0x007ff80cdbdf69 in -[NSApplication run]
#29 0x007ff80cd91ee7 in NSApplicationMain
#30 0x0000010464083c in EditorMain(int, char const**)
#31 0x00000104640b59 in main
#32 0x0000010e8ec51e in (Unknown)

  1. Resolution Note (fix version 1.5.0):

    Verified using:
    Unity 2022.2.0b8
    MARS 1.5.0-preview.2
    Unity Mars AR Foundation Providers 1.5.0-preview.1
    MacBook Pro

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.