System.StackOverflowException"出现在sample.DLL中 [英] System.StackOverflowException' occurred in sample.DLL
本文介绍了System.StackOverflowException"出现在sample.DLL中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在asp.net中遇到了一个问题,但有一个例外...
System.StackOverflowException''在sample.DLL
i had face a problem in asp.net with an exception...
System.StackOverflowException'' occurred in sample.DLL
推荐答案
中出现心灵感应能力;我没有,但格里夫有;他只是在开玩笑:-)).
在这种情况下,几乎100%是使用递归或相互递归(不止一种方法在循环中互相调用).在这种情况下,此递归结束后,您的bug不会提供条件.
It''s not nice of your to ask such questions without showing any code (Griff''s right about telepathic abilities; I don''t have them, but Griff does; he is just kidding :-)).
Almost 100% of such cases is when you use recursion or mutual recursion (of more than one methods calling each other in cycle). In such cases, your bug is not providing a condition when this recursion ever finishes.
- 了解有关主题的信息: http://en.wikipedia.org/wiki/Recursion [ ^ ], ^ ].
- 分析您的代码.
- 当您一次又一次到达同一代码点时,请使用调试器并检测情况.通常,它很容易找到.
- 修复该错误.
- 利润!
- Read about the subj.: http://en.wikipedia.org/wiki/Recursion[^], http://en.wikipedia.org/wiki/Mutual_recursion[^].
- Analyze your code.
- Use debugger and detect situation when you get to the same point of code again and again. Usually it''s quite easy to find.
- Fix the bug.
- PROFIT!
阅读有关 ^ ]
这篇关于System.StackOverflowException"出现在sample.DLL中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文