Crashlytics names Unity IL2CPP frames by the last `__text` symbol (code in `__TEXT,il2cpp` is not symbolicated)
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 45/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Ambito
- backend, observability-sre
Direzione di ricerca
Start by tracing Crashlytics symbolication for Unity iOS frames and how it selects symbols from Mach-O sections. The report identifies __TEXT,il2cpp as the section whose symbols are missed and provides nm, atos, and dSYM examples to reproduce the discrepancy. Done means IL2CPP frames resolve to their own symbols and source locations; no source files or tests are named in the issue.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Environment: Unity 6000.3.10f1 (IL2CPP, iOS arm64), Firebase Unity SDK 14.0.0, firebase-ios-sdk 13.0.1 through SPM, Xcode 27.0, iOS 27.0.1.
In a Unity game on iOS every crash frame that lands in the game's own code shows up in Crashlytics like this:
4 UnityFramework +[UIViewController(APMScreenClassName) load].cold.1 + 58254812
5 UnityFramework +[UIViewController(APMScreenClassName) load].cold.1 + 5880816
6 UnityFramework +[UIViewController(APMScreenClassName) load].cold.1 + 53461080
The issue also gets its title from that symbol, so crashes in different game functions would group together. Engine frames in the same binary are symbolicated fine, with file and line. The dSYMs of both UnityFramework and the app show as Uploaded in the dSYMs tab.
I think the cause is where Unity puts the generated code. IL2CPP compiles C# methods with __attribute__((section("__TEXT,il2cpp,regular,pure_instructions"))) (IL2CPP_METHOD_ATTR in libil2cpp/os/c-api/il2cpp-config-platforms.h), so UnityFramework gets a second code section right after __text, and most of the code is there:
$ size -m UnityFramework.framework.dSYM/Contents/Resources/DWARF/UnityFramework
Segment __TEXT: 98959360
Section __text: 24425816
Section il2cpp: 61729148
The symbol Crashlytics picks is exactly the last one of __text, and the next symbol is the first of il2cpp:
$ nm -n -m UnityFramework | grep -A1 'APMScreenClassName) load].cold.1'
000000000174f544 (__TEXT,__text) non-external +[UIViewController(APMScreenClassName) load].cold.1
000000000174f558 (__TEXT,il2cpp) non-external (was a private external) _CanvasExtensions_ShouldGammaToLinearInMesh_m5452ACD7E987301A30A72812E4D86720D5B9BDE5
The dSYM itself has everything. It has about 269k symbols in (__TEXT,il2cpp) and DWARF for the generated .cpp files, and atos resolves those addresses with file and line:
$ atos -o UnityFramework.framework.dSYM/Contents/Resources/DWARF/UnityFramework -arch arm64 -l 0 0x174f600
Color32Extensions_LinearToGamma_m254DEAA3F6BB7D912898E80AE34B83EBEAD8740F (in UnityFramework) (Coffee.UIParticle.cpp:3022)
So it looks like the symbolication only uses symbols from __TEXT,__text and takes the nearest one before the address. Could it also use the symbols of the other code sections of __TEXT (the ones marked S_ATTR_PURE_INSTRUCTIONS)? Every Unity IL2CPP game on iOS has this section, so I'd guess most of them see the same thing.
Turning the section off in IL2CPP isn't a good workaround for us, because the IL2CPP runtime uses its bounds to build managed stack traces. For now I resolve these frames by hand with atos (symbol address from the dSYM plus the offset Crashlytics shows).
Let me know if you need a sample dSYM or a crash ID, I can share them privately.
- Lingua principale
- C#
- Stelle
- 325
- Fork
- 62
- Merge medio
- 1g 17h
- PR unite (30g)
- 13
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di firebase/firebase-unity-sdk
-
[Bug] Desktop managed DLLs marked Required32Bit fail to load on ARM64 CoreCLR (Unity 7 alpha)Forse già presa @AustinBenoit l’ha presa oggi. Apertaapi: core desktop production type: bug
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
firebase/firebase-unity-sdk#1566 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
api: core
Difficoltà 4/5 3-5 giorni Idoneità per principianti 43/100
firebase/firebase-unity-sdk#1562 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
[Bug] App Check (iOS): crash in TokenChangedMethod because AppCheckToken.expire_time_millis is left uninitializedForse già presa @AustinBenoit l’ha presa 7 giorni fa. Apertaapi: appcheck type: bug
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
firebase/firebase-unity-sdk#1556 · 6 commenti · 1 reazione · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
api: firestore type: feature request
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
firebase/firebase-unity-sdk#1543 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
api: appcheck desktop production type: bug
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
firebase/firebase-unity-sdk#1530 · 3 commenti ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di firebase/firebase-unity-sdk
Issue simili
-
Support Flux ignore rules (drift detection ignore paths) in Microsoft.KubernetesConfiguration schemaAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
Azure/azure-resource-manager-schemas#3921 ·
I maintainer di solito rispondono entro 1 giorno
-
text-align: justify is ignored in HTML to PDF conversionForse già presa @PrzemyslawKlys l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 78/100
I maintainer di solito rispondono entro 4 giorni
-
documentation
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100