Log in or register to post comments

iOS app random crash when stopping CameraDevice with Cloud Recognition

January 3, 2013 - 11:53pm #1


We encounter a random crash when iOS app is stopping CameraDevice with Cloud Recognition(without Cloud Recognition it doesn't crash)
Here are the crash reports we got from iPhone4, iOS5/iOS6(yes, this happens on both iOS5/iOS6)
- iPhone4, iOS5
Thread 4 name:  Dispatch queue: com.qualcomm.AR.videoqueue
Thread 4 Crashed:
0   xxxxxxxx                        0x001ff7a0 0x3a000 + 1857440
1   xxxxxxxx                        0x001fd29c 0x3a000 + 1847964
2   xxxxxxxx                        0x0016be66 0x3a000 + 1252966
3   xxxxxxxx                        0x0017014c 0x3a000 + 1270092
4   xxxxxxxx                        0x0016c472 0x3a000 + 1254514
5   xxxxxxxx                        0x0016dbca 0x3a000 + 1260490
6   xxxxxxxx                        0x0016d036 0x3a000 + 1257526
7   xxxxxxxx                        0x001a0a80 0x3a000 + 1469056
8   AVFoundation                   0x33aea244 __74-[AVCaptureVideoDataOutput _AVCaptureVideoDataOutput_VideoDataBecameReady]_block_invoke_0 + 220
9   libdispatch.dylib              0x308b6c52 _dispatch_call_block_and_release + 6
10  libdispatch.dylib              0x308c1ca4 _dispatch_queue_drain + 268
11  libdispatch.dylib              0x308c1b12 _dispatch_queue_invoke$VARIANT$up + 30
12  libdispatch.dylib              0x308c2784 _dispatch_worker_thread2 + 208
13  libsystem_c.dylib              0x34005df4 _pthread_wqthread + 288
14  libsystem_c.dylib              0x34005cc8 start_wqthread + 0
- iPhone4, iOS6
Thread 8 name:  Dispatch queue: com.qualcomm.AR.videoqueue
Thread 8 Crashed:
0   xxxxxxxx                        0x00221790 0x5c000 + 1857424
1   xxxxxxxx                        0x0021f28e 0x5c000 + 1847950
2   xxxxxxxx                        0x0018de5a 0x5c000 + 1252954
3   xxxxxxxx                        0x00192140 0x5c000 + 1270080
4   xxxxxxxx                        0x0018e464 0x5c000 + 1254500
5   xxxxxxxx                        0x0018fbbc 0x5c000 + 1260476
6   xxxxxxxx                        0x0018f028 0x5c000 + 1257512
7   xxxxxxxx                        0x001c2a74 0x5c000 + 1469044
8   AVFoundation                   0x31b0316e <redacted> + 254
9   libdispatch.dylib              0x37aba11c <redacted> + 8
10  libdispatch.dylib              0x37ab9996 <redacted> + 142
11  libdispatch.dylib              0x37ab9890 <redacted> + 32
12  libdispatch.dylib              0x37ac8212 <redacted> + 190
13  libdispatch.dylib              0x37ac83b4 <redacted> + 80
14  libsystem_c.dylib              0x37762a0e <redacted> + 358
15  libsystem_c.dylib              0x377628a0 start_wqthread + 4
Here is the code showing how app stops CameraDevice.
    QCAR::TrackerManager& trackerManager = QCAR::TrackerManager::getInstance();
    QCAR::ImageTracker* imageTracker = static_cast<QCAR::ImageTracker*>(trackerManager.getTracker(QCAR::Tracker::IMAGE_TRACKER));
    QCAR::TargetFinder* targetFinder = imageTracker->getTargetFinder();
    assert (targetFinder != 0);
I suspect that it might be caused by Cloud Recognition(the scanline effect)...
Any idea?

iOS app random crash when stopping CameraDevice with Cloud Recog

January 22, 2013 - 6:10am #12

No problem.

Good luck with this.

We will investigtate this in due course, but I do think it makes sense for you to explore alternatives.


iOS app random crash when stopping CameraDevice with Cloud Recog

January 21, 2013 - 11:15pm #11

Hi Nalin,

In our app, we want User have the same scanline effect with/without cloud recognition, which means we use both real/dummy Cloud recognition together in our app.

It seems that scanline does cause crash specifically on iPhone4(it doesn't crash without scanline), and there is no workaround for this issue(can't disable the scanline while cloud recognition is ON).

I guess to prevent this issue, we probably need to render the camera background by ourselves.(getFrame and render).

It's gonna take some time though...

Thanks for your reply! :)


Mason Hsiung

Hi Mason, I was able to

January 21, 2013 - 1:20am #10

Hi Mason,

I was able to reproduce the issue, however it is going to be very difficult to find a way forward here because it is iPhone4 only and it is quite unpredictable as to when exactly it crashes.

My understanding is that you are using a "dummy" Cloud Reco with empty keys purely in order to have the scanline feature right?

Does it crash without this scanline?  If not then my suggestion is that it might be more sensible to write your own such feature / effect, and most likely this will be quicker for you.

We will investigate this issue further, however I cannot promise any timescale for any resolution here.

Hope you can understand :)


Hi Nalin, Do you have any new

January 20, 2013 - 9:46pm #9

Hi Nalin,

Do you have any new finding on this issue?


Mason Hsiung

Hi NalinS, Sure no problem,

January 10, 2013 - 8:55am #8

Hi NalinS,

Sure no problem, below is the project tarball, this project doesn't have any rendering logic.


This project uses the way(QCARUtils) from QCAR sample to start QCAR camera by default.

You can easily switch between QCAR and NinevehGL by modifying the predefine header file.(ARApp-Prefix.pch)






In order to reproduce the random crash, you need to repeatedly start/stop the QCAR camera.

The crash happenes on (it seems that it's an iPhone4 specific issue.)

- iPhone4, iOS5.1.1

- iPhone4, iOS6.0

I use StoneAndChips dataset and empty access/secret key for showing scanline/points.



Mason Hsiung


Can you zip up the project

January 10, 2013 - 2:48am #7

Can you zip up the project and upload somewhere so I can fully investigate?



Hi NalinS, I just got another

January 10, 2013 - 2:08am #6

Hi NalinS,

I just got another finding.

I get rid of NinevehGL framework dependency, switch back to use QCAR sample way(QCARUtils) in our app.

Our app still crashes, here is the crash report, and they look quite similiar.

http://pastebin.com/MNyqG3eS  (iPhone4, iOS5.1.1)

The main thread stopped at stopCamera

7   ARApp                       0x0000b15e -[QCARutils stopCamera] (QCARutils2.mm:689)

The line 689 is 






The crashed thread is the same with the previous crash report. (dispatch queue: com.qualcomm.AR.videoqueue)


Thanks a lot!!


Mason Hsiung

Hi NalinS, Thanks for the

January 9, 2013 - 9:27pm #5

Hi NalinS,

Thanks for the reply :)

I have uploaded the crash report to pastebin, here is the link


Please let me know if you need any further information.

BTW, I forgot to mention that the app in fact integrates the 3D framework NinevehGL, which is responsible for executing the rendering loop.(drawView method instead of renderFrameQCAR).

Although, I don't think that NinevehGL causes this issue :).  Just for your information.

Thanks again!


Mason Hsiung


Hi masonhsiung, Thanks for

January 9, 2013 - 3:50am #4

Hi masonhsiung,

Thanks for this and sorry for the delay in replying.  Forum gremlins I am afraid :(

I can investigate the crash for you.

Please can you upload somewhere and post a link so I can look into this further?



Hi, I still can't find a

January 9, 2013 - 12:47am #3


I still can't find a workaround for this issue.

Could someone please give me a hint?

Thanks a lot!!


The forum system seems having

January 6, 2013 - 6:41pm #2

The forum system seems having a small bug on showing the last one who replys the post.

Before I reply this post, the last one was


by intouching1 
Dec 13 2012 10:38pm


which I don't think "intoching1" did reply this post...

Anyway, does anyone have any idea on this issue?


Log in or register to post comments