System.StackOverflowException"出现在sample.DLL中 [英] System.StackOverflowException' occurred in sample.DLL

查看:68
本文介绍了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.


  1. 了解有关主题的信息: http://en.wikipedia.org/wiki/Recursion [ ^ ],

  1. Read about the subj.: http://en.wikipedia.org/wiki/Recursion[^], http://en.wikipedia.org/wiki/Mutual_recursion[^].
  2. Analyze your code.
  3. Use debugger and detect situation when you get to the same point of code again and again. Usually it''s quite easy to find.
  4. Fix the bug.
  5. PROFIT!



-SA



—SA


阅读有关 ^ ]


这篇关于System.StackOverflowException"出现在sample.DLL中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆