Replies: 1 comment
-
From the symptom it can be caused by stack overflow. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Platform / Build
Symptom
So the only change that consistently fixes it is turning the large return type from struct → class.
Relevant code (simplified)
If I change Data to a class and update code accordingly, crashes stop.
Minimal native crash excerpt (from .ips)
No managed stack/exception shows. It’s a native abort:
So: native SIGSEGV right after we finish building/returning the large struct; no managed exception surfaces.
What we tried
Question
Why would returning a very large, deeply nested struct from AOT’d .NET iOS code cause sporadic native SIGABRT (no managed exception), while the exact same logic works on Android/WPF — and switching that type to a class fixes it on iOS?
Any pointers to best practices (e.g., prefer classes for large DTOs on iOS, use ref struct/in/out patterns, or known fixes/workarounds) would be hugely appreciated.
Beta Was this translation helpful? Give feedback.
All reactions