SpatialAnchors AppProperties crash in Android NDK

Sergii Romanov 46 Reputation points
2021-09-26T19:29:22.987+00:00

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
Azure Spatial Anchors
An Azure service that is used to build immersive three-dimensional applications and experiences that map, persist, and restore content or points of interest at real-world scale.
88 questions
{count} votes

Accepted answer
  1. AshokPeddakotla-MSFT 35,096 Reputation points
    2021-09-29T06:41:31.467+00:00

    @Sergii Romanov 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.

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.