How to debug System.StackOverflowException without link to source code?

后端 未结 2 1097
陌清茗
陌清茗 2021-01-18 04:10

Recently, I am regularly encountering errors of type

\"An unhandled exception of type \'System.StackOverflowException\' occurred in Unknown Module.

2条回答
  •  不思量自难忘°
    2021-01-18 04:36

    StackOverflowException is usually caused by some method which invokes itself endlessly.

    The fact that it occurs after some time makes me even more adamant about it: you're facing infinite recursion.

    An extremely simple example of this behavior would be:

    void SomeMethod()
    {
        SomeMethod(); // StackOverflowException
    }
    

提交回复
热议问题