WPF应用程序错误和.NET Framework维修 [英] WPF Application Errors and .Net Framework Repairs

查看:239
本文介绍了WPF应用程序错误和.NET Framework维修的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

背景: 我已经运行在Windows XP和Windows POSReady 2009中PC机上的.Net 3.5 WPF棱镜基于应用程序。该应用程序运行在被关闭每天晚上(通过C#调用Shutdown.exe的),并(通过网络唤醒)启动新的早晨电脑。该应用程序是基于触摸的(使用ELO触摸屏),没有鼠标或连接了键盘和用户不能够访问视窗

Background: I have a .Net 3.5 WPF "Prism"-based application running on Windows XP and Windows PosReady 2009 PCs. The app runs on PCs that are shut down every night (via a C# call to "shutdown.exe") and booted fresh in the morning (via Wake-on-LAN). The application is touch-based (using ELO touch screens), there are no mice or keyboards attached and the users do not have access to Windows.

问题: 我们偶尔看到的问题,其中两种情况之一发生;无论是应用程序似乎没有正确加载,我们看到一个空白的形式显示,或停止响应触摸。从看在我们的(log4net的)日志,我们可以看到,我们仍然在处理触摸事件,并记录他们在这两种情况下。通常,这似乎当切换视图发生,我们也看到了棱镜RegionManager被删除,并适当添加视图在日志中。

Issue: We sporadically see issues where one of two things happens; either the application doesn't seem to load correctly and we see a blank white form showing, or it stops responding to touch. From looking in our (log4net) logs we can see that we are still handling the touch events and logging them out in both cases. Often this seems to occur when switching views and we also see in the logs where the Prism RegionManager is removing and adding views appropriately.

故障排除: 该应用程序是运行在使用应用了图像的Clonezilla约〜100台电脑,并发生这种情况只是偶尔。因为它不是发生在所有的PC和没有异常记录或任何指示的问题,在事件查看器中,我们已经使出更多的PC和操作系统级别的修复。具体来说,我们尝试重新启动应用程序和偶尔的短期成功的电脑 - 这意味着有时候应用程序将这些重新启动后正常运行,但只有一个小时内最多。我们的假设下还曾应用程序已莫名其妙地被破坏,我们已经删除并重新安装它,但没有成功。

Troubleshooting: The application is running on approx ~100 PCs using images applied with Clonezilla and this occurs only sporadically. Since it isn't happening on all PCs and there are no exceptions logged or anything indicative of an issue in the Event Viewer we've resorted to more PC and OS level fixes. Specifically, we tried restarting the application and the PCs with occasional short-term success - meaning that sometimes the application will function correctly after these restarts, but only for a matter of hours at most. We've also worked under the assumption that the application has somehow been corrupted and we've removed and reinstalled it, without success.

这似乎是解决问题的唯一事情是.NET Framework的使用所提供的.NET 3.5 SP1安装程序包修。

The only thing that seems to resolve the issue is a repair of the .Net framework using the provided .Net 3.5 SP1 Installer package.

结论: 由于这似乎是在没有其他确实,我们似乎在某种程度上破坏一个GAC'd框架DLL来解决问题 - 无论是通过code或PC上的启动/关机程序

Conclusion: Since this seems to resolve the issue when nothing else does, it appears that we are somehow corrupting a GAC'd framework dll - either through code or the boot/shutdown procedures on the PC.

问题: 这导致了一些问题:

Questions: This leads to a number of questions:

  • 在对我们如何才能进一步确定问题的根源任何想法?
  • 在我们能做些什么,以prevent这个问题的任何想法?
  • 在什么潜在的问题可能是什么?任何想法

感谢您的帮助。

推荐答案

我们终于能够得到保留的生产机器的出现了这种行为,并通过一些故障排除步骤,包括发送转储文件,微软,问题是位于

We were finally able to get a hold of a production machine exhibiting this behavior and through a number of troubleshooting steps, including sending dump files to Microsoft, the issue was located.

在WPF字体缓存Windows服务偶尔进入一个已损坏的状态,导致一个简单的缓存请求无限期地阻塞。此杭导致所有在我们的WPF应用程序上述行为。

The WPF Font Caching Windows service was occasionally getting into a corrupted state, causing a simple cache request to block indefinitely. This hang caused all of the behaviors described above in the our WPF application.

简单的解决方案:停止并禁用该服务。禁用该服务并重新启动计算机后的服务不再使用中,我们看不到任何这些问题。理论上,这将导致更长的应用程序加载时间,但我们已经看到零负面影响。

Simple solution: stop and disable the service. After disabling the service and rebooting the PC the service is no longer in use and we don't see any of these issues. In theory this leads to longer application load times, but we have seen zero negative impact.

请注意,有两个版本的服务:3.0.0.0和4.0.0.0。如果您的应用程序是针对.NET 3.0或3.5,你需要禁用3服务,如果针对4.0+你需要禁用4服务。

Note that there are two versions of the service: 3.0.0.0 and 4.0.0.0. If your application is targeting .Net 3.0 or 3.5 you'll need to disable the 3 service, and if targeting 4.0+ you'll need to disable the 4 service.

感谢大家的意见和建议。

Thanks to all for your comments and suggestions.

这篇关于WPF应用程序错误和.NET Framework维修的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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