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

**URL:** <https://forums.unrealengine.com/t/runtime-error-in-xcode-when-generating-mesh-data-for-mobile-ar-build/2395840>\
**Category:** Mobile\
**Tags:** unreal-engine, bug-report, question\
**Created:** [March 17, 2025, 1:57pm UTC](https://forums.unrealengine.com/t/runtime-error-in-xcode-when-generating-mesh-data-for-mobile-ar-build/2395840 "2025-03-17T13:57:40Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![sugar-portion](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@sugar-portion](https://forums.unrealengine.com/u/sugar-portion)\
**Post date:** [March 17, 2025, 1:57pm UTC](https://forums.unrealengine.com/t/runtime-error-in-xcode-when-generating-mesh-data-for-mobile-ar-build/2395840/1 "2025-03-17T13:57:40Z")

</div>

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.”

 ![error](https://d3kjluh73b9h9o.cloudfront.net/original/4X/8/4/8/848755b85d4dc1bccb68ece176f264bbb884770e.png)

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)’

---

<div class="post-metadata">

**Author:** ![TTF\_eric1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@TTF\_eric1](https://forums.unrealengine.com/u/TTF_eric1)\
**Post date:** [March 20, 2025, 3:30pm UTC](https://forums.unrealengine.com/t/runtime-error-in-xcode-when-generating-mesh-data-for-mobile-ar-build/2395840/2 "2025-03-20T15:30:42Z")

</div>

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

> **[Discord - Group Chat That’s All Fun & Games](https://discord.com/channels/857917944611602449/857917944611602455/1045004693409108038)**
>
> Discord is great for playing games and chilling with friends, or even building a worldwide community. Customize your own space to talk, play, and hang out.

thx-e

---

<div class="post-metadata">

**Author:** ![sugar-portion](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@sugar-portion](https://forums.unrealengine.com/u/sugar-portion)\
**Post date:** [March 21, 2025, 1:10pm UTC](https://forums.unrealengine.com/t/runtime-error-in-xcode-when-generating-mesh-data-for-mobile-ar-build/2395840/3 "2025-03-21T13:10:39Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![TTF\_eric1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@TTF\_eric1](https://forums.unrealengine.com/u/TTF_eric1)\
**Post date:** [March 21, 2025, 2:12pm UTC](https://forums.unrealengine.com/t/runtime-error-in-xcode-when-generating-mesh-data-for-mobile-ar-build/2395840/4 "2025-03-21T14:12:33Z")

</div>

you can check it out here on UDN, [https://udn.unrealengine.com/s/question/0D54z00008PS4rGCAT/invalid-mesh-data-from-tracked-geo](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) &&
