Log in or register to post comments

Vuforia Crashing When Switching Scenes

September 12, 2017 - 12:18pm #1

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:


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


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? 



Vuforia Crashing When Switching Scenes

September 14, 2017 - 4:46pm #2

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?


-Vuforia Support

Log in or register to post comments