Unity 6 - Line numbers
I maintainer di solito rispondono entro 3 giorni
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 28/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Da chiarire
- Stato di attività
- Ferma
- Ambito
- game-dev, observability
Direzione di ricerca
Inizia da src/Sentry.Unity/Il2CppEventProcessor.cs e src/Sentry.Unity/Integrations/UnityApplicationLoggingIntegration.cs, quindi confronta il comportamento degli stacktrace delle eccezioni di Unity 6 descritto qui con il flusso di elaborazione esistente. Il lavoro sarà completato quando gli stacktrace di Unity 6 manterranno le informazioni su metodo, file e riga, mentre l’SDK eviterà l’elaborazione IL2CPP non necessaria quando i nuovi dati saranno disponibili.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Context
To provide line numbers we're added the IL2CppEventProcessor. The main responsibility of this processor is to call into the IL2CPP backend, get the native stacktrace and match it with the managed one and fix instruction addresses. With those Sentry is able to serverside symbolicate the issue.
Unity 6
What's New
Unity 6 introduced a new option to the IL2CPP configuration and exception can now include method name, file name, and line number.
Triggering a NullReferenceException and logging is via exception.toString() results in the following logs
System.NullReferenceException: Object reference not set to an instance of an object.
at BugFarmButtons.ThrowNull () [0x00000] in /Users/bitfox/Workspace/sentry-unity/samples/unity-of-bugs/Assets/Scripts/BugFarmButtons.cs:24
at UnityEngine.Events.UnityEvent.Invoke () [0x00000] in <00000000000000000000000000000000>:0
at System.Collections.Generic.Enumerable.EnumerableIList`1[T]..ctor (System.Collections.Generic.IList`1[T] list) [0x00000] in /Users/bitfox/Workspace/sentry-unity/src/sentry-dotnet/modules/Ben.Demystifier/src/Ben.Demystifier/Enumerable/EnumerableIList.cs:15
at UnityEngine.EventSystems.StandaloneInputModule.ReleaseMouse (UnityEngine.EventSystems.PointerEventData pointerEvent, UnityEngine.GameObject currentOverGo) [0x00000] in ./Library/PackageCache/com.unity.ugui@03407c6d8751/Runtime/UGUI/EventSystem/InputModules/StandaloneInputModule.cs:192
at UnityEngine.EventSystems.StandaloneInputModule.ProcessMouseEvent (System.Int32 id) [0x00000] in ./Library/PackageCache/com.unity.ugui@03407c6d8751/Runtime/UGUI/EventSystem/InputModules/StandaloneInputModule.cs:554
at UnityEngine.EventSystems.StandaloneInputModule.ProcessMouseEvent () [0x00000] in ./Library/PackageCache/com.unity.ugui@03407c6d8751/Runtime/UGUI/EventSystem/InputModules/StandaloneInputModule.cs:534
at UnityEngine.EventSystems.StandaloneInputModule.Process () [0x00000] in ./Library/PackageCache/com.unity.ugui@03407c6d8751/Runtime/UGUI/EventSystem/InputModules/StandaloneInputModule.cs:282
What does this enable
Line numbers for Debug.LogError
Events captured via Debug.LogError automatically contain line numbers as these are parsed from the stringified stacktrace in the ApplicationLoggingIntegration.
Line numbers for unhandled exceptions
In Unity 6 and newer, with this option enabled, the SDK no longer needs to go register the IL2CPP processor to calling into the IL2CPP backend. This also means, stacktraces and linenumbers work without debug symbol upload.
Note, that this most likely comes at a cost to performance.
Notes
It is not required to opt-in having stacktraces in the player settings. The exception itself has the proper stacktrace with line numbers.
- Lingua principale
- C#
- Stelle
- 295
- Fork
- 63
- Merge medio
- 3g 17h
- PR unite (30g)
- 26
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun 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 getsentry/sentry-unity
-
Feature Unity
Difficoltà 2/5 1-3 ore Idoneità per principianti 45/100
getsentry/sentry-unity#2923 · 1 commento ·
I maintainer di solito rispondono entro 3 giorni
-
Tests Unity
Difficoltà 4/5 3-5 giorni Idoneità per principianti 55/100
getsentry/sentry-unity#2918 · 1 commento ·
I maintainer di solito rispondono entro 3 giorni
-
Drop `Release` and `Environment` from the editor config windowForse già presa @armadavalor l’ha presa 1 giorno fa. ApertaBreaking Change Editor Good First Issue Improvement Unity
Difficoltà 2/5 1-3 ore Idoneità per principianti 58/100
getsentry/sentry-unity#2914 · 1 commento ·
I maintainer di solito rispondono entro 3 giorni
-
Make CI stable and fasterAperta
Difficoltà 5/5 Più di una settimana Idoneità per principianti 20/100
getsentry/sentry-unity#2913 · 1 commento ·
I maintainer di solito rispondono entro 3 giorni
-
Feature Unity
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
getsentry/sentry-unity#2796 · 4 commenti ·
I maintainer di solito rispondono entro 3 giorni
Tutte le issue di getsentry/sentry-unity
Issue simili
-
needs-area-label
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 63/100
I maintainer di solito rispondono entro 1 giorno
-
bug github_actions
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
endercodezz/BYDLO#336 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
SubtitleEdit/subtitleedit#16638 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100