Program crash with System.ObjectDisposedException

孤街醉人 提交于 2019-12-05 03:34:08

Wow, an ObjectDisposedException that isn't caught by a top-level catch block?

I'm not sure what I would do in this case - obviously, you want to see the stack trace and find out just what it is that was disposed. There are a few un-catch-able exceptions, but this one isn't one of them. I'd probably attach a handler to the AppDomain.UnhandledException event, and see if that found anything.

If you can get the stack trace of the exception, it should help you debug the root cause. You may find the Call Stack window helpful for this. Check out the instructions here:

You may also want to disable the "Just My Code" option for debugging in Visual Studio. This may give you better exception debugging information. Follow the instructions (to disable) here:

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!