这让我发疯,有人可以建议我应该怎么定位问题? [英] It makes me crazy, can someone suggest how should I locate the problem?

查看:79
本文介绍了这让我发疯,有人可以建议我应该怎么定位问题?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


最近,我从离开公司的那个人那里接管了一个旧的C ++产品,这是一个很大的产品,我仍在学习中.

这让我发疯,我此错误 [ ^ ],我无法找到问题所在.

它只会在某些机器上崩溃,而我的老板正站在我身后!

有谁知道如何调试这样的错误?

谢谢

解决方案

这个问题通常很容易解决.几乎100%的确定性是无限"递归或相互递归的结果:
http://en.wikipedia.org/wiki/Recursion [ http://en.wikipedia.org/wiki/Mutual_recursion [
—SA


hi
Recently I take over an old C++ product from the guy who left the company, It''s a big one and I am still learning about it.

It makes me crazy, I got
this error[^] and I can''t find where the problem is.

It only crashs in some of the machines, and my boss is standing behind me!

anyone knows how to debug such an error?

thank you

解决方案

This problem is usually easy to solve. Almost 100% of certainty that this is result of "infinite" recursion or mutual recursion:
http://en.wikipedia.org/wiki/Recursion[^],
http://en.wikipedia.org/wiki/Mutual_recursion[^].

Such problems can be resolved in a very systematic way using the debugger. First, you observe where the exception is thrown. Put a breakpoint before it happens and use the debugger window "Call stack". You will see where the calls come from. Find out the reason for infinite recursion and devise a correct condition of exit from recursion. Usually, the bug can be found very quickly if you combine debugging with simple logic.

—SA


这篇关于这让我发疯,有人可以建议我应该怎么定位问题?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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