Start a new topic

Instant tracking crashing - native iOS SDK

Hi,


I have been using Instant tracking feature in Native iOS SDK and encountered several crashes/deadlocks. It seems to be same problem as reported by others, for example here:


https://support.wikitude.com/support/discussions/topics/5000082387


I have seen you posted link to pre-released version but I can't find the Native version of the framework. Could you share a link?


Hello,


I am using latest SDK, Wikitude SDK Native API 2.1.0, Release Date: 28.03.2017.


I have custom app, but it is based on the sample provided. The problem is happening when the tracking state is set to WTInstantTrackerTracking from start.


This is a modified code of WTInstantTrackerViewController.mm

 

- (void)viewDidAppear:(BOOL)animated
{
    [super viewDidAppear:animated];

    [self.renderer setupRenderingWithLayer:[self.eaglView eaglLayer] OpenGLESRenderingAPIs:[NSOrderedSet orderedSetWithObjects:RenderingAPI_OpenGL_ES_2, nil]];
    [self.renderer startRenderLoopWithRenderBlock:[self renderBlock]];

    [self.wikitudeSDK start:nil completion:^(BOOL isRunning, NSError * __nonnull error) {
        if ( !isRunning ) {
            NSLog(@"Wikitude SDK is not running. Reason: %@", [error localizedDescription]);
        }
        else
        {
            self.instantTracker = [self.wikitudeSDK.trackerManager createInstantTracker:self configuration:nil];

           // here start the tracker mode immediately
            [self.instantTracker setActiveInstantTrackingState:WTInstantTrackerTracking];
        }
    }];
}

 

If I run this example and have my phone on the table (camera hidden) it's an instant crash, I attached callstack screenshot (crash_on_start.png). When the phone is up and camera pointing to floor for example it usually doesn't crash.


In our custom app we have a second view, not related to AR and we can switch between AR view and non-AR view. After several switches the app goes to deadlock, you can see another attachment.


Note that this is happening mostly when the tracking state is set to "WTInstantTrackerTracking". When the second state is on "WTInstantTrackerInitializing" the app seems to be stable.

deadlock.png
(126 KB)

Hi Eva,


I've tried the framework you gave me and the deadlock seems to be fixed, thanks for that!


But the crash on start is still there, it's really easy to reproduce, use the sample code from my previous post and run it with camera hidden (or just dark environment). It's 100%.


Vaclav

Hello Vaclav,

We are already aware of this issue and I am happy to report that it is fixed. We will provide a new developer build soon, including this fix.

Thanks
Eva

 

Login or Signup to post a comment