问题描述
我正在使用Turbo Explorer 2006(更新2),有时IDE会在某个单元中崩溃,尤其是当我尝试使用类完成功能时。该单元(和整个项目)已经投入生产并且运行良好,并且每天进行修改,只是IDE工具失败了。
I'm using Turbo Explorer 2006 (update 2), and sometimes the IDE crash in a certain unit, specially when I try to use class-completion. The unit (and whole project) are in production and have run fine for years, with daily modifications, it's just the IDE tools that fail.
通常,如果发生这种情况,Delphi在崩溃中幸存下来,但IDE的某些部分已失效(例如,工具提示中单位不在.dpr中的表达式的调试值)
Usually if this happens, Delphi survives the crash, but some parts of the IDE are defunct (e.g. debug values in tooltips for expressions whose unit is not in the .dpr)
我怀疑解析器死于某些特定的构造,可能是某些东西,因为这个单元是一个巨大的系统交换机。
I suspect the parser dies on some specific construct, probably something ifdef'ed, since this unit is an enormous switchboard of systems.
某人知道杀死IDE的特定构造吗?我想解决此问题,以便再次使用类完成功能。
Does sb know specific constructs that kill the IDE? I'd like to fix this so I can use class-completion again.
推荐答案
Delphi IDE和(在较小程度上) )编译器非常脆弱。许多非预期的构造会引起奇怪的问题。因此,要临时猜测您的情况会带来什么麻烦并不容易。 (您描述单位的方式,我怀疑IFDEF可能会发挥作用。)
The Delphi IDE and (to a lesser extent) compiler are quite fragile. Many non-expected constructs will cause strange problems. So it's not easy to guess off-hand what's the trouble in your case. (The way you describe your unit, I suspect the IFDEF's may play a role though.)
在问题消失之前,您是否可以对代码的某些部分进行注释,看到可能会引起乳头吗?如果您的单位是 ABCD
,请尝试
Can't you comment-out parts on the code until the problem disappears, to see whay may causes it ? If your unit is A B C D
, try with
(* A B *) C D
如果没有错误,请尝试
A B (* C D *)
然后也许
(* A *) B (* C D *)
等直到只剩下一小部分不可还原的部分。由于您是在测试IDE而不是编译器,因此您可能不需要注释掉的单元就可以毫无错误地进行编译。
etc. until only a small unreducible part of your unit remains. Since you're testing the IDE not the compiler, you probably don't need your commented-out unit to compile without error.
这篇关于使Delphi IDE崩溃的已知构造的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!