Runtime Error in Xcode When Generating Mesh Data for Mobile AR Build

I created a new project using the HandheldAR template in Unreal Engine 5.5.4. After that, I attempted to run it on Xcode, but encountered the following issue.

Device used: iPhone 15 Pro

  1. Building and running HandheldARBlankMap as is
    → Successfully executed without any issues.
  2. Enabling “Generate Mesh Data from Tracked Geometry” in D_ARSessionConfig and then building
    → When debugging via Xcode by connecting to the iPhone, the attached error occurs at the moment the app detects geometry after tapping “Begin Scan.”

I am looking for a solution to this issue.

Could the following error message in the image be related?

validateNewTexture:74: failed assertion `Offset of a buffer-backed texture with pixelFormat(MTLPixelFormatRGBA8Unorm) must be aligned to 64 bytes, found offset(32)’

There has been a bug in AppleARKitMeshData.cpp for ages that Epic has never fixed. Though I don’t recall anything about a texture error associated with it…

Not sure if this is the bug you are hitting, but, you can check out this posting for a simple fix

thx-e

Thank you for the information. However, when I visited the link you provided, it said “The chat does not exist.”

you can check it out here on UDN, https://udn.unrealengine.com/s/question/0D54z00008PS4rGCAT/invalid-mesh-data-from-tracked-geo

you need to modify the AppleARKitMeshData.cpp file

look for lines
line 180 InVertices.stride == sizeof(FVector) &&
and
line 229 InNormals.stride == sizeof(FVector) &&

replace those with:

line 180 InVertices.stride == sizeof(FVector3f) &&
and
line 229 InNormals.stride == sizeof(FVector3f) &&