Hello, I am developing an augmented reality application utilizing the latest Wikitude SDK for Unity. In my application, I utilize an object tracker with an .wto file to manage the tracking of three distinct targets (All within a single gameObject with the ObjectTrackable component and a custom script which manages instantiating per target, attached to it.).
I've been having a few random unity Editor (and built application) crashes when losing targets and also a certain reproducible application crash when quickly and repeatedly activating and inactivating the ObjectTracker component (in order to momentaneously interrupt tracking behaviour). I have been having trouble debugging this issue because the crashes terminate the Editor application but I'm fairly certain it has to do with Wikitude behavior.
If you could help me shed light on this issue, I'd be very thankful for your support as I intend to make commercial use of your technology in this application (after license acquirement).
Thanks in advance,
Error Log attached below.
The problem seems to originate from the SDK. How quickly is the ObjectTracker activated and deactivated?
Do you have ExtendedTracking enabled on the ObjectTrackable? If so, could you try to disable it and see if you still get the same crashes?
The crash can be reproduced by deactivating and reactivating the ObjectTracker component at a rate of about 2 to 3 times per second. I do have ExtendedTracking enabled on my ObjectTrackable gameObject, but disabling it does not seem to affect the crashing in any way. In fact, the error log produced by Unity in this case (attached below) seems pretty much identical to the previous ones, making reference to UnityWikitudeBindings_UpdateObjectTrackerExtendedTargets.
I'm looking forward to finding the solution to this problem!
Thanks for your attention,
There are indeed some issues when disabling and enabling the ObjectTracker this fast. One of the causes is that internally, this reinitializes the tracker, which is a slow operation. We're working on fixing this, but until a fix is available, I would suggest that after you enable the ObjectTracker, you wait for the OnTargetsLoaded event to be triggered before disabling it again. Tracking doesn't start until OnTargetsLoaded is called, so this workaround should work for your use case.
Ok Alexandru. That would solve part of the issue, the other issue I'm encountering, however, is a little different, and less easy to reproduce. In my application, I'm utilizing custom functions to track a collection of object targets from the .wto file. The issue is, while repeatedly alternating between the targets occasionally the tracking behaviour will stop altogether (no more functions being called on detection) and once this circumstance is encountered, I can see no way of restarting the tracking (if I try to disable the ObjectTracker while this is happening the application crashes). Any idea of what this could be linked to?
I want to make sure that I understand the problem correctly.
You are using a .wto file that contains more than one target, and as you are switching from one target to another, tracking suddenly stops?
Would it be possible to send us the .wto file, along with some pictures of the objects that we can track, so that we can reproduce the issue here? You can send them to our support email, if you don't want to share them publicly.
That would be great, thank you.
Please send it at firstname.lastname@example.org