Well. I've tried to customize the popular ImageTargets example. First I tried and succeded to buid the app. Then I converted the files to the ARC-compatitability using Edit->Refactor. Then I added a storyboard to the project and changed the AddDelegate a bit to suit the storyboard-based style. Third I customized the ARParentController class so that arRect is now being inited inside the initWithCoder method. qUtils is inited and two targets are added also there. The code from loadView was moved to viewDidLoad. Well then I added a ViewController to my stryboard and changed it class to the ARParentController. Well, it worked. Then I changed my storyboard so now it has two view controllers, embeded in the UINavigationController. The first one has in it's view a button, which actions in a segue to the second view controller, which one is our ARParentController. Well, this works too. But not for long. After going forward-returning for multiple times (from 2 to 10) the app crashes.
I knew about that the qUtils objects is declared static so it stays right there even when I come back to the first view and that it includes no code that sets targetList array to nil (forgetting about dealloc method which is not called because we have a strong pointer to our qUtils object since it is static), so in initWithCoder of ARParentController I do:
qUtils.targetsList = [NSMutableArray array];
Still it doesn't help. In Instruments utility I see an inceasement of memory used at about 1.5MB and 1500 points in #Live column. After digging into the instruments I noticed that two of the largest leaked objects are pretty similar to the two target .dat files (meaning their size). So I suppose that they are still in memory.
QCAR Inside the UINavigationController
No single idea??
QCAR Inside the UINavigationController
Hi Danchoys
QCAR Inside the UINavigationController
Finally I've found a solution to this issue. The problem definitely lies in the QCAR::deinit() method, it seems to keep some strong references. I decided not to call it anymore and therefore create a private boolean variable called QCARinited.
QCAR Inside the UINavigationController
Great effort !
I'll check with the dev team regarding any potential problems with deinit(), as I know there was an issue with deleteTextures.
If you are able to share the sample integrating ARC and Storyboards, I would really like to see it :)
cheers,
Nalin
QCAR Inside the UINavigationController
Here you are:
https://github.com/Danchoys/ImageTargets-storyboard-sample
Enjoy :)
QCAR Inside the UINavigationController
Great stuff!
Thanks so much for this.
Looking forward to seeing this :)
N
QCAR Inside the UINavigationController
Hi Danchoys,
I tried your sample, but for some reason it just comes up with a blank Navigation controller ?
Have I missed something?
N
QCAR Inside the UINavigationController
Hi Danchoys and all of you
Congratulations! Your work looks very well. I have AR Qualcomm in a NavigationController. When i tried to go back doing
QCAR Inside the UINavigationController
Hello NalinS
I use QCAR library in ARC environment.
It is the same as that of the case of Danchoys, my application crash some times too.
So I want to know wheather to be crashed by an issue with delete textures occurs in ARC environment only or not.
QCAR Inside the UINavigationController
Hi masatoshi_suzuki2002,
The samples have not been built with ARC so you will need to experiment a little.
This is where Danchoys sample is very helpful to study because to my knowledge it does not crash with ARC.
QCAR Inside the UINavigationController
Hello NalinS
QCAR Inside the UINavigationController
I've been followed along the posts on different forums about this issue but didn't figure out how to "do the hack" for QCAR "inside the uinavigation controller".
QCAR Inside the UINavigationController
Hi elsevero,
The easiest thing to do is to start with Danchoys sample and go from there because this is quite a complex thing to do and currently the samples do not show ARC/Storyboard integration.
QCAR Inside the UINavigationController
@NalinS: Thanks for your reply!
QCAR Inside the UINavigationController
Hi elsevero
Is there any new stuff on
Is there any new stuff on Vuforia & Storyboards?
The example on Github does
The example on Github does work.
Do you get a white screen?
Have you tried on an iPad?
N
Yes, I did and example from
Yes, I did and example from github eventually did work with Vuforia 1.5.9, but now that we have 2.0 I did sit down and tried to make it.
No luck so far, I did set my Xcode and Vuforia 2.0 itself, but I have something very similiar to Danchoys version: menu with a "go" button,
Danchoys code should work
Danchoys code should work with 2.0, so not sure where yours is different?
If it's working with 1.5.9 make a copy and attempt a migration to 2.0 as per the migration guide
https://developer.vuforia.com/resources/dev-guide/migrating-your-ios-sdk-project
I'll try right away. Forgot
I'll try right away. Forgot to mention, that I built from scratch and compared parts with Danchoy's version - or at least I thought I did
Took Danchoy's app, fixed
Took Danchoy's app, fixed with migration guide. Now I hane an app that works, from logs I can tell it loaded datasets etc, but ther is no camera....