Log in or register to post comments

App goes to deadlock when pause vuforia

August 2, 2016 - 2:26am #1

Hi, I am struggling to use Vuforia for image detection. The problem occurs when i call pauseAR method to pause the vuforia and the app goes to deadlock. Below i'm attaching the log file as well as corresponding methods. Please let me know what should i do ? Thanks.

 

- (void) pauseAR {
    NSError * error = nil;
    if (![vapp pauseAR:&error]) {
        NSLog(@"Error pausing AR:%@", [error description]);
    }
}

- (void)renderFrameVuforia
{
    [self setFramebuffer];

     .................................      

     .................................

     if (!strcmp(trackable.getName(), "steering_wheel_right_3")) {
         [self pauseAR];

     }
       
           
   .................................      

   .................................

   
    Vuforia::Renderer::getInstance().end();
    [self presentFramebuffer];
}

App goes to deadlock when pause vuforia

June 2, 2017 - 9:03am #4

Hello,

It is normally recommended to stop the trackers before stopping the camera. Please review the Vuforia sample code in SampleApplicationSession.java:

public void stopCamera()

    {

        if (mCameraRunning)

        {

            mSessionControl.doStopTrackers();

            mCameraRunning = false;

            CameraDevice.getInstance().stop();

            CameraDevice.getInstance().deinit();

        }

    }

Thanks.

App goes to deadlock when pause vuforia

May 31, 2017 - 5:04am #3

I am having the same problem, did you get any resolution ? thanks

App goes to deadlock in pause mode of Vuforia

August 3, 2016 - 1:50am #2

Actually my app is deadlocked when i call pauseAR method of vuforia. Please let me know what should i do ?

 

// Pause Vuforia
- (bool)pauseAR:(NSError **)error {
    if (self.cameraIsActive) {
        // Stop and deinit the camera
        if(!Vuforia::CameraDevice::getInstance().stop()) {
            [self NSErrorWithCode:E_STOPPING_CAMERA error:error];
            return NO;
        }
        if(!Vuforia::CameraDevice::getInstance().deinit()) {
            [self NSErrorWithCode:E_DEINIT_CAMERA error:error];
            return NO;
        }
        self.cameraIsActive = NO;
    }
    Vuforia::onPause();
    return YES;
}

Log in or register to post comments