吞咽的东西了未处理的异常?异常、东西、未处理

2023-09-04 05:12:21 作者:暮然回首╭ァ全是基友

在一个应用程序,我正在做,有时会被抛出,但未处理的例外,似乎消失在空气中,并会导致奇怪的错误的图形用户界面。

In an application I'm making, sometimes exceptions that are thrown but unhandled, seem to disappear into thin air and cause strange bugs with the GUI.

我通常会发现它由步进通过,直到到达那里的抛出异常的线,在这一点上的Visual Studio立即停止步进,并返回给应用程序。

I'll usually find it by stepping through until reaching the line where the exception is thrown, at which point Visual Studio immediately stops stepping and returns to the application.

这是一个IRC应用程序,所以它的严重事件驱动的异步套接字连接。不知道这是相关的。

It's an IRC app so it's heavily event-driven by the async socket connection. Not sure if that is relevant.

我没有任何空的catch块的任何地方或类似的东西。

I don't have any empty catch blocks anywhere or anything like that.

推荐答案

显然,这是使用x64机器上已知的bug。

Apparently this is a known bug with x64 machines.

的错误和解决方法是 Microsoft连接。

The bug and a workaround is on Microsoft Connect.

编辑:

如果有人有兴趣的原因,当错误被关闭这个被张贴:

If anyone is interested in the cause, this was posted when the bug was closed:

您好,

此bug已被关闭,外部,因为该行为的结果   64位的Windows句柄​​例外版本如何。当用户模式   除了跨越内核过渡,64位版本的Windows不   允许例外传播。因此,连接调试器   不知道一个例外发生造成的事实   调试器未能打破未处理的异常。

This bug was closed as "External" because this behavior results from how x64 version of Windows handle exceptions. When a user mode exception crosses a kernel transition, x64 versions of Windows do not allow the exception to propagate. Therefore attached debuggers are unaware of the fact that an exception occured resulting in the debugger failing to break on the unhandled exception.

不幸的是,其中是视觉Studo团队能做什么   解决这个问题,它是操作系统设计的结果。所有   关于这个问题,可以反馈给Windows团队;   然而,Windows团队认为这是正确的工作   系统的设计,并考虑在x86的行为是不正确。

Unfortunately where is nothing that the Visual Studo team can do to address this, it is the result of operating system design. All feedback regarding this issue should be addressed to the Windows team; however the Windows team considers this to be the "correct" operating system design, and considers the x86 behavior to be "incorrect".

最好的问候,Visual Studio调试

Best Regards, Visual Studio Debugger