我有一个应用程序,只有在程序关闭后才会抛出异常。这是非常不一致的。 (我们都知道多么有趣的不一致的错误是...)程序终止后引发的异常(遇到的错误)
我的猜测是在清理过程中出现错误。但是,这些内存读/写错误似乎表明我的“不安全”代码使用情况(指针?)有问题。
我感兴趣的是调试这些情况的最佳方法是什么?
如何调试已关闭的程序?
我正在寻找一个解决更大问题的出发点。
这些错误似乎展示自己在几个方面(一些运行时,一些调试):
1: .NET-BroadcastEventWindow.2.0.0.0.378734a.0: Application.exe - Application Error
The instruction at "0x03b4eddb" referenced memory at "0x00000004". The memory could not be "written". 2: Application.vshost.exe - Application Error
The instruction at "0x0450eddb" referenced memory at "0x00000004". The memory could not be "written". 3: Application.vshost.exe - Application Error
The instruction at "0x7c911669" referenced memory at "0x00000000". The memory could not be "read". 4: Application.vshost.exe - Application Error
The instruction at "0x7c910ed4" referenced memory at "0xfffffff8". The memory could not be "read".
是的,它是多线程的。我意识到开发人员倾向于避免大量的线程数量的应用程序,但我的应用程序可以同时运行多个动画图形,因此显着的线程数量。 – PersistenceOfVision 2008-10-08 14:12:09
多线程本身并不是一个罪过,但它更有可能不是一个错误的线程(或两个)在您的进程终止后很长一段时间内充电到远处。关闭应用程序后检查运行的进程。 – 2008-10-08 14:20:18