Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice

Resolved Il2cpp useless stack traces (for async/await)

Discussion in 'Experimental Scripting Previews' started by Kamyker, Nov 3, 2020.

  1. Kamyker

    Kamyker

    Joined:
    May 14, 2013
    Posts:
    1,091
    Upvote https://issuetracker.unity3d.com/is...pting-back-end-when-async-slash-await-is-used
    -----------------


    I'm sending all exceptions to online analytics to quickly fix bugs but sometimes il2cpp stack traces are useless and it's impossible to see what caused an issue or where it happened:
    Code (CSharp):
    1. public class TestButton: MonoBehaviour
    2. {
    3.     [SerializeField] Button button;
    4.  
    5.     private void Start()
    6.     {
    7.         button.onClick.AddListener( async () => await TestTask() );
    8.         //or button.onClick.AddListener( () => TestTask() );
    9.     }
    10.  
    11.     private async Task TestTask()
    12.     {
    13.         await Task.Yield();
    14.         throw new System.NullReferenceException();
    15.     }
    16.  
    17.     //or
    18.     //private async void Start()
    19.     //{
    20.     //    await Task.Yield();
    21.     //    throw new System.NullReferenceException();
    22.     //}
    23. }

    Mono:
    Code (CSharp):
    1. NullReferenceException: Object reference not set to an instance of an object.
    2.   at TestButton+<TestTask>d__8.MoveNext () [0x0006e] in <d18fdfa825c14b36ae03c1897d413257>:0
    3. --- End of stack trace from previous location where exception was thrown ---
    4.   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <4756199cf52a4f14b33cdcc5659f782e>:0
    5.   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0003e] in <4756199cf52a4f14b33cdcc5659f782e>:0
    6.   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in <4756199cf52a4f14b33cdcc5659f782e>:0
    7.   at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in <4756199cf52a4f14b33cdcc5659f782e>:0
    8.   at System.Runtime.CompilerServices.TaskAwaiter.GetResult () [0x00000] in <4756199cf52a4f14b33cdcc5659f782e>:0
    9.   at TestButton+<<Start>b__6_0>d.MoveNext () [0x00062] in <d18fdfa825c14b36ae03c1897d413257>:0
    10. --- End of stack trace from previous location where exception was thrown ---
    11.   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <4756199cf52a4f14b33cdcc5659f782e>:0
    12.   at System.Runtime.CompilerServices.AsyncMethodBuilderCore+<>c.<ThrowAsync>b__6_0 (System.Object state) [0x00000] in <4756199cf52a4f14b33cdcc5659f782e>:0
    13.   at UnityEngine.UnitySynchronizationContext+WorkRequest.Invoke () [0x00002] in <12d10dc81c174d13b71f46cfb761f21d>:0
    14. UnityEngine.DebugLogHandler:Internal_LogException(Exception, Object)
    15. UnityEngine.DebugLogHandler:LogException(Exception, Object)
    16. UnityEngine.Logger:LogException(Exception, Object)
    17. UnityEngine.Debug:LogException(Exception)
    18. UnityEngine.WorkRequest:Invoke()
    19. UnityEngine.UnitySynchronizationContext:Exec()
    20. UnityEngine.UnitySynchronizationContext:ExecuteTasks()
    Il2cpp:
    Code (CSharp):
    1. NullReferenceException: Object reference not set to an instance of an object.
    2.   at Test.remove_EventSingle (Delegate value) [0x00000] in <00000000000000000000000000000000>:0
    3.   at System.Threading.ContextCallback.Invoke (System.Object state) [0x00000] in <00000000000000000000000000000000>:0
    4.   at System.Threading.ExecutionContext.RunInternal (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) [0x00000] in <00000000000000000000000000000000>:0
    5.   at System.Runtime.CompilerServices.AsyncMethodBuilderCore+MoveNextRunner.Run () [0x00000] in <00000000000000000000000000000000>:0
    6.   at System.Action.Invoke () [0x00000] in <00000000000000000000000000000000>:0
    7.   at System.Threading.SendOrPostCallback.Invoke (System.Object state) [0x00000] in <00000000000000000000000000000000>:0
    8.   at UnityEngine.WaitForSecondsRealtime.set_waitTime (System.Single value) [0x00000] in <00000000000000000000000000000000>:0
    9.   at UnityEngine.UnitySynchronizationContext.Exec () [0x00000] in <00000000000000000000000000000000>:0
    10. --- End of stack trace from previous location where exception was thrown ---
    11.   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x00000] in <00000000000000000000000000000000>:0
    12.   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x00000] in <00000000000000000000000000000000>:0
    13.   at System.Reflection.TargetParameterCountException..ctor (System.String message) [0x00000] in <00000000000000000000000000000000>:0
    14.   at Test.remove_EventSingle (Delegate value) [0x00000] in <00000000000000000000000000000000>:0
    15.   at System.Threading.ContextCallback.Invoke (System.Object state) [0x00000] in <00000000000000000000000000000000>:0
    16.   at System.Threading.ExecutionContext.RunInternal (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) [0x00000] in <00000000000000000000000000000000>:0
    17.   at System.Runtime.CompilerServices.AsyncMethodBuilderCore+MoveNextRunner.Run () [0x00000] in <00000000000000000000000000000000>:0
    18.   at System.Action.Invoke () [0x00000] in <00000000000000000000000000000000>:0
    19.   at System.Threading.ContextCallback.Invoke (System.Object state) [0x00000] in <00000000000000000000000000000000>:0
    20.   at System.Threading.Tasks.AwaitTaskContinuation.RunCallback (System.Threading.ContextCallback callback, System.Object state, System.Threading.Tasks.Task& currentTask) [0x00000] in <00000000000000000000000000000000>:0
    21.   at System.Threading.Tasks.SynchronizationContextAwaitTaskContinuation.Run (System.Threading.Tasks.Task task, System.Boolean canInlineContinuationTask) [0x00000] in <00000000000000000000000000000000>:0
    22.   at System.Threading.Tasks.Task.FinishContinuations () [0x00000] in <00000000000000000000000000000000>:0
    23.   at System.Threading.Tasks.Task.Finish (System.Boolean bUserDelegateExecuted) [0x00000] in <00000000000000000000000000000000>:0
    24.   at System.Threading.Tasks.Task`1[TResult].TrySetException (System.Object exceptionObject) [0x00000] in <00000000000000000000000000000000>:0
    25.   at System.Threading.AsyncLocal`1[T].set_Value (T value) [0x00000] in <00000000000000000000000000000000>:0
    26.   at Test.remove_EventSingle (Delegate value) [0x00000] in <00000000000000000000000000000000>:0
    27.   at System.Threading.ContextCallback.Invoke (System.Object state) [0x00000] in <00000000000000000000000000000000>:0
    28.   at System.Threading.ExecutionContext.RunInternal (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) [0x00000] in <00000000000000000000000000000000>:0
    29.   at System.Runtime.CompilerServices.AsyncMethodBuilderCore+MoveNextRunner.Run () [0x00000] in <00000000000000000000000000000000>:0
    30.   at System.Action.Invoke () [0x00000] in <00000000000000000000000000000000>:0
    31.   at System.Threading.SendOrPostCallback.Invoke (System.Object state) [0x00000] in <00000000000000000000000000000000>:0
    32.   at UnityEngine.WaitForSecondsRealtime.set_waitTime (System.Single value) [0x00000] in <00000000000000000000000000000000>:0
    33.   at UnityEngine.UnitySynchronizationContext.Exec () [0x00000] in <00000000000000000000000000000000>:0
    34. --- End of stack trace from previous location where exception was thrown ---
    35.   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x00000] in <00000000000000000000000000000000>:0
    36.   at System.Threading.SendOrPostCallback.Invoke (System.Object state) [0x00000] in <00000000000000000000000000000000>:0
    37.   at UnityEngine.WaitForSecondsRealtime.set_waitTime (System.Single value) [0x00000] in <00000000000000000000000000000000>:0
    38.   at UnityEngine.UnitySynchronizationContext.Exec () [0x00000] in <00000000000000000000000000000000>:0
    39. UnityEngine.Logger:LogException(Exception, Object)
    40. UnityEngine.Debug:LogException(Exception)
    41. UnityEngine.WaitForSecondsRealtime:set_waitTime(Single)
    42. UnityEngine.UnitySynchronizationContext:Exec()
    It also doesn't work correctly in Debug il2cpp mode.
     
    Last edited: Dec 19, 2020
    VolodymyrBS and JanSelchow like this.
  2. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,936
    Can you submit a bug report for this issue? It looks like something that we should correct.
     
  3. Kamyker

    Kamyker

    Joined:
    May 14, 2013
    Posts:
    1,091
    1289863

    That project is a bit messy but it seems like that's the reasons of missing stack trace.

    In clean project I get:
    Code (CSharp):
    1. NullReferenceException: Object reference not set to an instance of an object.
    2.   at TestButton.<Start>b__2_0 () [0x00000] in <00000000000000000000000000000000>:0
    3.   at System.AsyncCallback.Invoke (System.IAsyncResult ar) [0x00000] in <00000000000000000000000000000000>:0
    4.   at System.Threading.ExecutionContext.RunInternal (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) [0x00000] in <00000000000000000000000000000000>:0
    5.   at System.Runtime.CompilerServices.AsyncMethodBuilderCore+MoveNextRunner.Run () [0x00000] in <00000000000000000000000000000000>:0
    6.   at System.Action.Invoke () [0x00000] in <00000000000000000000000000000000>:0
    7.   at System.Runtime.Serialization.DeserializationEventHandler.Invoke (System.Object sender) [0x00000] in <00000000000000000000000000000000>:0
    8.   at UnityEngine.WaitForSecondsRealtime.set_waitTime (System.Single value) [0x00000] in <00000000000000000000000000000000>:0
    9.   at UnityEngine.UnitySynchronizationContext.Exec () [0x00000] in <00000000000000000000000000000000>:0
    10. --- End of stack trace from previous location where exception was thrown ---
    11.   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x00000] in <00000000000000000000000000000000>:0
    12.   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x00000] in <00000000000000000000000000000000>:0
    13.   at System.Reflection.TargetParameterCountException..ctor (System.String message) [0x00000] in <00000000000000000000000000000000>:0
    14.   at TestButton.<Start>b__2_0 () [0x00000] in <00000000000000000000000000000000>:0
    15.   at System.AsyncCallback.Invoke (System.IAsyncResult ar) [0x00000] in <00000000000000000000000000000000>:0
    16.   at System.Threading.ExecutionContext.RunInternal (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) [0x00000] in <00000000000000000000000000000000>:0
    17.   at System.Runtime.CompilerServices.AsyncMethodBuilderCore+MoveNextRunner.Run () [0x00000] in <00000000000000000000000000000000>:0
    18.   at System.Action.Invoke () [0x00000] in <00000000000000000000000000000000>:0
    19.   at System.AsyncCallback.Invoke (System.IAsyncResult ar) [0x00000] in <00000000000000000000000000000000>:0
    20.   at System.Threading.Tasks.AwaitTaskContinuation.RunCallback (System.Threading.ContextCallback callback, System.Object state, System.Threading.Tasks.Task& currentTask) [0x00000] in <00000000000000000000000000000000>:0
    21.   at System.Threading.Tasks.SynchronizationContextAwaitTaskContinuation.Run (System.Threading.Tasks.Task task, System.Boolean canInlineContinuationTask) [0x00000] in <00000000000000000000000000000000>:0
    22.   at System.Threading.Tasks.Task.FinishContinuations () [0x00000] in <00000000000000000000000000000000>:0
    23.   at System.Threading.Tasks.Task.Finish (System.Boolean bUserDelegateExecuted) [0x00000] in <00000000000000000000000000000000>:0
    24.   at System.Threading.Tasks.Task`1[TResult].TrySetException (System.Object exceptionObject) [0x00000] in <00000000000000000000000000000000>:0
    25.   at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[TResult].Create () [0x00000] in <00000000000000000000000000000000>:0
    26.   at TestButton.<Start>b__2_0 () [0x00000] in <00000000000000000000000000000000>:0
    27.   at System.AsyncCallback.Invoke (System.IAsyncResult ar) [0x00000] in <00000000000000000000000000000000>:0
    28.   at System.Threading.ExecutionContext.RunInternal (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) [0x00000] in <00000000000000000000000000000000>:0
    29.   at System.Runtime.CompilerServices.AsyncMethodBuilderCore+MoveNextRunner.Run () [0x00000] in <00000000000000000000000000000000>:0
    30.   at System.Action.Invoke () [0x00000] in <00000000000000000000000000000000>:0
    31.   at System.Runtime.Serialization.DeserializationEventHandler.Invoke (System.Object sender) [0x00000] in <00000000000000000000000000000000>:0
    32.   at UnityEngine.WaitForSecondsRealtime.set_waitTime (System.Single value) [0x00000] in <00000000000000000000000000000000>:0
    33.   at UnityEngine.UnitySynchronizationContext.Exec () [0x00000] in <00000000000000000000000000000000>:0
    34. --- End of stack trace from previous location where exception was thrown ---
    35.   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x00000] in <00000000000000000000000000000000>:0
    36.   at System.Runtime.Serialization.DeserializationEventHandler.Invoke (System.Object sender) [0x00000] in <00000000000000000000000000000000>:0
    37.   at UnityEngine.WaitForSecondsRealtime.set_waitTime (System.Single value) [0x00000] in <00000000000000000000000000000000>:0
    38.   at UnityEngine.UnitySynchronizationContext.Exec () [0x00000] in <00000000000000000000000000000000>:0
    39. UnityEngine.Logger:LogException(Exception, Object)
    40. UnityEngine.Debug:LogException(Exception)
    41. UnityEngine.WaitForSecondsRealtime:set_waitTime(Single)
    42. UnityEngine.UnitySynchronizationContext:Exec()
    A bit better, now I have TestButton.<Start> but still not as good as mono (TestButton+<TestTask>). Anyway once a bit more code is added to the project then that line is somehow replaced with something completely random:
    Code (CSharp):
    1.  
    2. NullReferenceException: Object reference not set to an instance of an object.
    3.   at TestInput.get_XRScheme () [0x00000] in <00000000000000000000000000000000>:0
    4.  
    5.   at System.Threading.ContextCallback.Invoke (System.Object state) [0x00000] in <00000000000000000000000000000000>:0
    6.  
    7.   at System.Threading.ExecutionContext.RunInternal (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) [0x00000] in <00000000000000000000000000000000>:0
    8.  
    9.   at System.Runtime.CompilerServices.AsyncMethodBuilderCore+MoveNextRunner.Run () [0x00000] in <00000000000000000000000000000000>:0
    10.  
    11.   at UnityEngine.LowLevel.PlayerLoopSystem+UpdateFunction.Invoke () [0x00000] in <00000000000000000000000000000000>:0
    12.  
    13.   at System.Runtime.Serialization.DeserializationEventHandler.Invoke (System.Object sender) [0x00000] in <00000000000000000000000000000000>:0
    Project that gives that error: https://drive.google.com/file/d/1L_4s7bbTEL0dBNQQ9_UaZXctKfoGtfMI/view?usp=sharing

    In my main project I get these kind of weird stack traces with tons of unrelated calls, for ex:
    Code (CSharp):
    1. IndexOutOfRangeException: Index was outside the bounds of the array.: MusicPlayer+<RaiseVolume>d__21.System.Collections.IEnumerator.Reset () (at <00000000000000000000000000000000>:0)
    2. BA.Game.UI.ResultController.SetResults (System.Int32 mapScore, System.Int32 maxCombo, System.Int32 totalScore, System.Single accuracy) (at <00000000000000000000000000000000>:0)
    3. TextCtrl+<DDAnim>d__5.System.Collections.IEnumerator.Reset () (at <00000000000000000000000000000000>:0)
    4. BA.Game.GameFlow.GameEnded (System.Boolean won) (at)
    These are 3 lines out of 30+ reported, MusicPlayer+<RaiseVolume>:
    Code (CSharp):
    1. IEnumerator RaiseVolume()
    2. {
    3.     while ( AudioListener.volume < volume )
    4.     {
    5.         AudioListener.volume += Time.deltaTime * 0.1f;
    6.         yield return null;
    7.     }
    8. }
    This bug couldn't even happen here :(
     
  4. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,936
    Thanks for the bug report. It is certainly possible that stack traces with IL2CPP may be missing frames due to inlining. But there should not be any incorrect frames. We will investigate this.
     
  5. Kamyker

    Kamyker

    Joined:
    May 14, 2013
    Posts:
    1,091
    Haven't heard any response so far
     
  6. Peter77

    Peter77

    QA Jesus

    Joined:
    Jun 12, 2013
    Posts:
    6,618
    But this should not be the case in debug builds, right?
     
  7. Kamyker

    Kamyker

    Joined:
    May 14, 2013
    Posts:
    1,091
    Mono - fine
    Mono Development - fine
    Il2cpp - wrong
    Il2cpp Debug C++ compiler configuration - wrong
    Il2cpp Development - fine (Release or Debug C++ compiler configuration)

    Tried attaching
    [MethodImpl( MethodImplOptions.NoInlining )]
    to code above and also to all methods and properties in all managed dlls using Cecil, il2cpp generated noinline but it didn't help. No idea, myb c++ async runner gets inlined?

    Il2cpp development build doesn't fix my problem, can't distribute that to players.

    Would it be somehow possible to force il2cpp development build behavior in normal il2cpp for specific methods or whole async/await logic?

    I'd like to know if this issue is possible to fix or not so I can start going back to mono or change as much as possible async/await to coroutines.
     
    Last edited: Nov 22, 2020
  8. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,936
    I'm unsure why our QA team did not process this bug report yet. I've pinged them about it.
     
  9. Kamyker

    Kamyker

    Joined:
    May 14, 2013
    Posts:
    1,091
    still nothing
     
  10. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,936
    It looks like our QA team started to process it, but then ran into an unrelated issue, and may have moved it to the back burner. I'll ping them again. Thanks for following up here.
     
    Kamyker likes this.
  11. Kamyker

    Kamyker

    Joined:
    May 14, 2013
    Posts:
    1,091
    JoNax97 and JoshPeterson like this.
  12. Prodigga

    Prodigga

    Joined:
    Apr 13, 2011
    Posts:
    1,123
    Just wanted to add a +1 here. We use Async/await and get really whacky call stacks on unity crash reports when viewing the stack trace
     
  13. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,936
    I've finally had a chance to look into this issue. Thanks again for reporting it, these stack trace problems can be very specific to the code layout in a given project, and therefore difficult to reproduce.

    It turns out the problem is not specific to async/await workflows. More generally, IL2CPP is reporting incorrect stack frame entries for any instance methods on value types. Due to an implementation detail about how IL2CPP implements these methods, they were not being found properly by the stack trace creation code.

    I've been able to correct this issue, and it should be going out to patch releases in all active versions of Unity.

    @Kamyker: I'll ping you via the submitted bug report when the fix clears our testing and code review processes.
     
    JesOb, Kamyker, VolodymyrBS and 2 others like this.
  14. Kamyker

    Kamyker

    Joined:
    May 14, 2013
    Posts:
    1,091
    me everyday checking the issue
     
    Prodigga likes this.
  15. CheeryLee

    CheeryLee

    Joined:
    Feb 23, 2014
    Posts:
    17
  16. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,936
    Regarding line numbers in stack traces, it is on out list of things we would like to do, but we've not had the resources to complete it yet. I'm hoping that will change soon, but I cannot promise anything.
     
    grizzly likes this.
  17. Kamyker

    Kamyker

    Joined:
    May 14, 2013
    Posts:
    1,091

    Hmm, is Planned after or before Fix In Review?
     
  18. Kamyker

    Kamyker

    Joined:
    May 14, 2013
    Posts:
    1,091
    I disagree you can always split a method to smaller parts to pinpoint an issue.


    The wait for 2020.2.5 begins.

    @JoshPeterson Thank you!
     
    Last edited: Feb 15, 2021
    RGV and Prodigga like this.
  19. CheeryLee

    CheeryLee

    Joined:
    Feb 23, 2014
    Posts:
    17
    I'm not sure it's a good idea, just a total overkill. If the feature was present in other backend, then it must be in the current one too.
     
  20. pistoleta

    pistoleta

    Joined:
    Sep 14, 2017
    Posts:
    539
    Not fixed in 2020.3 ? wth
     
  21. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,936
    This should be corrected in 2020.3 as well. Any fixes in 2020.2 will also be in 2020.3.
     
  22. pistoleta

    pistoleta

    Joined:
    Sep 14, 2017
    Posts:
    539
    Then should I assume this stacktrace does not correspond to this issue? Seems quite similar.

    Code (CSharp):
    1. System.NullReferenceException: Object reference not set to an instance of an object.
    2.   Module "System.Runtime.ExceptionServices.ExceptionDispatchInfo", in Throw
    3.   Module "System.Threading.SendOrPostCallback", in Invoke
    4.   Module "UnityEngine.UnitySynchronizationContext+WorkRequest", in Invoke
    5.   Module "UnityEngine.UnitySynchronizationContext", in Exec
    6.  
    Im using Unity 2020.3.33 , IL2CPP iOS Builds

    If its not the case and this has nothing to do with the issue has someone some hint for me to find the issue? I'm aware there's a nullref somewhere in the code but without more info im lost. Btw I can't reproduce it has happened to some dozens of players.

    Thanks in advance
     
  23. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,936
    It would not surprise me if this is a different stack trace issue. Where is that stack trace generated from? The word "Module" in is a bit odd - I don't think that normally shows up in C# stack traces.
     
  24. pistoleta

    pistoleta

    Joined:
    Sep 14, 2017
    Posts:
    539
    I think module is something Sentry adds, in normal stack traces I see the class and the method after 'Module'
    this is a normal stack trace received by Sentry too:

    Code (CSharp):
    1. System.NullReferenceException: Object reference not set to an instance of an object.
    2.   Module "PeopleLoader", in KillHuman
    3.   Module "HumanScripts", in KillPeopleInBuilding
    4.   Module "BuildingDataLoader", in RemoveBuilding
    5.   Module "BuildController", in BuildYes
    6.   Module "UnityEngine.Events.UnityAction", in Invoke
    7.   Module "UnityEngine.Events.UnityEvent", in Invoke
    8.   Module "UnityEngine.EventSystems.ExecuteEvents+EventFunction`1", in Invoke
    9.   Module "UnityEngine.EventSystems.ExecuteEvents", in Execute
    10.   Module "UnityEngine.InputSystem.UI.InputSystemUIInputModule", in ProcessPointerButton
    11.   Module "UnityEngine.InputSystem.UI.InputSystemUIInputModule", in ProcessPointer
    12.   Module "UnityEngine.InputSystem.UI.InputSystemUIInputModule", in Process
    As you can see this one tells all the info I need to pinpoint the source, but with the other one I have no way to know where the game is crashing
     
  25. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,936
    You may want to check with Sentry to see if there is a way to get the "raw" call stack. They are definitely doing some post processing here. I wonder if that is related to the problem in the original case you mentioned.
     
  26. pistoleta

    pistoleta

    Joined:
    Sep 14, 2017
    Posts:
    539
    Ok thanks !
     
  27. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,936
  28. Baste

    Baste

    Joined:
    Jan 24, 2013
    Posts:
    6,338
    Woop woop!

    Will be very, very useful when getting logs from consoles, so we know where in the
    #if UNITY_THECONSLE
    section the error is coming from :)