question

SergiiRomanov-5940 avatar image
0 Votes"
SergiiRomanov-5940 asked AshokPeddakotla-MSFT commented

SpatialAnchors AppProperties crash in Android NDK

Azure SpatialAnchors NDK crashes on inserting/looking up AppProperties. After unsuccessful attempts to fix it in my custom app I added the code to the official Microsoft tutorial which worked fine for me before.
https://github.com/Azure/azure-spatial-anchors-samples/blob/master/Android/NDK/app/src/main/cpp/AzureSpatialAnchorsApplication.cpp#L570


 visual.cloudAnchor = std::make_shared<CloudSpatialAnchor>();
 visual.cloudAnchor->LocalAnchor(visual.localAnchor);
 std::shared_ptr<IMap<std::string, std::string>> properties = visual.cloudAnchor->AppProperties(); // verified properties is not null
 properties->Insert(R"(model-type)", R"(frame)");       // crash!
 ERROR: A/libc: Fatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0 in tid 22056
azure-spatial-anchors
· 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.

1 Answer

AshokPeddakotla-MSFT avatar image
1 Vote"
AshokPeddakotla-MSFT answered AshokPeddakotla-MSFT commented

@SergiiRomanov-5940 Apologies for the delay in response.

I see that your query is addressed in both SO and GitHub.

Update from the GitHub:

136136-image.png

Our team created a fix for this and will be published with the next SDK release. Please let us know if you have any other queries.

If an answer is helpful, please click on 130616-image.png or upvote 130671-image.png which might help other community members reading this thread.


image.png (16.3 KiB)
· 2
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.

Thanks for your response. I didn't know where to go with this issue, so tried everything. To my surprise every place was monitored by the team. Keep it up!

0 Votes 0 ·

You are welcome! Feel free to reach out if you have any other queries.

0 Votes 0 ·