artoolkitx / arunityx

artoolkitX for Unity, providing high-performance video acquisition, marker and texture tracking and full Unity Editor support
https://www.artoolkitx.org/
Other
43 stars 22 forks source link

Unable to start ARUnityX on Android due to an InvalidOperation error #63

Closed SimonDarksideJ closed 1 year ago

SimonDarksideJ commented 1 year ago

With an app with the correct permissions configured, the following error occurs on Android when starting the app

2023/05/10 16:20:10.478 15270 15289 Info Unity ARController: ARController.Awake())
2023/05/10 16:20:10.481 15270 15289 Info Unity ARController: ARController.OnEnable()
2023/05/10 16:20:10.499 15270 15289 Info Unity ARController: artoolkitX version 1.1.7 initialised.
2023/05/10 16:20:10.506 15270 15289 Info Unity ARController: ARController.Start(): Application.isPlaying = True autoStart: True
2023/05/10 16:20:10.509 15270 15289 Info Unity ARController: Starting AR.
2023/05/10 16:20:10.546 15270 15289 Info Unity ARController: Render device: Vulkan 1.1.0 [0x00800000], using Unity texturing.
2023/05/10 16:20:10.554 15270 15289 Info Unity ARController: Starting artoolkitX video with vconf '-module=Android -native -prefer=closestpixelcount -width=1280 -height=720 -cachedir="/storage/emulated/0/Android/data/com.UnityTechnologies.com.unity.template.urpblank/cache"'.
2023/05/10 16:20:10.600 15270 15289 Info Unity ARController: Setting artoolkitX tracking settings.
2023/05/10 16:20:10.643 15270 15289 Error Unity InvalidOperationException: Handle is not initialized.
2023/05/10 16:20:10.643 15270 15289 Error Unity   at System.Runtime.InteropServices.GCHandle.Free () [0x00034] in <b0b74789f1894dcc9a389d6f5a51da7d>:0 
2023/05/10 16:20:10.643 15270 15289 Error Unity   at PluginFunctionsARX.arwSetSquareMatrixModeAutocreateNewTrackables (System.Boolean on, System.Single defaultWidth, PluginFunctionsTrackableEventCallback tecb) [0x0002f] in <98ac4f8ddff44cbd9d4d6c05216df565>:0 
2023/05/10 16:20:10.643 15270 15289 Error Unity   at ARController.set_SquareMatrixModeAutocreateNewTrackables (System.Boolean value) [0x00015] in <98ac4f8ddff44cbd9d4d6c05216df565>:0 
2023/05/10 16:20:10.643 15270 15289 Error Unity   at ARController.StartAR () [0x00474] in <98ac4f8ddff44cbd9d4d6c05216df565>:0 
2023/05/10 16:20:10.643 15270 15289 Error Unity   at ARController.Start () [0x0003c] in <98ac4f8ddff44cbd9d4d6c05216df565>:0 
2023/05/10 16:20:10.643 15270 15289 Error Unity 
2023/05/10 16:20:10.646 15270 15289 Info Unity AROrigin: Found 2 trackables eligible to become base trackable.