简体   繁体   中英

Stackoverflow error in Visual Studio with C# and XNA . How to inspect the stack?

I have a stackoverflow problem with a C# application written using Visual Studio 2010 and XNA library. My application keep increasing memory usage until it crashes for a stackoverflow.

I would like to inspect the stack to understand where is the bug, but I don't know how to do this using VS 2010.

Can anyone put me in the right direction?

Attach the debugger prior to the problem (or start the application under the debugger)

Then, the easiest way to find your stack overflow is to set the debugger to stop on that exception when thrown; which can be done from the "Exceptions" window (with my keybindings, this can be brought up with CTRL + ALT + E , but also found under the "Debug" menu).

Once stopped, you can use the Stack trace debug window to spy the repeating call that is causing the stack to overflow.

请参阅此链接: http//msdn.microsoft.com/en-us/library/ff540620%28v=vs.85%29.aspx您需要检查递归方法调用。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM