开发者

WPF application using win32 dialogs on XP crashes

We have a WPF application that was developed on Windows 7 using VS 2010 and .NET 4.0 framework.

I have created an install package for it using the Visual Studio Installer.

When running on XP it appears to go into a bad state after using the win32 OpenFileDialog. It took me a while to track this down, as it doesn't fail right away. The dialog appears, you select the file you want to open, it opens up and is displayed on the screen. I was using it for about two minutes and then it crashed. I get the message that my program has encountered a problem and needs to close.

I can now run my application, open a file and make it crash right away, since a specific action always makes it crash. It does on any file I open, even a new one.

So I tried opening the same file without using the OpenFileDialog, I have a MRU list that I selected the file from, and it works flawlessly. I have not been able to make it crash.

Anyone experience similar behavior or have any ideas?

Since I do no开发者_JAVA技巧t have a debug environment on the XP machine I tried putting in some tracing statements within the application to write out to our log file where it is and what value some variables have. The really strange thing is that as soon as the OpenFileDialog.ShowDialog method is called all writing to our log file stops. I am just using standard file I/O and actually open, write and then close the file for every log message. This makes it difficult to debug this way, but also further supports the fact that something is gone wrong in the environment.

I have tried on four different XP machines, all with the same results.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜