Augmented Reality App crashes after stoptracking

120
3
11-30-2020 08:19 AM
by
New Contributor II

Hi guys,

At the moment I’m working on a Augmented Reality App using ArcGIS Runtime 100.9 with Xamarin iOS.
Currently I’m facing I problem in which I really can use some help.

My problem I encounter is that the user has to switch between the GPS and AR kit, for this I used the code from the community samples.
But when after the scenes are loaded and view is presented the user adds some extra private data, the app crashes and stops working when the _arSceneView.StopTrackingAsync(); function is called when switching between ARKit and GPS.

I have been able the intercept the exception before the app closes and I’m encountering a null reference exception

At the moment I am not able to add any stack trace info, but will do this later.
Has anyone encountered the same issue and can provide me some help.

Thanks,

Kind regard

Peter

Reply
0 Kudos
3 Replies
Esri Frequent Contributor

A callstack would definitely be helpful. Otherwise it's just pure guesswork what went wrong.

I have been able the intercept the exception before the app closes and I’m encountering a null reference exception [...] At the moment I am not able to add any stack trace info, but will do this later.

If you're able to intercept it, at that breakpoint you should be able to see the stacktrace. Also you can try enabling break on any null reference exception in the exception settings:

 

Screenshot 2020-12-01 162538.png

Reply
0 Kudos
by
New Contributor II

Hi Morten,

as mentioned earlier I am not able to intercept the null reference exception anymore.
But I made the problem reproduceable.
The problem occurs when new scene layers are dynamically loaded and added to the Scene after that the application ARSceneView has been created with other layers.

Before  that the scenes are loaded I can switch between ARKit and GPS without any problems, but the application terminates when I try to switch between ARKit and GPS after new scene layers are dynamically are added to the scene.

Steps to reproduce are:
1. Create the ARSceneView
2. Load and and scenelayers to the ARSceneView (public or private, doesn't matter)
3. When the scenes are visualized, calibrate to align the data with the realworld.
4. Switch between ARKit and GPS, this should not be a problem
5. Add by pressing a button dynamically a new scene layer to the scene (public or private, doesn't matter)
6. After that the new scene is visualized try again to switch between ARKit and GPS, the application will terminate.

I hope that these steps can help you to reproduce this problem, so You could help me to solve this problem.
Hope to hear from you soon

I you want I can send you my project which I use

Reply
0 Kudos
by
New Contributor II

Hi,

Sorry for my late response but duo to personal circumstances and the holidays, I could not respond very soon. But I have been testing a lot. Unfortunately, I am no longer able to break on the exception and get the call stack. The app crashes/terminates even when except on all exceptions are set.
I also tried to reproduce this issue with visual studio for mac, but the issues and not stopping on the exception also occurs on the mac. 

Reply
0 Kudos