WPF应用程序会固定CPU并将其锁定在某些计算机上而不在其他计算机上的原因可能是什么? [英] What could be reasons a WPF app would pin the CPU and lock the app on some computers but not others?

查看:48
本文介绍了WPF应用程序会固定CPU并将其锁定在某些计算机上而不在其他计算机上的原因可能是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

被困在这里.之前发布了类似的问题.我们有一个相当大的WPF应用程序,它在某些机器上运行良好,但在另一些机器上,突然之间,一个CPU内核被固定为100%(仅一个内核),并且该应用程序冻结.当显示上下文菜单或组合框下拉菜单(即弹出控件)时,通常似乎会发生这种情况,这就是为什么我们无法调试它的原因,因为当时没有用户代码在执行.这再次使我们发疯,因为在大多数机器上,它再次运行正常,但是在少数机器上,它冻结了.

Stumped here. Posted a similar question before. We have a pretty large WPF app that on some machines runs great, but on others, all of a sudden, one of the CPU cores gets pinned at 100% (just one core) and the app freezes. It usually seems to happen when showing a context menu or a combobox drop-down (i.e. Popup controls) which is why we can't debug this since no user code is executing at that time. It's driving us crazy because again, on most machines it runs fine, but on a few, it freezes.

奇怪的是,当我们在VM中运行它时,它在那里也运行得很好!疯狂的!不知道是什么原因导致的,或更重要的是,从哪里开始寻找效果,因为正如我所说,没有用户代码在运行.

The odd thing is when we run it in a VM, it runs great there too! Crazy! Not sure what's causing this, or more importantly, where to even begin to look because as I said, no user code is running.

这种情况仅发生在我们大约10%的计算机上,但始终在这些计算机上发生.一切都很干净(即相对较新的OS安装,没有疯狂的应用程序等),并且在规格方面几乎都是相同的机器:相似的CPU,相似的RAM,相同的视频驱动程序和Service Pack.

This happens on only about 10% of our machines, but it consistently happens on those machines. All are clean (i.e. relatively fresh OS installs, no crazy apps, etc.) and mostly identical machines spec-wise: similar CPUs, similar RAM, same video drivers and service packs.

因此,正如我在标题中所述,有人可以提出WPF应用程序固定CPU并将其锁定在某些计算机而非其他计算机上的可能原因吗?我们只是被困住了!

So as I stated in the title, can anyone suggest possible reasons why a WPF app would pin the CPU and lock the app on some computers but not others? We're just stumped!

推荐答案

找到了!!事实证明.NET 4.0中存在有关UI自动化和MS引入的更改的错误.这是信息和解决方法! (注意:即使您致电MS,他们也会向您发送链接,但这始终是断开的链接.我设法手动进行了跟踪.)

Found it!! Turns out there's a bug in .NET 4.0 regarding UI Automation and the changes MS introduced. Here's the info, and the fix! (Note: Even if you call MS, they will send you a link, but it's always a broken link. I managed to track this down manually.)

注意:他们的文章讨论了引起这种现象的特定情况,但是如果您四处搜索,您将在与这些DLL相关的挂起周围看到大量问题.最新消息是,他们承诺将在.NET 4.5运行时中修复此问题(有关此问题的MS帖子).

Note: Their article talks about a specific case that causes this behavior, but if you google around, you'll see tons of issues around hangs related to those DLLs. The latest is they're promising a fix in the .NET 4.5 runtime (from a MS post on this issue.)

这是知识库文章...
http://support.microsoft.com/kb/2484841/en-us

Here's the KB article...
http://support.microsoft.com/kb/2484841/en-us

...这是实际的修补程序.
http://archive.msdn.microsoft.com/KB2484841/Release/ProjectReleases.aspx? ReleaseId = 5583

...and here is the actual hotfix.
http://archive.msdn.microsoft.com/KB2484841/Release/ProjectReleases.aspx?ReleaseId=5583

这篇关于WPF应用程序会固定CPU并将其锁定在某些计算机上而不在其他计算机上的原因可能是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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