Unity and Vuforia app crashes on iOS after reloading scene with ARCamera
Hello! I have big bug that I cant fix long time. I have app with augmented reality (using Vuforia), and each time when I reload scene on iOS app crashes. On Android all works perfect. Also I have another bug, after object recognition but not switching off ARCamera (setActive(false)), when I reload scene, ARCamera don't works, but no crash happens, app works.
I think I need somehow fully unload Vuforia from memory and then load again. How can I do that?
When app runs on any iOS device, after some objrect recognition and switching off camera, after reloading scene with ARCamera app crashes with error:
Terminating app due to uncaught exception 'NSRangeException', reason: ' -[__NSArrayM objectAtIndex:]: index 26282076 beyond bounds [0 .. 1]'
*** First throw call stack:
(0x21a10fef 0x2fc8fc8b 0x21923821 0x11678cf 0x1127d75 0x1106bd1 0x1106ccf 0x10e0bbd 0x1553a03 0x154f455 0x10d0841 0x10d0967 0x100d13f 0x100d33d 0x167dabf 0xa332a7 0x591b75 0x5bd68f 0x89ea1b 0xff756d 0xa7802d 0xa77fef 0xa71a15 0x9bfff5 0xa32895 0x8c79ab 0x7850d 0x78351 0x34b9173 0x34b915f 0x34bce45 0x219d6609 0x219d4d09 0x21921201 0x21921013 0x290ae201 0x250c5a59 0x7132b 0x3021baaf)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb)
I have tryed many things, like keep ARCamera alive (after that object recognition dont works), tryed stop () and deinit() before reloading scene, and no one thing helps.
after object recognition but not switching off ARCamera (setActive(false)), when I reload scene bug:
2015-10-01 10:53:19.369 muByzantium[541:135994] Failed to set hint 'HINT_MAX_SIMULTANEOUS_IMAGE_TARGETS' because the ObjectTracker has not been initialized.
SetHint
(Filename: /Users/builduser/buildslave/unity/build/artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 64)
2015-10-01 10:53:19.369 muByzantium[541:135994] Failed to set hint 'HINT_MAX_SIMULTANEOUS_OBJECT_TARGETS' because the ObjectTracker has not been initialized.
SetHint
(Filename: /Users/builduser/buildslave/unity/build/artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 64)
2015-10-01 10:53:19.370 muByzantium[541:135994] Failed to set hint 'HINT_DELAYED_LOADING_OBJECT_DATASETS' because the ObjectTracker has not been initialized.
dataSetExists
objectTrackerCreateDataSet
Error: Object Tracker not ready. Could not create data set.
Could not create dataset.
Vuforia.VuforiaAbstractBehaviour:Start()
(Filename: /Users/builduser/buildslave/unity/build/artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 64)
NullReferenceException: A null value was found where an object instance was required.
at Vuforia.DatabaseLoadAbstractBehaviour.LoadDatasets () [0x00000] in :0
at Vuforia.VuforiaAbstractBehaviour.Start () [0x00000] in :0
(Filename: currently not available on il2cpp Line: -1)
cameraDeviceGetVideoMode
2015-10-01 10:53:19.372 muByzantium[541:135994] VideoBackgroundConfig with screen size of zero received, skipping config step
2015-10-01 10:53:19.373 muByzantium[541:135994] CameraDevice::getCameraCalibration(): Failed to get camera calibration because the camera is not initialized.
Yeah, I have ask about fix on Vuforia forum but still no answer. Maybe here somebody can help.
Answer by ripegooseberry · Nov 09, 2015 at 04:13 PM
Hi! @Delfuego We're experiencing EXACTLY the same bug. Did you manage to find out what was the matter? Thanks!
Answer by sk8er8921 · May 19, 2016 at 12:09 AM
I unchecked automatic light mapping under window lighting and that worked for me.
Your answer
Follow this Question
Related Questions
How to stop plane detection using ARKit 2 Answers
Vuforia on HoloLens 2 1 Answer
cloud anchor prefab!! 0 Answers