SaveFileDialog使WindowsXP上的WinForms应用程序无提示崩溃 [英] SaveFileDialog silently crashes WinForms app on WindowsXP

查看:59
本文介绍了SaveFileDialog使WindowsXP上的WinForms应用程序无提示崩溃的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用C#、. NET 4.0和DevExpress组件开发WinForms应用.

I'm developing WinForms app using C#, .NET 4.0, and DevExpress components.

在Windows 7上,一切正常.

On Windows 7 everything is working just fine.

在Windows XP SP3上,显示并关闭SaveFileDialog几秒钟后,应用程序将静默退出.

On Windows XP SP3, few seconds after SaveFileDialog is shown and closed, application will silently exit.

没有未处理的异常,应用程序退出事件不会触发,我只在Visual Studio输出窗口中收到消息:

There is no unhandled exception, Application exit event will not fire, I'm only getting message in the Visual Studio Output window:

The program '[3164] MyApp.vshost.exe: Managed (v4.0.30319)' has exited with code 0 (0x0).

导致此问题的代码非常简单:

Code that is causing this issue is very simple:

saveFileDialog1.ShowDialog();

您有任何想法为什么会这样吗?如何解决并解决此问题?

Do you have any ideas why is this happening? How can I troubleshoot and fix this?

推荐答案

在项目属性窗口中启用非托管调试.并确保将Visual Studio设置为在所有异常上都中断(检查Debug \ Exceptions菜单中的"Throw"选项).

Enable unmanaged debugging in the project properties window. And ensure that Visual Studio is set to break on all exceptions (check the "Throw" option in the Debug\Exceptions menu).

然后再次运行您的应用程序.VS现在应该打破异常-它应该是导致应用程序失败的shell扩展或文件处理程序.

Then run your application again. VS should now break on the exception - it should be a shell extension or file handler that's causing your app to fail.

这篇关于SaveFileDialog使WindowsXP上的WinForms应用程序无提示崩溃的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆