Delphi应用程序挂起
这个 Delphi 2006 应用程序已经成功运行了好几年。我已将其挂起范围缩小到 DPR 文件中的“初始化”之前的某个点,以便在执行任何编写的代码之前挂起。我按下“运行”图标,它不会显示任何其他内容,只是停止运行。没有太多信息可提供,有什么想法吗?
This Delphi 2006 application has run successfully for several years. I have narrowed it hanging up to some point before it gets to the "initialize" in the DPR file so its hanging up before any written code gets executed. I press the "Run" icon and it never displays anything else, just stops running. Not much info to give, any ideas?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在Initialize 行运行之前会发生很多事情。最明显的是,所有单元的初始化部分都在运行。我的心灵调试感觉告诉你应该检查那里。关闭
使用调试 DCU
(是的,关闭,而不是打开;这对本练习有很大帮助)进行构建,通过按 F7 而不是 F9 来运行,并重复使用 F7单步执行初始化链。在此过程中,您可能会发现导致程序挂起的原因。There's a lot of things happening before the Initialize line runs. Most obviously, the initialization sections of all your units are running. My psychic debugging senses say you ought to check there. Build with
Use Debug DCUs
off (yes, off, not on; it helps a lot on this exercise,) run by hitting F7 instead of F9, and use F7 repeatedly to step through your chain of initializations. Somewhere along the line you'll probably find whatever's making your program hang.