你好
我有一个非常复杂的应用程序,该应用程序还通过命名管道使用进程间通信,并通过InteropServices等在其周围复制非托管内存.退出应用程序时收到的许多潜在的访问冲突错误0xc0000005的来源 在释放模式下.现在,我只是不知道如何以及在哪里开始搜索.我可以执行类似于C/C ++中的内存泄漏检测(_CrtSetDbgFlag(_CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF);)的操作吗?
I have a quite complex application which also uses inter process communication via named pipes and copying unmanaged memory around via InteropServices, etc. I.e. lots of potential sources for the access violation error 0xc0000005 I get when I exit the application in release mode. Now I just don't have a clue how and where to start my search. Can I do something similar to the memory leak detection in C/C++ (_CrtSetDbgFlag ( _CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF );)?
我正在应用程序端中止一些线程,在Debug中,我看到了相应的异常(LsfmInterop.dll中发生了'System.Threading.ThreadAbortException类型的异常,但未在用户代码中处理).就是这样.
I'm aborting a few threads at application end and in Debug I see according exceptions (an exception of type 'System.Threading.ThreadAbortException' occurred in LsfmInterop.dll but was not handled in user code). But that's about it.
预先感谢您的任何建议
推荐答案
Hi Neutronensturm,
Hi Neutronensturm,
如果您打开抛出异常时中断",对于CLR异常(VS中的Ctrl+Alt+E),在调试时执行应该中断,并引发异常.这可能会让您对正在发生的事情有所了解.
If you turn on "Break when an exception is Thrown" for CLR Exceptions (Ctrl+Alt+E in VS), execution should break while you are debugging and the exception is thrown. This will probably give you some insight into what is going on.
更多推荐
MyApp.vshost.exe:“托管(v4.0.30319)"已退出,代码为
发布评论