visionOS 27.0 simulator restarts (backboardd EXC_BREAKPOINT in DRValidateIndices) on MeshResource.generate(from:) for a valid multi-part mesh

Since moving to Xcode 27.0 (27A266a) with the visionOS 27.0 simulator runtime (24M362), generating a mesh with several parts through MeshResource.generate(from: MeshResource.Contents) makes the simulator go black for a couple of seconds and restart. The app does not crash; the simulator's render server does:

Thread ... Crashed :: com.apple.CoreRE.ResourceFetchManager-service-queue
0 DirectResource  specialized static IndexValidation._validate_neon(_:vertexCount:)
1 DirectResource  DRValidateIndices
2 CoreRE          re::(anonymous namespace)::validatePrivateData(id<REMeshPayload>, unsigned char const*, unsigned long)
3 CoreRE          -[REMultiBufferMeshPayload initWithCoder:]
4 Foundation      _decodeObject

Environment: MacBook Pro (M1 Pro, 16 GB), macOS 27.0 (26A428), Xcode 27.0 (27A266a), visionOS 27.0 SDK (24M361); failing runtime visionOS 27.0 simulator (24M362); working: the visionOS 26.5 simulator runtime (23O470) under the same Xcode, and an Apple Vision Pro on visionOS 27.

What I have established:

  • It reproduces with a fully synthetic mesh: one model, three parts (1330 / 20 / 24 vertices, 9513 / 72 / 120 indices), random positions, normals, UVs and triangle indices. Only the part layout matters.
  • The mesh is valid: every part's indices are within its own vertex count, counts are multiples of three, attribute buffers match. RealityKit's app-side validator agrees and lets it through (it does reject a broken part with REMeshPartDescriptor: index buffer payload range is invalid), then the render server's validator traps on the accepted payload.
  • Single-part meshes of any size, primitives, and compiled .reality scenes are fine.
  • Same mesh, same Xcode: fine on a simulator device created on the 26.5 runtime, fine on a visionOS 27 device. Only the 27.0 simulator runtime traps.

FB number: FB24831983.

Workarounds so far: a simulator device on the 26.5 runtime, or generating one MeshResource per part. Has anyone seen DRValidateIndices trapping on the 27.0 simulator?

Thank you @VaiStardom ! I'll make sure the feedback ticket you reported is directed to the right people.

I was able to reproduce your results.

You are right to point out this path happens when generating a mesh directly in the Simulator (an actual visionOS device works as expected, at least in this case). The first workaround you could try: If your mesh data exists in a USD file or a Reality File (exported from Reality Composer Pro) you should be able to load your content without issue.

Alternatively, if you aren't able to author the data as USD or Reality before your app loads it, you could try padding each mesh part with degenerate triangle indices until the length is a multiple of 4:

var indices = p.indices
if let last = indices.last {
    while indices.count % 4 != 0 { indices.append(contentsOf: [last, last, last]) }
}

This will add triangles to your MeshResource but they will be discarded before rasterization, and won't affect the bounds of the mesh. If you need to generate multi-part meshes in the simulator, this workaround should allow your app to run as intended.

Thanks again for your detailed feedback ticket and your question! Let me know if the above workaround is useful for you, otherwise you should receive updates on the feedback ticket when the status changes. Thank you!

visionOS 27.0 simulator restarts (backboardd EXC_BREAKPOINT in DRValidateIndices) on MeshResource.generate(from:) for a valid multi-part mesh
 
 
Q