如何调试 VB6 崩溃?

发布于 2024-11-14 21:11:38 字数 269 浏览 1 评论 0原文

我有一个应用程序,一旦编译就可以完美运行。 执行操作时(例如,将鼠标移到其上、单击某物、移动窗口等...)

但是,如果我在 VB6 环境中启动它,它会不断且相当随机地使 IDE 崩溃,但只有当我对应用程序 做了很多与 VB6 无关的事情:SIP、虚拟声卡接口、音频编码/解码等...所以可能是这样,但崩溃似乎是随机的。

崩溃总是发生在 vba6.dll 模块中(至少崩溃对话框是这么说的)。鉴于MS不再支持VB6,我该如何调试它?

我在XP和Win7上都试过了,结果是一样的。

I have an app that once compiled runs perfectly fine. However, if I start it in VB6 environment, it crashes the IDE constantly and pretty randomly, but only when I take action with the application (e.g. move mouse over it, click on something, move a window, etc...)

The application does a lot of things that one does not associate with VB6: SIP, virtual sound card interfaces, audio encoding/decoding, etc...so it could be that, but the crashes seems so random.

The crash always occurs in the vba6.dll module (at least that's what the crash dialog says). Given that MS no longer supports VB6, what can I do to debug it?

I've tried it on XP and Win7 with the same results.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

貪欢 2024-11-21 21:11:38

某些 API/DLL 函数很可能与 VB IDE 不兼容。我们有时会为 IDE 和 EXE 编写不同的代码,因此我们的 Windows 子类化和 API 绘图函数也位于另一个 dll(或 ocx)中以避免崩溃。此外,我们在软件中使用了 GPF 处理程序(SetUnhandledExceptionFilter 和相关 API 函数),但这仅在 EXE 中打开 - 无论如何在 IDE 中不起作用。我们的 GPF 主要出现在 EXE 中:)

为了调试,您可以排除一些代码路径,特别是与 Windows 消息传递/子类化、全局钩子、绘图和 API 回调相关的代码路径。您可以安装一些更好的调试器(甚至 VC 也可以使用)来查看调用堆栈 - 有时这包括系统函数名称,暗示错误操作。

It is quite possible that some API/DLL functions are not compatible with VB IDE. We sometimes write different code for IDE and EXE, so are our windows subclassing and API drawing functions located in another dll (or ocx) to avoid crashing. In addition we use GPF handler (SetUnhandledExceptionFilter and related API functions) in our software, but this is turned on only in EXE - doesn't work in IDE anyway. Our GPFs occured mostly in EXE either :)

For debugging you can just exclude some code paths, esp related to windows messaging/subclassing, global hooks, drawing and API callbacks. You can install some better debugger (even VC is usable) to see call stack - sometimes this includes system function names, hinting to erroneus operation.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文