WPF:处理损坏的字体缓存 [英] WPF: Handling Corrupt Font Cache

查看:157
本文介绍了WPF:处理损坏的字体缓存的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个WPF应用程序(.NET 3.5),通常在我们客户端的XP机器上运行。在过去5个月中,已经有三次损坏的字体缓存导致应用程序在加载时停止响应。



删除每个这些说明解决了直接问题。



然而,我想要找到一种方法,以帮助防止这种腐败开始(大部分我已经看到,建议它与更新的视频驱动程序没有重新启动后)?或者让我的应用程序处理一个损坏的字体缓存在优雅的方式(关闭用户的错误消息,而不是无限期地坐在不响应状态),或者让我的应用程序根本不使用字体缓存。


$ b $我开放给其他选择,当然,这些都是我头脑中的第一个。

解决方案

我不能提供一个解决方案,但这似乎是一个底层的Windows / wpf错误。我们在我们的产品上也有同样的问题,这是一个封闭的Windows Embedded系统。除了我们自己以外,没有安装或运行任何软件,初始安装后没有更改驱动程序等,但发生。我们目前的解决方案是在关机时始终删除缓存。不好,但对我们有用。



(抱歉这是一个答案不是评论,我没有必要的声誉)


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.

解决方案

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)

这篇关于WPF:处理损坏的字体缓存的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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