Log in or register to post comments

Unity 2018.3.11f/Vuforia 8.1.7 crashes when trying to use mid air after ground plane

April 15, 2019 - 2:30pm #1

I'm working on a developing an application that allows the user to go in and out of augmented reality situations, which involves a lot of turning on and off Vuforia at various times.  We recently updated the app to Unity 2018.3.11f and Vuforia 8.1.7, and while there were some problems we could work around, one that I've yet to find a solution for is a crash that occurs when attempting to use a Mid-Air augmentation after running several Ground Plane augmentations, turning the VuforiaBehaviour off in between each augmentation.

To quickly lay out steps of creating the crash in our app, noting that all of this occurs in a single scene:

  1. Open and play a ground plane augmentation.  Vuforia is initialized and turned on here.  If(!initialized) VuforiaRuntime.Instance.InitVuforia();  VuforiaBehaviour.Instance.enabled = true;
  2. Disable the VuforiaBehaviour.  (VuforiaBehaviour.Instance.enabled = false;)
  3. Open and play the ground plane augmentation again.  Vuforia is turned back on.
  4. Repeat steps 2 - 3 several times(10+)
  5. Open and play a Mid-Air augmentation.  App freezes, and remains frozen until the app is closed.

One resolution to this problem is to simply not turn Vuforia off, but because this drains nearly 4 times the battery, this isn't really an option for our app.

I can provide some specific code samples if necessary!

Unity 2018.3.11f/Vuforia 8.1.7 crashes when trying to use mid air after ground plane

April 16, 2019 - 8:50am #2


Although intuitive, disabling the VuforiaBehaviour can lead to unexpected behavior of the SDK. I'll open a ticket to see if this use case can be made more robust in the future.

Currently, the best way to "pause" Vuforia is to switch to a scene that *does not* contain an ARCamera.

If this is not possible, the suggested progression for turning off Vuforia components is as follows:

  1. Stop trackers
  2. Stop camera
  3. Deinit trackers
  4. Deinit camera
  5. Deinit Vuforia (only if necessary, but not recommended as you'll have to reinit Vuforia again which is time/power consuming)

Then reversing the order of the components above to reinitialize is needed to "unpause" Vuforia.


Vuforia Engine Support


Log in or register to post comments