"We offer new support options and therefor the forums are now in read-only mode! Please check out our Support Center for more information." - Vuforia Engine Team

Vuforia Crashing When Switching Scenes

Hey, all-

I'm having an issue keeping Vuforia alive between scenes. I just updated my project from an older vuforia and unity version to unity 2017 and vuforia 6.2. It was working fine until the update, and now I get an error when I switch scene. It seems to be looking for image targets that have been destroyed (I assume in the scene change). Each scene works fine independently, but when I move the ARCamera from one scene to the other (once vuforia has been started), the camera stops working and I get the following error every frame:

[quote]

Exception in callback: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> UnityEngine.MissingReferenceException: The object of type 'ImageTargetBehaviour' has been destroyed but you are still trying to access it.

Your script should either check if it is null or you should not destroy the object.   at (wrapper managed-to-native) UnityEngine.Behaviour:get_enabled ()   at Vuforia.StateManagerImpl.UpdateTrackablePoses (UnityEngine.Transform arCameraTransform, .TrackableResultData[] trackableResultDataArray, .VuMarkTargetResultData[] vuMarkResultDataArray, TrackableIdPair originTrackableID, Int32 frameIndex) [0x00000] in <filename unknown>:0   at Vuforia.VuforiaManagerImpl.UpdateTrackers (FrameState frameState) [0x00000] in <filename unknown>:0   at Vuforia.VuforiaManagerImpl.Update (ScreenOrientation counterRotation, Boolean reapplyOldState) [0x00000] in <filename unknown>:0   at Vuforia.VuforiaARController.UpdateStatePrivate (Boolean forceUpdate, Boolean reapplyOldState) [0x00000] in <filename unknown>:0   at Vuforia.VuforiaARController.UpdateState (Boolean forceUpdate, Boolean reapplyOldState) [0x00000] in <filename unknown>:0   at Vuforia.DigitalEyewearARController.Update () [0x00000] in <filename unknown>:0

etc...

[/quote]

Its particularly strange that it's being thrown from the digitalEyewearController- we're not using digital eyewear, just a normal iOS and android build. Anyone have any thoughts as to what's going on? Is there a way to cleanly remove the imageTargetBehaviours it's looking for? 

Thanks!

 

Hello allmadhere,

Which version of Unity and Vuforia were you upgrading from? Are you trying to run this in Unity 2017.1 or 2017.2?

Thanks,