WPF Application Crashes in Windows XP (System.IO.FileFormatException)

Background

Windows XP users are keep complaining me about  crashes of WPF application as soon I released it.  I was wandered, why all Windows 7 users don’t have that. My team mate did couple of enhancements plus adding new application’s window icon. The error message they receive is (crashing message !),

clip_image002[4]

Problem

Since everything working perfectly on Windows 7, something wrong with XP to what we did lastly. That is replacing the icon. But I have no proof for that, but  got a clue from the following screen.

image

Hm…., I change the icon to a very classic one and try it. WOW, it is working fine in XP. Now I want to find out what is the different between this icon and the my icon. I found that my icon containing additional two image types (256x256, 32bit,PNG), which you can be seen from the Visual Studio Icon editor.

Solution

I removed these two image types from the icon file using Visual Studio Icon Editor, added to the application and  it’s work fine.

To justify the situation, I found this (accessed on 10/13/2011 4:21 PM + GMT 5.30) URL and extracted bellow comment.

Make sure the icon has max size 64x64 pixels.
It can still be 32 bit (using alpha channel).

Comments

Anonymous said…
It's works for me!

Popular posts from this blog

IIS 7.5: 401 Unauthorized Access Error (Keep prompting Username/password)

Calculating Elapsed Time Accurately (C#)

Connecting DB2/iSeries From .net Application