question

YuYangTan-3065 avatar image
1 Vote"
YuYangTan-3065 asked SatishBoddu-MSFT commented

Creating Spatial Anchors crashes application (iOS Swift)

When calling cloudSession!.createAnchor based on this document: https://docs.microsoft.com/en-us/azure/spatial-anchors/how-tos/create-locate-anchors-swift , my application crashes and the following logs appear. The error log is quite vague, if possible I would like assistance on this.


Assertion failed: (([NSString stringWithFormat: @"%@", [props objectForKey: key]].length < 125)), function LogTelemetryEvent, file /Users/runner/work/1/s/SpatialServices/Core/Telemetry/src/ios/Telemetry.mm, line 580.
(lldb)



Adding more information here regarding the logs and session before the crash


AzureSpatialAnchors - Session Identifier: bf8b055d-361c-431e-af23-44c3a91d8ca5
AzureSpatialAnchors - AnchorServiceUrl: https://manage.sa.southeastasia.mixedreality.azure.com/
AzureSpatialAnchors - AuthServiceUrl: https://sts.southeastasia.mixedreality.azure.com/
AzureSpatialAnchors - AccountId: f53c5ff1-b3ed-41bb-8a75-61d8214c33d2
AzureSpatialAnchors - DeviceOsVersion: 14.6
AzureSpatialAnchors - SdkPackageType:
AzureSpatialAnchors - SdkVersion: 2.10.2
AzureSpatialAnchors - ArPlatformVersion: 14.6
AzureSpatialAnchors - MiddlewareVersions:
[MobileNeighborhoodManager::OnArFrameAvailable] CalculateSpeeds failed; skipping the frame since speed data cannot be calculated.
PoseQueryProcessorStream - ReqCV: x4m3KLOvTOi8KdvjTRELbA
simd_float4x4([[1.1634637, 0.0, -0.021492505, 0.0], [0.0, 1.1636622, 0.0, 0.0], [0.021492505, 0.0, 1.1634637, 0.0], [0.055397995, -1.0279655, -0.9663658, 1.0]])
renderer:nodeForAnchor with local anchor <ARAnchor: 0x2815b4d10 identifier="BDF5DCCE-DF89-49C3-BA93-7A86498FEE92" sessionIdentifier="EE40EE91-FDC1-A169-11BF-116E023E5E96" transform=<translation=(0.055398 -1.027966 -0.966366) rotation=(-0.00° 1.06° 0.00°)>> at [[1.163 0.000 0.021 0.055] [0.000 1.164 0.000 -1.028] [-0.021 0.000 1.163 -0.966] [0.000 0.000 0.000 1.000]]
[MobileNeighborhoodManager::OnArFrameAvailable] Frames Processed: 1800. Frames Promoted to Candidates: 24. Frames excluded by sampling: 0.
[MobileNeighborhoodManager::OnArFrameAvailable] Frames Processed: 3600. Frames Promoted to Candidates: 24. Frames excluded by sampling: 0.






azure-spatial-anchors
· 5
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @YuYangTan-3065, we are happy to assist you. To help us understand the problem a bit better, we would like to know if you are able to get the ios/Swift samples working? In addition, do you have more of the logs available?


1 Vote 1 ·

Yes, I was able to get the iOS/Swift samples to work. However when testing with the same set of codes on another project, this issue occurs. These were the only logs that appeared in the console throughout the session.

0 Votes 0 ·

@YuYangTan-3065, we are glad the samples work for you. Do you have publicly available minimal code that can help us reproduce the problem?

0 Votes 0 ·
Show more comments

Hello @YuYangTan-3065 Welcome to Microsoft Q&A Platform and thanks for your query. Community SME's on this topic or our team will review your scenario and circle back at the possible earliest time.

0 Votes 0 ·

1 Answer

YuYangTan-3065 avatar image
1 Vote"
YuYangTan-3065 answered SatishBoddu-MSFT commented

@oafolabi-msft I have found the issue, it seems like ASACloudSpatialAnchor() does not like the simd_float4x4 local
anchorLocation that I provided. Thanks for the help!

· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hello @YuYangTan-3065 Thanks for sharing the resolution Please accept your response as an answer so that it is useful to others as well.

0 Votes 0 ·