"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

QCAR in modal VC

Hello, For an app I'm working I display a modal view controller which shows my QCAR view. The app crashes quite a bit, especially when displaying the modal vc and starting up qcar or when dismissing and stopping QCAR. Should I be re-initing and loading the trackers every time I bring up the modal vc, not sure what the correct order of operations is. The most common crash I get is below: Thread 2 name: Dispatch queue: com.qualcomm.QCAR.videoqueue Thread 2 Crashed: 0 [MY APP NAME] 0x001bf4bc 0xbd000 + 1057980 1 [MY APP NAME] 0x0018ea68 0xbd000 + 858728 2 [MY APP NAME] 0x0018ecf0 0xbd000 + 859376 3 [MY APP NAME] 0x0018c19c 0xbd000 + 848284 4 [MY APP NAME] 0x0018c244 0xbd000 + 848452 5 [MY APP NAME] 0x001b2760 0xbd000 + 1005408 6 [MY APP NAME] 0x001b29e0 0xbd000 + 1006048 7 AVFoundation 0x31887364 __-[AVCaptureVideoDataOutput _AVCaptureVideoDataOutput_VideoDataBecameReady]_block_invoke_1 + 244 8 libdispatch.dylib 0x324e4d4e _dispatch_call_block_and_release + 6 9 libdispatch.dylib 0x324efccc _dispatch_queue_drain + 236 10 libdispatch.dylib 0x324efb66 _dispatch_queue_invoke$VARIANT$up + 30 11 libdispatch.dylib 0x324f076c _dispatch_worker_thread2 + 208 12 libsystem_c.dylib 0x3625f1c8 _pthread_wqthread + 288 13 libsystem_c.dylib 0x3625f09c start_wqthread + 0

marchinram

Thu, 10/20/2011 - 15:14

Thanks for response, What do you mean by keep the VC around? When I dismiss the modal VC it destroys the modal VC, so the ar view gets destroyed aswell.

Hi marchinram If you have a manager class (appDelegate?) that can create and retain the viewController you will show modally, then dismissing the model view shouldn't destroy the VC.

marchinram

Thu, 10/20/2011 - 16:23

Good idea, should call the init/load and deinit every time, or call init/load at when vc is opened for first time and call deinit when app closes. Thanks