SwiftUI app crash with __swift_instantiateConcreteTypeFromMangledName

Hello,

I am experiencing a crash in a SwiftUI app.

  • It happens when I place multiple views inside a ScrollView.
  • The crash occurs only on a physical device (it does not reproduce in the Simulator).
  • It happens during runtime, seemingly while SwiftUI is updating or laying out the view hierarchy.
  • I have not been able to determine the exact cause.

I am attaching a text file with the entire backtrace from LLDB.

Is this a known SwiftUI issue?

Any recommendations on how to further investigate or work around it?

Any help or suggestions would be appreciated.

Xcode 16.3 / iOS 18.6.2

Thank you!

Could you show the code ?

How many views in the scrollView ? More than 10 ?

And try to localise the error:

  • comment out all views in scroll view except the first
  • does it crash ?
  • if yes, analyse this view
  • otherwise, uncomment the second subview
  • and continue until you get a crash

Note: if there are many views, you can speed up with dichotomy approach.

SwiftUI app crash with __swift_instantiateConcreteTypeFromMangledName
 
 
Q