#Niantic.ARDK.AR.Mesh._MeshDataParser#: Error getting mesh data, will not update the mesh

Include the following details (edit as applicable):

  • Issue category: ARMeshManager, MeshDataParser
  • Device type & OS version: Android
  • Host machine & OS version: Mac
  • Issue Environment : On Device
  • ARDK version: 2.4.1
  • Unity version: 2022.2.16f1

Description of the issue:
Hi there,
Using ARMesh generation by ARMeshManager from examples, I’m struggling with the following errors.
I have no idea what possibly causes the error at all.
Could it be a memory issue? Because it happens to crash after the error occurs.

There is no other useful callstacks available.
No other errors from my application scripts.

Much appreciated that if anyone can give any idea of where I should look into.

#Niantic.ARDK.AR.Mesh._MeshDataParser#: Error getting mesh data, will not update the mesh.
UnityEngine.DebugLogHandler:LogFormat(LogType, Object, String, Object[])
UnityEngine.Logger:Log(LogType, Object)
Niantic.ARDK.Utilities.Logging.UnityARLogHandler:Error(String) (at /Users/greenchilli/Workspace/com.logstudios/games/HouseDragon-Builder/Assets/ARDK/Utilities/Logging/LogHandler/UnityARLogHandler.cs:41)
Niantic.ARDK.Utilities.Logging.ARLog:_Error(String) (at /Users/greenchilli/Workspace/com.logstudios/games/HouseDragon-Builder/Assets/ARDK/Utilities/Logging/ARLog.cs:198)
Niantic.ARDK.AR.Mesh._MeshDataParser:GetBlocksAndValidateSize(_IARMeshData, Int32, Int32, Int32) (at /Users/greenchilli/Workspace/com.logstudios/games/HouseDragon-Builder/Assets/ARDK/AR/Mesh/_MeshDataParser.cs:242)
Niantic.ARDK.AR.Mesh._MeshDataParser:UpdateMeshBlocks(_IARMeshData, Int32, Int32, Int32) (at /Users/greenchilli/Workspace/com.logstudios/games/HouseDragon-Builder/Assets/ARDK/AR/Mesh/_MeshDataPars

Hey Jeremy,

While testing I didn’t run into this exact issue but I did run into other issues with the AR session. Is there a particular reason why you need version 2.4.1? ARDK 2 is currently on v2.5.2 I would definitely recommend upgrading to it if possible.

Additionally, Unity 2022 is not officially supported at the moment. We support up to 2021.3 but I would first recommend upgrading ARDK versions before changing Unity versions. Some users have reported having no issues with 2022 but results may vary. If that doesn’t work then I would recommend switching to a version of Unity 2021.3

I did run the latest version of Unity 2021.3 with ARDK 2.5.2 and meshing worked as expected. If upgrading ARDK is not an option at the moment, can you send in screenshots of your Mesh managers so that I can have a look at the settings?

Hi Jesus Hernandez,

Thank you for your reply, I’ve realized I’m using out dated version.
It seems the newer version has mostly scan feature updates.
I cannot tell if the version matters, I’d better upgrade it to 2.5.2 though.
I will give it a try and see how things are going.

As for the Unity version 2022.2 seems okay to me so far. I need the 2022 version of Unity at the moment. If it keeps ARDK unstable, then I should try to downgrade the version.

ARMeshManager settings are almost the same as the builtin sample project except for mesh materials. After further test with the recent version, I will get back to you.

Thanks again,

Yes, I would highly recommend upgrading to ensure that the issue isn’t happening due to being on an older version. Is there a particular reason for needing 2022 such as a feature that 2021 doesn’t have?

I did further investigation on this matter.
I had assumed the following method always returns a valid mesh block.
But I’ve realized it’s not true. The mesh block is not always available and valid. I happened to refer to the old mesh block/mesh renderer which was already destroyed by AR Mesh generator.
The error message probably comes out when I tried to access and use the invalid mesh block somehow. It seems a little complicated than I thought.
It would be great to have more elaborate error messages so that ARDK users can understand clearly what’s going behind the scene.

On conclusion, it rarely gives the error since I put some error handling in case of invalid/null mesh block. Even if the error occurs, it could be ignorable at the moment.

As for the Unity version, it works okay so far. It’s not about any particular feature. When I started using Mac Silicon, I experienced Unity was very unstable. I’ve realized 2021 LTS has many updates since then, I hope the recent version is stable enough.
And it’s something to do with package dependencies and a few minor features and convenience matters for me. Anyway, Unity2022 seems to work okay so far.

Recently I am experiencing a crash while rendering ARMesh at runtime on Android device. I tried Unity2021 for comparison because I thought Unity2022 build could be unstable somehow.
But even Unity2021 has the same crash issue too. ARDK stability is nothing to do with Unity version to me so far. Now I’m struggling with the crash, which seems to be associated with URP material/shader.