Delphi 11.3 在非集成开发环境中运行时出现217运行时错误。

huangapple go评论135阅读模式
英文:

Delphi 11.3 runtime error 217 while not in IDE

问题

我的问题是,当我从IDE运行我的应用程序时,一切都正常,但如果我尝试从文件浏览器启动应用程序,无论是在调试模式还是发布模式下,都会出现运行时错误217。

有人可以帮助我找出为什么会发生这个错误吗?

我搜索了错误消息中显示的地址,但在.map文件中找不到它。

英文:

My problem is, when I run my application from the IDE then everything works correctly, but if I try to start the application from File Explorer then I get runtime error 217 in both Debug and Release modes.

Can anyone help me to find out why this error is happening?

I search the address displayed in the error message, but it is not in the .map file.

答案1

得分: 2

Runtime error 217 是在启动时安装异常处理框架之前引发未处理的异常,或在关闭时移除框架后引发的。

因此,很可能错误是在你的某个单元的初始化部分引起的。

你的代码中使用初始化部分吗?尝试使用 ShowMessages 来捕获错误发生的时刻。

英文:

Runtime error 217 is thrown when an unhandled exception is raised before the exception handling framework is installed at startup, or after it is removed at shutdown.

So most likely the error is being caused in Initialization section of one of your units.

Do you use initialization sections in your code? Try using ShowMessages to
catch the moment when the bug occurs.

答案2

得分: 1

我找到了解决方案:
我安装了EurekaLog,并在初始化过程中发生错误,指向Skia。我卸载了Skia4Delphi,然后应用程序正常工作了。
我在这个应用程序中没有使用Skia,但我测试了Skia,所以Skia是我的主窗体使用的单元之一。我在进行构建时找到了这个引用。我移除了这个引用,之后就没有出现错误了。

英文:

I've found the solution:
I installed EurekaLog and an error during initialization was pointed at Skia. I uninstalled Skia4Delphi and then the application worked correctly.
I don't use Skia in this application but I tested Skia so Skia was one of the units used by my main form. I found this reference while doing a build. I remove the reference and after that no more error.

huangapple
  • 本文由 发表于 2023年6月21日 23:21:55
  • 转载请务必保留本文链接:https://go.coder-hub.com/76524880.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定