My simple test project is set up in xcode with the view controller displaying AR at the root of a navigation controller. This view controller then has a simple push/pop segue to another UIViewController (no subclass, just dragged into the storyboard and created a segue). Code provided in the linked gist is called within viewDidAppear.
In the gist above, the view controller (with WTArchitectView) is registered as the delegate - once an architect world loads I'm using the architectView:didFinishLoadArchitectWorldNavigation: method to reference what was loaded due to the fact our use case involves loading more than one architect world in the lifetime of the SDK.
On the first load, all is well. WTArchitectView loads the architect world included in the bundle - the test world doesn't register any trackables, and the CPU sits at ~20%.
If I push a view controller on to the stack (stopping the architectView in viewWillDisappear), and then pop it (restarting in viewDidAppear), then the SDK suddenly pegs the CPU @ ~100%. Please note that the statement in the completion block isn't evaluted the second time, and is essentially a no-op. I'm currently at home, so don't have detailed debug from here, but from memory the thread that's using high CPU is calilng out to something with a C++ namespace of "aramis".
Am I missing something obvious? Happy to expand on the code/explanations provided or even create a sample project on Github if it helps!
almost 2 years ago
Just to add to the above, the method blocking is "aramis::Musketlr2dService::processFrame()" - so looks like it's something to do with image tracking
over 1 year ago
Hi Chris, Might it be that you have multiple WTArchitectViews running at the same time?
Maybe you can share the complete project on e.g. GitHub so that I can have a look at it if you still encounter the same behaviour.