Log in or register to post comments

QCAR Failed to Initialize

July 1, 2013 - 9:31am #1

We have created an application that uses the same procedure as TextReco to start scanning words.  When finshed, we run a method that duplicates the shutdown procedure in TextReco as follows:

 

- (void)shutDownQCAR {

    

    QCARControl *control = [QCARControl getInstance];

    

    // Stop the camera

    [control stopCamera];

    qcarCameraIsActive = NO;

    

    // Pause and deinitialize QCAR

    [control pauseQCAR];

    [control deinitTextTracker];

    [control deinitQCAR];

    

    // Inform the root view controller that the EAGLView should finish any OpenGL ES commands

    [self finishOpenGLESCommands];

    

    // free any easily recreated OpenGL ES resources

    [self freeOpenGLESResources];

}

 

Then when we want to scan words again we just start as before.  The problem we're having is that the camera does not always come up and when it doesn't we are getting the following error messages in our log:

 

2013-07-01 12:22:16.617 PronounceWords[566:907] ERROR: failed to initialise QCAR

2013-07-01 12:22:17.551 PronounceWords[566:b353] INFO: successfully stopped tracker

2013-07-01 12:22:17.824 PronounceWords[566:b353] QCARControl pauseQCAR

2013-07-01 12:22:18.112 PronounceWords[566:b353] QCARControl deinitQCAR

 

This frequently leads to a crash when we attempt to exit the text recognition portion of our app.  Please let me know if you have any suggestions.

 

Thanks!

 

QCAR Failed to Initialize

November 19, 2013 - 4:59am #25

I'm sorry, I did not pay attention to what I was entering the forum .. I guess this is joined to all .. once again I'm sorry

QCAR Failed to Initialize

November 19, 2013 - 2:59am #24

This is the iOS forum.

Please try creating a new thread in the Android forum.

N

QCAR Failed to Initialize

November 18, 2013 - 4:42pm #23

I apologize in advance, sample text recognition would I developed in my application that will create the dictionary-based AR android, but when it has been imported in eclipse there are 3 files that are not contained in it and when I stop three files instead the error increases.
please how to solve the solution ..
thanks

QCAR Failed to Initialize

November 6, 2013 - 1:52am #22

Please do not re-use an existing thread.

The samples should compile and run correctly - if not then there is a fundamental problem.

From your report it is unclear what the problem is, so please can you start again with full details of device etc.  Also check the Getting Started guide which shows where to install the samples, and make sure you are not trying to build for the simulator.

Finally, do the other samples run?

 

N

QCAR Failed to Initialize

November 5, 2013 - 5:09pm #21

 

I apologize in advance, I asked here but it seems I also had problems with sample text recognition applications. is there a solution?

the existing project file text recognition error file directory and compile an order that halted the QCAR / word.h, QCAR / WordResult.h and QCAR / TextTracker.h
what is the solution?

this's the first error

Compile++ arm : TextReco <= TextReco.cpp jni/TextReco.cpp:40:23: fatal error: QCAR/word.h: No such file or directory compilation terminated. make: *** [obj/local/armeabi/objs/TextReco/TextReco.o]

what's the solution..

thanks before..

QCAR Failed to Initialize

August 1, 2013 - 7:26am #20

Will do.  The samples I've seen are all stand alone applications.  The Vuforia functionality is a small, but important part of our app.  Thus the interest in maintaining state.

Thanks,

QCAR Failed to Initialize

August 1, 2013 - 7:22am #19

Have a look at the samples for some examples, but typically you do not store the state per se, and instead use pause/resume etc. and the delegates to let you know what is happening.

Then if need be you can store your own state.

 

N

QCAR Failed to Initialize

August 1, 2013 - 6:51am #18

Got it and can make the app work with this.  But, to avoid storing state, I'm assuming there is no way to check on the current state of QCAR?

 

Thanks

QCAR Failed to Initialize

August 1, 2013 - 1:51am #17

...er  see the error parameter in the function...

 

 

- (void)initQCARComplete:(ErrorReport*)error

{

    // QCARControl is informing us that QCAR initialisation has completed

    

    if (nil != error) {

        [error log];

        [error release];

        return;

    }

QCAR Failed to Initialize

July 31, 2013 - 9:30am #16

Thanks!  I would have expected a boolean response.  I'm assuming that if QCAR is initialized there is no error?

Regards

QCAR Failed to Initialize

July 31, 2013 - 4:53am #15

Look for this delegate:

 

#pragma mark - QCARControlDelegate methods

 

- (void)initQCARComplete:(ErrorReport*)error

..which is called after initialisation, at which point the word list is loaded.

 

N

 

 

 

QCAR Failed to Initialize

July 30, 2013 - 9:13am #14

Thanks for the reply.  I've been on vacation and another project.  Sounds like just execute through the [control pauseQCAR] and then turn the camera and QCAR back on when starting.  

Do you know the commands to track the status of QCAR so on start up we can distinguish between the requirement to start the scanner for the first time vs resuming its operation.

 

Thanks!

QCAR Failed to Initialize

July 25, 2013 - 8:36am #13

Hi Jack

Apologies for the delay, but I am looking at this.

I am wondering whether you can simply create a single instance of the ViewController that handles the text recognition, and invoke it's pause / resume functionality when it hides/appears.

This way it avoids any init/deinit and also should start up much faster subsequently.

I am looking at this some more as well.

 

N

QCAR Failed to Initialize

July 16, 2013 - 8:36am #12

Much appreciated!!!

QCAR Failed to Initialize

July 16, 2013 - 8:21am #11

Ok, thanks for reporting this Jack.

I will investigate and get back to you when I have more info.

 

N

QCAR Failed to Initialize

July 12, 2013 - 6:55am #10

The problem occurs consistently after starting the text recognition 3 times.

QCAR Failed to Initialize

July 11, 2013 - 8:20am #9

We are finding that this problem is specific to the iPhone 4 which has a slower processor.  Would it be possible to elaborate on system resources that are shared in QCAR that would prevent the deinitTracker from completing or delay the pauseQCAR command?

QCAR Failed to Initialize

July 10, 2013 - 2:11pm #8

Sorry to bring this up again, but we're still seeing situations where the camera does not restart whe we shut down and restart the scanner.  In these cases the pauseQCAR and deinitQCAR are not seen in the logs after the deinitTracker.  I've attached our exit code below.  Let me know if you have any suggestions.  We're running out of ideas.

Thanks!

 

- (void)shutDownQCAR {

    

    QCARControl *control = [QCARControl getInstance];

    

    // Stop the camera

    [control stopCamera];

    qcarCameraIsActive = NO;

    

    // Stop and deinitialize the tracker

    (void)[control stopTracker:QCAR::Tracker::TEXT_TRACKER];

    [control deinitTracker:QCAR::Tracker::TEXT_TRACKER];

    

    // Pause and deinitialise QCAR

    [control pauseQCAR];

    [control deinitQCAR];

    

    // Inform the root view controller that the EAGLView should finish any OpenGL ES commands

    [self finishOpenGLESCommands];

    

    // free any easily recreated OpenGL ES resources

    [self freeOpenGLESResources];

}

QCAR Failed to Initialize

July 10, 2013 - 8:18am #7

Great to hear :)

 

N

QCAR Failed to Initialize

July 10, 2013 - 8:01am #6

The problem has stopped occuring.  We had expected a pauseQCAR and deinitQCAR command to be issued.  These were not in the log that was sent.  But, in more recent trials, the commands appear in the logs and the problem no longer occurs.

Thanks!

QCAR Failed to Initialize

July 10, 2013 - 7:30am #5

I updated our project to reflect the latest TextReco application.  Now our application detects words as before.  However, after exiting the 3rd time on an iPhone, the camera will not restart and I am getting a "failed to initialise QCAR" error.  Attached is our log.  Can you recommend what we should look for?

Thanks!

 

 

2013-07-10 10:25:12.980 PronounceWords[1180:907] words scanned are for

end

for

no

2013-07-10 10:25:16.516 PronounceWords[1180:bb77] QCARControl stopCamera

2013-07-10 10:25:16.808 PronounceWords[1180:bb77] QCARControl stopTracker type 2

2013-07-10 10:25:16.966 PronounceWords[1180:bb77] INFO: successfully stopped tracker

2013-07-10 10:25:16.968 PronounceWords[1180:bb77] QCARControl deinitTracker type 2

2013-07-10 10:25:18.401 PronounceWords[1180:907] CoreData: sql: SELECT 0, t0.Z_PK, t0.Z_OPT, t0.ZWORD, t0.ZUNDERSTANDING, t0.ZWHATTYPE FROM ZLIST t0 JOIN ZPURPOSE t1 ON t0.ZWHATTYPE = t1.Z_PK WHERE  t1.ZTYPE = ? ORDER BY t0.ZWORD COLLATE NSCollateLocaleSensitiveNoCase 

2013-07-10 10:25:18.416 PronounceWords[1180:907] CoreData: annotation: sql connection fetch time: 0.0114s

2013-07-10 10:25:18.424 PronounceWords[1180:907] CoreData: annotation: total fetch execution time: 0.0226s for 94 rows.

2013-07-10 10:25:21.475 PronounceWords[1180:907] QCARControl initQCAR

2013-07-10 10:25:21.487 PronounceWords[1180:906b] INFO/AR(1180) 2013-07-10 10:25:21: QCAR SDK version 2.5.7

2013-07-10 10:25:21.759 PronounceWords[1180:907] viewFrame is {{0, 20}, {320, 460}}

2013-07-10 10:25:21.936 PronounceWords[1180:907] ERROR: failed to initialise QCAR

QCAR Failed to Initialize

July 3, 2013 - 1:29am #4

Can you let me know if other changes were made between the beta version of textReco and the ios-2.5.1 version

I cannot tell you this information.

I think you may need to start from scratch with the release version, as TextReco is solid and stable, so I have no real idea why you are seeing problems.

Probably the best thing to do is to build a short test from the TR sample that mimics the functionality you are trying to model (init() / deinit()) and if the error is reproducible then I can investigate.  If not it will be something in your code for you to investigate.

 

N

QCAR Failed to Initialize

July 2, 2013 - 9:35am #3

I was working off the beta code.  I inserted the changes that you suggested below.  I also needed to update the QCARControl.h and .mm classes with the version from the latest TextReco.  The scanning view comes up, but now no words are found.  Can you let me know if other changes were made between the beta version of textReco and the ios-2.5.1 version.

Attached is my log file:

 

2013-07-02 12:24:29.083 PronounceWords[555:907] QCARControl initQCAR

2013-07-02 12:24:29.263 PronounceWords[555:5b0f] INFO/AR(555) 2013-07-02 12:24:29: QCAR SDK version 2.5.7

2013-07-02 12:24:29.373 PronounceWords[555:907] viewFrame is {{0, 20}, {320, 460}}

2013-07-02 12:24:29.955 PronounceWords[555:5b0f] INFO: successfully initialised QCAR

2013-07-02 12:24:29.962 PronounceWords[555:907] QCARControl loadAndActivateTextTrackerWordList

2013-07-02 12:24:29.966 PronounceWords[555:907] QCARControl initTracker type 2

2013-07-02 12:24:29.995 PronounceWords[555:907] INFO: successfully initialised the tracker

2013-07-02 12:24:30.530 PronounceWords[555:907] QCARControl resumeQCAR

2013-07-02 12:24:30.660 PronounceWords[555:907] QCARControl startCameraForViewWidth:andHeight:

2013-07-02 12:24:30.686 PronounceWords[555:907] DEBUG/AR(555) UIView has CAEAGLLayer class

2013-07-02 12:24:30.688 PronounceWords[555:907] DEBUG/AR(555) UIView responds to selector renderFrameQCAR

2013-07-02 12:24:33.155 PronounceWords[555:907] *** -[AVCaptureVideoDataOutput setVideoSettings:] - videoSettings dictionary contains one or more unsupported (ignored) keys: (

    Width,

    AVVideoScalingModeKey,

    Height

)

2013-07-02 12:24:33.169 PronounceWords[555:907] QCARControl camera started

2013-07-02 12:24:33.170 PronounceWords[555:907] Configuring video background (640.000000w x 920.000000h)

2013-07-02 12:24:33.176 PronounceWords[555:907] @>@ ROI center              = [320, 105], S = [576, 147]

2013-07-02 12:24:33.181 PronounceWords[555:907] @>@ Setting loupe to center = [54, 180], S = [76, 300]

2013-07-02 12:24:33.183 PronounceWords[555:907] Configure Video Background: Video (480, 360), Screen (640.000000, 920.000000), mSize (690, 920)

2013-07-02 12:24:33.185 PronounceWords[555:907] Configure Video Background: Viewport x -25, y 0, width 690, height 920

2013-07-02 12:29:20.202 PronounceWords[555:82cf] QCARControl stopCamera

2013-07-02 12:29:20.497 PronounceWords[555:82cf] QCARControl stopTracker type 2

2013-07-02 12:29:20.512 PronounceWords[555:82cf] INFO: successfully stopped tracker

2013-07-02 12:29:20.516 PronounceWords[555:82cf] QCARControl deinitTracker type 2

2013-07-02 12:29:20.563 PronounceWords[555:82cf] QCARControl pauseQCAR

2013-07-02 12:29:20.579 PronounceWords[555:907] CoreData: sql: SELECT 0, t0.Z_PK, t0.Z_OPT, t0.ZWORD, t0.ZUNDERSTANDING, t0.ZWHATTYPE FROM ZLIST t0 JOIN ZPURPOSE t1 ON t0.ZWHATTYPE = t1.Z_PK WHERE  t1.ZTYPE = ? ORDER BY t0.ZWORD COLLATE NSCollateLocaleSensitiveNoCase 

2013-07-02 12:29:20.604 PronounceWords[555:907] CoreData: annotation: sql connection fetch time: 0.0179s

2013-07-02 12:29:20.608 PronounceWords[555:907] CoreData: annotation: total fetch execution time: 0.0289s for 94 rows.

2013-07-02 12:29:20.707 PronounceWords[555:82cf] QCARControl deinitQCAR

2013-07-02 12:29:22.989 PronounceWords[555:907] CoreData: sql: SELECT 0, t0.Z_PK, t0.Z_OPT, t0.ZWORD, t0.ZUNDERSTANDING, t0.ZWHATTYPE FROM ZLIST t0 JOIN ZPURPOSE t1 ON t0.ZWHATTYPE = t1.Z_PK WHERE  t1.ZTYPE = ? ORDER BY t0.ZWORD COLLATE NSCollateLocaleSensitiveNoCase 

2013-07-02 12:29:23.002 PronounceWords[555:907] CoreData: annotation: sql connection fetch time: 0.0090s

2013-07-02 12:29:23.004 PronounceWords[555:907] CoreData: annotation: total fetch execution time: 0.0153s for 94 rows.

2013-07-02 12:29:25.730 PronounceWords[555:907] QCARControl initQCAR

2013-07-02 12:29:25.740 PronounceWords[555:5c1f] INFO/AR(555) 2013-07-02 12:29:25: QCAR SDK version 2.5.7

2013-07-02 12:29:26.011 PronounceWords[555:907] viewFrame is {{0, 20}, {320, 460}}

2013-07-02 12:29:26.250 PronounceWords[555:5c1f] INFO: successfully initialised QCAR

2013-07-02 12:29:26.258 PronounceWords[555:907] QCARControl loadAndActivateTextTrackerWordList

2013-07-02 12:29:26.260 PronounceWords[555:907] QCARControl initTracker type 2

2013-07-02 12:29:26.277 PronounceWords[555:907] INFO: successfully initialised the tracker

2013-07-02 12:29:26.782 PronounceWords[555:907] QCARControl resumeQCAR

2013-07-02 12:29:26.906 PronounceWords[555:907] QCARControl startCameraForViewWidth:andHeight:

2013-07-02 12:29:26.921 PronounceWords[555:907] DEBUG/AR(555) UIView has CAEAGLLayer class

2013-07-02 12:29:26.923 PronounceWords[555:907] DEBUG/AR(555) UIView responds to selector renderFrameQCAR

2013-07-02 12:29:29.267 PronounceWords[555:907] *** -[AVCaptureVideoDataOutput setVideoSettings:] - videoSettings dictionary contains one or more unsupported (ignored) keys: (

    Width,

    AVVideoScalingModeKey,

    Height

)

2013-07-02 12:29:29.281 PronounceWords[555:907] QCARControl camera started

2013-07-02 12:29:29.283 PronounceWords[555:907] Configuring video background (640.000000w x 920.000000h)

2013-07-02 12:29:29.285 PronounceWords[555:907] @>@ ROI center              = [320, 105], S = [576, 147]

2013-07-02 12:29:29.291 PronounceWords[555:907] @>@ Setting loupe to center = [54, 180], S = [76, 300]

2013-07-02 12:29:29.296 PronounceWords[555:907] Configure Video Background: Video (480, 360), Screen (640.000000, 920.000000), mSize (690, 920)

2013-07-02 12:29:29.298 PronounceWords[555:907] Configure Video Background: Viewport x -25, y 0, width 690, height 920

QCAR Failed to Initialize

July 2, 2013 - 5:18am #2

When finshed, we run a method that duplicates the shutdown procedure in TextReco as follows:

Could you please check, because when I compare to the TextReco sample, the code is different (and shown below)

Furthermore it appears you may not be stopping the Text Tracker before you deinit() it.

HTH

N

 

 

 

- (void)applicationWillResignActive:(UIApplication *)application

{

    // Remove any presented view controller that may be on display

    [self rootViewControllerDismissPresentedViewController];

    

    // Stop the camera

    QCARControl* control = [QCARControl getInstance];

    [control stopCamera];

    qcarCameraIsActive = NO;

 

    // Stop and deinitialise the tracker

    (void)[control stopTracker:QCAR::Tracker::TEXT_TRACKER];

    [control deinitTracker:QCAR::Tracker::TEXT_TRACKER];

    

    // Pause and deinitialise QCAR

    [control pauseQCAR];

    [control deinitQCAR];

    

    // Be a good OpenGL ES citizen: now that QCAR is paused and the render

    // thread is not executing, inform the root view controller that the

    // EAGLView should finish any OpenGL ES commands

    [eaglViewController finishOpenGLESCommands];

}

Log in or register to post comments