Closed mrrenaud closed 2 months ago
Hi @mrrenaud,
Thank you for reaching out.
We will try to reproduce the issue and get back to you once we have an update.
Hi @mrrenaud,
I was not able to reproduce the issue with the sync version of the method. Would it be possible for you to give us some more info on how you encountered the problem?
It would be really helpful for us to know which version of iOS is installed on your device and which version of Xcode you're using to build the project. Also, is this something that happens with any dataset (even the default VuforiaMars_Image database) or only with a specific one? And finally, would it be possible for you to send us an example of the code in which you're using the methods?
Thank you!
I'll try to give you a repro as soon as possible !
I have the same problem on hololens2
private async void CreateImageTarget(Texture2D texture)
{
if (texture == null)
{
Debug.LogError("AR Texture is null");
}
var mTarget = await VuforiaBehaviour.Instance.ObserverFactory.CreateImageTargetAsync(
texture,
0.1f,
"ar");
}
error is samilar
NullReferenceException: Object reference not set to an instance of an object.
at Vuforia.Internal.Core.ObserverFactory.
Hi @ChasingD, thank you for your report. We are still not able to reproduce the issue, but I'm wondering what would happen if you called the method with the additional TrackingOptimization
argument. Could you please try to call the method like this?
VuforiaBehaviour.Instance.ObserverFactory.CreateImageTargetAsync(texture, 0.1f, "ar", TrackingOptimization.DEFAULT);
Also, for completeness, which version of Unity are you using?
Hi @ChasingD, thank you for your report. We are still not able to reproduce the issue, but I'm wondering what would happen if you called the method with the additional
TrackingOptimization
argument. Could you please try to call the method like this?VuforiaBehaviour.Instance.ObserverFactory.CreateImageTargetAsync(texture, 0.1f, "ar", TrackingOptimization.DEFAULT);
Also, for completeness, which version of Unity are you using?
thanks for you reply! hololens2, unity 2022.3.34, vuforia 10.24.4 but i can't call method VuforiaBehaviour.Instance.ObserverFactory.CreateImageTargetAsync(texture, 0.1f, "ar", TrackingOptimization.DEFAULT); there is no method.
Hi @ChasingD, I got some APIs mixed up, my bad.
I have a couple more questions, because the issue is still not reproducible on my side:
private async void CreateImageTarget(Texture2D texture)
method that you added in your previous comment?Hi @ChasingD, I got some APIs mixed up, my bad.
I have a couple more questions, because the issue is still not reproducible on my side:
- Are you trying to create more than one target at the same time?
- At which point of the Vuforia lifecycle are you trying to create the targets? Is Vuforia initialized and started?
- Would it be possible for you to send us an example of the code in which you are calling the
private async void CreateImageTarget(Texture2D texture)
method that you added in your previous comment?
hi @ptc-epassaro , my bad. I solved the problem: i build the app to arm. it works in arm64. could vuforia support arm platform?
Hi @ChasingD, glad to know that it works on ARM64! For UWP the only supported architectures are ARM64 and x64.
Unfortunately there's no plan to support 32-bit ARM in the future, as Microsoft themselves are also on the way to deprecate ARM 32-bit. If possible for you, I would also recommend you to only use ARM64.
Thank you for your update!
Hi @mrrenaud, are you still facing this issue or do you have a more detailed repro case? We are not able to reproduce it on our side.
Closing this issue due to inactivity. Feel free to reopen it if the problem persists.
Summarize the bug:
ObserverFactory.CreateImageTarget(string databasePath, string targetName)
throws exception on iOS, whileObserverFactory.CreateImageTargetAsync(string databasePath, string targetName)
works well.Observed problem
When creating image target from a database in the local StreamingAsset folder, it fails to create the target if we use the synchronous CreateImageTarget method.
However, using the CreateImageTargetAsync version doesn't throw and creates the target as expected.
Expected result Both methods should succeed.
Other observations On Android, both versions of the method works well. It only fails on iOS.
Reproducible steps Steps to reproduce the behavior:
Affected Vuforia Engine version: v10.25.4.
Affected platform:
Affected device:
Device or platform logs
Log with errors :
Working log :
Workaround Always use the *Async method
Additional comments //