MixedRealityToolkit-Unity icon indicating copy to clipboard operation
MixedRealityToolkit-Unity copied to clipboard

Unable to delete anchor from Store

Open shubham-bitsnbytes opened this issue 8 years ago • 3 comments

Overview

I am using WorldAnchorManager script to attach and remove world anchor. Currently, when i attach world anchor to hologram and send device in sleep directly without quitting application (using bloom gesture). When i enable device from sleep, i am not able to delete anchor from store (game object it's able to remove).

This behaviour happens in RS4 updated HL but didn't occur in previous HL OS.

Expected Behavior

Anchor should be destroyed from anchor store.

Actual Behavior

Anchor Doesn't get removed from anchor store. It caused future anchor to have either conflict with key or update world anchor to wrong position.

Steps to reproduce

(Links to sample github project preferred)

Unity Editor Version

Unity 2017.4.5f1

Mixed Reality Toolkit Release Version

shubham-bitsnbytes avatar Jun 22 '18 11:06 shubham-bitsnbytes

Closing issues older than 180 days. If this is still an issue, please reactivate with recent information.

wiwei avatar Apr 11 '19 20:04 wiwei

I've bumped into the same issue. I have a repo for reproducing the issue here. Note, I've put the reproduction in a branch bug/sleepy-anchor.

Step to reproduce

  • Clone https://github.com/FreakTheMighty/AirTapTest/tree/bug/sleepy-anchor
  • Airtap the cube, note the anchor debug text and the list of ids displayed above the cube
  • Ensure that the anchor is currently applied
  • Put the HL to sleep for ~30 seconds.
  • Wake the HL and resume the app
  • Airtap the cube and note the deletion failure messages
  • Note that the ids list still contains the previously created anchor id

Editor Version

2018.3.12f1

This is possibly related to #3530

FreakTheMighty avatar May 31 '19 16:05 FreakTheMighty

@Shubham7694 I've found that enabling persistence provides a decent work around.

@wiwei this still seems like a bug to me on a few levels.

  1. I'm guessing that AnchorStoreReady is being called when the HL wakes up. I think that even without persistence turned on, the anchors should persist until the app is fully closed.
  2. If they are indeed being cleared when the app foregrounds from a suspended state, clear() is not working. The IDs still show up when I list IDs, and objects are not movable.

FreakTheMighty avatar May 31 '19 17:05 FreakTheMighty