Search Unity

Bug IL2CPP : Garbage callstack on a Win64 thread

Discussion in 'Scripting' started by LightStriker, Aug 23, 2020.

  1. LightStriker

    LightStriker

    Joined:
    Aug 3, 2013
    Posts:
    2,717
    I've been sent a number of .dmp from the game running on Windows. They all occur on a Win64 thread. No idea what that thread is about. It appears to be totally random when or how it happens.

    The Dump matches the symbols - at least Visual Studio tells us it does.

    But the callstack is just complete non-sense, functions not calling each other, one pointing to a for loop increment or even in the middle of an empty line! Each dump has a completely different callstack full of non-sense.



    What is this? Something is crashing, but Windows can't generate a proper dump? How should I debug this?
     
  2. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,938
    Do you happen to have the generated C++ that IL2CPP created when the game was built still? If so, you should be able to link up that generated for with the .dmp file and see at least where this happened.

    Based on the call stack, it looks like a background thread is executing the BuffIconDestructionEventHandler delegate. Then maybe a static constructor for some type is called, and that causes an InvalidCastException to be raised. I can't tell much more than that from the call stack though.
     
  3. LightStriker

    LightStriker

    Joined:
    Aug 3, 2013
    Posts:
    2,717
    This is the generated C++. The dump points to non-sense in the C++.

    That "BuffIconDestructionEventHandler" is not called by non-main thread delegate, and the next call is a Net.Socket constructor, which is also not called by BuffIconDestructionEventHandler. None of those calls are linked to each other.
     
  4. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,938
    I'm unsure then, maybe the .dmp file is not lining up, despite Visual Studio claiming that it does.
     
  5. LightStriker

    LightStriker

    Joined:
    Aug 3, 2013
    Posts:
    2,717
    Yet the dump comes from a live version of the game, and the Player.Log tells me it's the right version.

    Any idea what would "mess up" a dump?
     
  6. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,938
    No, I don't have a good idea. In my experience, they are pretty reliable if Visual Studio indicates that the dump file matches up.

    Maybe the error caused the stack to be corrupted, that is all I can guess.