Errors in android logcat during app start after migrating from ML to OpenXR XR Provider

Dear Magic Leap Team,

unfortunately after migrating from Magic Leap to OpenXR XR Provider we experience a bunch of errors in the android logcat which slows down/freezes the app during start up and we don't exactly know why they occur.

The errors are the following and occur many more times with slightly different microseconds after the automatically requested permissions are granted and the app starts. The full android logcat is attached further below.

2024.09.30 15:16:25.263 9180 9231 Error com.company.example leapcore/frameworks/perception/data_sources/include/pad/xpad_data_source.h(105) GetClosestTimestampedData():
2024.09.30 15:16:25.263 9180 9231 Error com.company.example ERR: Data Not Found for timestamp: 306370788us, now time: 306595672us
2024.09.30 15:16:25.263 9180 9231 Error com.company.example leapcore/frameworks/perception/data_sources/include/pad/xpad_data_source.h(105) GetClosestTimestampedData():
2024.09.30 15:16:25.263 9180 9231 Error com.company.example ERR: Data Not Found for timestamp: 306370788us, now time: 306595782us
2024.09.30 15:16:25.263 9180 9231 Error com.company.example leapcore/frameworks/perception/data_sources/include/pad/xpad_data_source.h(105) GetClosestTimestampedData():
2024.09.30 15:16:25.263 9180 9231 Error com.company.example ERR: Data Not Found for timestamp: 306370788us, now time: 306595946us

We followed this documentation for the migration:
Migrating to OpenXR
https://Configure Existing MRTK 3 Project
Magic Leap MRTK 3 Settings
From the MagicLeap MRTK3 template project we copied over the MRTK XR Rig - MagicLeap - OpenXR to our scenes and every other feature we needed to change for OpenXR apart from the above error seems to be working fine.

Furthermore, the feature groups we use are the following:

First, we thought the errors are related to a wrong setup in our scenes during migration, but after only including the MRTK3 Hand and Controller Interaction Examples scene (from the Magic Leap MRTK3 package) in the build settings the errors still persisted.

We made sure to check the sample projects from MagicLeap for OpenXR and there we did not encounter the errors. But the sample project also does not use the MRTK3 package.

Therefore we would say it could be something related to our project settings in combination with OpenXR and MRTK3.

We also looked into this forum post and enabled the perception snapshots as well as switched from using the non async methods to the async methods without any success of resolving the issue.

Unity Editor version: 2022.3.19f1
ML2 OS version: 1.9
Unity SDK version: 2.3
Host OS: Windows
Magic Leap MRTK3 version: 1.2

Error messages from android logcat (anonymized a bit):
logcat.txt (165.2 KB)

Please let us know if you need any further information like e.g. more project settings.

Thank you for your help and always quick response.

Best regards

Does the application continue to run slowly even after the application initializes? Have you tried disabling the Meshing feature inside your application?

The log you are pointing to is expected, and can occur when too much time passes between frames. Are there any additional plugins that you are including that initialize on application start? Have you noticed this issue in the MRTK template project?

After initialization the app runs smoothly, only during application start the errors occur.

With the meshing feature disabled we still get this error when only building with the HandAndControllerInteractionExamples scene (from the Magic Leap MRTK3 package) and not including any of our scripts (but still using our project settings). Even if we disable all features except "Magic Leap 2 Support", we still run into the timestamp errors.

Additionally, we now also found out that it seems to be a known issue for Unity MRTK3 1.2.0 that we experience performance issues. However enabling the "Graphic Jobs (experimental)" lead to our application not starting anymore.

I will try to reproduce this issue in the MRTK3 template project next, but it is using the Magic Leap XR Provider and not the OpenXR XR Provider, so i have to change the provider there first to get a similar setup like in our application which might take a while.

Inside the OpenXR sample project from MagicLeap (which does not use MRTK3) we were not able to reproduce the issue.

We have a separate OpenXR branch that uses the OpenXR workflow instead of the legacy XR loader.

We are aware that Graphic Jobs does not work when using the legacy method but should work correctly when using OpenXR.

The timestamp issue that you mention is normal and is just informing you that the frame rate dropped and some perception features such as meshing, might not be calculated correctly because of the delay. However, once your application initializes the features should work as expected.

The OpenXR branch was very helpful, thanks!

We tested the MRTK3 OpenXR project and only were able to reproduce the timestamp error 1-3 times when switching the scenes very quickly.

After further testing and narrowing down the time where the error occurs we can confirm that it happens everytime the frame rate drops. To be precise, for us this error occured everytime we loaded scenes additively. In conclusion, we will take this as a hint that we need to further optimize our scenes/scene loading.

Nevertheless, thank you for your help.