Azure / azure-spatial-anchors-samples

Azure Spatial Anchors sample code
Other
293 stars 139 forks source link

TryResetHintsForSpatialAnchorInternalAsync crash #359

Closed t5ujiri closed 2 years ago

t5ujiri commented 2 years ago

Description

Application sometimes crashes when try to query anchors.

Crashed: com.apple.root.utility-qos
0  AzureSpatialAnchors            0x13e450 SpatialServices::Internal::StoreAndWatcherTrackedState::TryResetHintsForSpatialAnchorInternalAsync(std::__1::shared_ptr<SpatialServices::Internal::StoreAndWatcherTrackedState::ResetHintsForSpatialAnchorAsyncOperationState>) + 336
1  AzureSpatialAnchors            0x157ce4 pplx::task<bool>::_InitialTaskHandle<bool, SpatialServices::Internal::StoreAndWatcherTrackedState::ResetHintsForSpatialAnchorAsyncOperationState::ExecuteAsync()::'lambda'(), pplx::details::_TypeSelectorAsyncTask>::_Init(pplx::details::_TypeSelectorAsyncOperationOrTask) const + 60
2  AzureSpatialAnchors            0x157b9c pplx::details::_PPLTaskHandle<bool, pplx::task<bool>::_InitialTaskHandle<bool, SpatialServices::Internal::StoreAndWatcherTrackedState::ResetHintsForSpatialAnchorAsyncOperationState::ExecuteAsync()::'lambda'(), pplx::details::_TypeSelectorAsyncTask>, pplx::details::_TaskProcHandle>::invoke() const + 44
3  AzureSpatialAnchors            0x3217c pplx::details::_TaskProcHandle::_RunChoreBridge(void*) + 28
4  libdispatch.dylib              0x4670 _dispatch_client_callout + 20
5  libdispatch.dylib              0x15f00 _dispatch_root_queue_drain + 684
6  libdispatch.dylib              0x16608 _dispatch_worker_thread2 + 164
7  libsystem_pthread.dylib        0x10b8 _pthread_wqthread + 228
8  libsystem_pthread.dylib        0xe94 start_wqthread + 8

Steps to reproduce the issue

        private CloudSpatialAnchorWatcher CurrentWatcher { get; set; }
        ~~

        private async UniTask StartQueryAnchor(string anchorId)
        {
            if (CurrentWatcher != null)
            {
                CurrentWatcher.Stop();
                CurrentWatcher = null;
                await UniTask.Yield();
            }

            var criteria = new AnchorLocateCriteria()
            {
                Identifiers = new[] { anchorId },
                Strategy = LocateStrategy.VisualInformation,
                BypassCache = true,
            };
            var watcher = _spatialAnchorManager.Session.CreateWatcher(criteria);
            CurrentWatcher = watcher;
        }

Expected behavior

Starts querying anchors.

Development information (please complete the following information)

AR Device information (please complete the following information):

Varnauld commented 2 years ago

Hello, thank you for submitting this issue. Assigning to @darax and @XiangyuL-Microsoft (tracking issue n#40381567)

XiangyuL-Microsoft commented 2 years ago

@t5ujiri

Hi, Ito

May I ask if there is any more information, such as:

  1. logs around the crash happening?
  2. context code around the code in the top post? Is it possible for us to access the Unity project to reproduce this issue?

Thank you very much.

Varnauld commented 2 years ago

@t5ujiri We haven't heard back in a while on this issue so I will go ahead and close. If you can share some further information on the issues you still see if any, please re-open a new issue providing as much details as you can per the guidance from @XiangyuL-Microsoft above. thank you!