Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

WPF: Handling Corrupt Font Cache

I have a WPF app (.NET 3.5) that is generally run on our client's XP machines. Over the past 5 months, there have been three occasions where a corrupt font cache causes the application to stop responding on load.

Deleting the font cache per these instructions does solve the immediate issue.

However, I would like to find a way to either help prevent such corruption to begin with (most of what I've read suggests it has to do with updated video drivers without a reboot after?), or have my application handle a corrupt font cache in a graceful manner (shut down with an error message for the user, instead of sitting at state of "Not Responding" seemingly indefinitely), or have my application not use the font cache at all.

I'm open to other options, of course, those are the first three that came to my mind.

like image 591
hilary Avatar asked Dec 09 '10 19:12

hilary


1 Answers

I can't provide a solution but this seems to be an underlying windows/wpf bug. We've had the same problem on our product which is a closed Windows Embedded system. No software is ever installed or run except our own, no drivers changed after the initial install, etc but it happens. Our current solution is to always delete the cache on shutdown. Not great but works for us.

(Sorry this is an answer not a comment, I don't have the necessary reputation)

like image 104
MarkDaniel Avatar answered Nov 15 '22 10:11

MarkDaniel