Closed tomkrikorian closed 2 years ago
Hi @tomkrikorian, Thank you for letting us know the issues that you experienced around coarse relocalization feature. In order of us to better understand and reproduce the issues, could you please try to applying the above mentioned steps similarly onto the Unity/iOS sample (Coarse Reloc demo) to see if it's working and hence, having another point of reference for debugging your app? For example,
currentWatcher = CreateWatcher()
right after the function call ConfigureSensors()
in AdvanceDemoAsync
function, case AppState.DemoStepConfigureSensors:.if (currentWatcher != null)
{
currentWatcher.Stop();
currentWatcher = null;
}
before
await SaveCurrentObjectAnchorToCloudAsync();
OnCloudAnchorLocated
function, guard app state change
if (currentAppState == AppState.DemoStepLookingForAnchorsNearDevice)
{
currentAppState = AppState.DemoStepStopWatcher;
}
Please let us know if you can reproduce a crash when changing the sample app that way.
Moreover, could you please elaborate your observations/findings w.r.t the following:
Little update, someone on my team is going to try your suggestions. We'll get back to you with what we got from our tests.
Hi @phamqduc
I am tomkrikorian’s colleague, I am taking the case.
I tried your suggestions in your sample by creating a fork from your repository to a new one. You can see the new repository here.
I duplicated the scene AzureSpatialAnchorsCoarseRelocDemo
to AdvancedAzureSpatialAnchorsCoarseRelocDemo
as well as the script AzureSpatialAnchorsCoarseRelocDemoScript
for AzureSpatialAnchorsCoarseRelocDemoScriptAdvanced
I use in my new scene.
I tried then to build and test on my iPhone 12 pro. See all steps I did:
I create a videoshot for you to understand better all steps and the issue. The video is too big for GitHub, let me know if you want it and how I can send it to you. I don’t have any crash, except once but I didn’t know what I was doing. However, you can see that the step 14 is an issue. I have to add an anchor to be able to discover other anchor as I have done steps 15 to 19.
To answer your questions
Does the app only crash during query mode with coarse relocalization?
We only use coarse relocalization, so I don’t know.
If you happen to work on Unity/Android as well, do you see a similar crash? (we try to understand if the issue is cross platforms)
We only work on Unity/iOS and so, our code would not work good enough on Unity/Android to test if there are similar crashes on this platform too.
If you work on iOS app (non-Unity version), do you see a similar crash?
We don’t have enough time to work on iOS app without Unity to test theses crashes. We are focusing the platform iOS with Unity as a development tool.
We really appreciate your reactivity on our issue. Let me know if I can do something else.
Hi @Morgane-Minsar, thanks so much for the detailed description and source code! It sounds like you are no longer hitting the original reported crash, is that correct? As far as making sure that your watcher returns anchors in step 14, I think that all you need to do is add a call to await CloudManager.ResetSessionAsync();
after you've stopped the previous session in step 10. In your script, that change should look like this:
case AppState.DemoStepStopSessionForQuery:
CloudManager.StopSession();
await CloudManager.ResetSessionAsync();
currentWatcher = null;
locationProvider = null;
currentAppState = AppState.DemoStepComplete;
break;
Let us know if that works. Thanks!
Hi @msftradford, I can confirm that I don't have the original reported crash and also, the reset session solves the issue step 14. Thank you !
Description
In our App, we use coarse relocalization running all the time with a watcher. We stop the watcher when we have to :
Steps to reproduce the issue
Don't have a steps to repro since it's not part of the sample. Here is the part of the crash log that might help :
Expected behavior
Running coarse relocalization without a crash.
Development information (please complete the following information)
AR Device information (please complete the following information):