如何调试无休止的Measure-Arrange循环? [英] How to debug endless Measure-Arrange loop?

查看:109
本文介绍了如何调试无休止的Measure-Arrange循环?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们的应用程序中存在一个问题,即WPF ScrollViewer的水平滚动条在无限的Measure-Arrange循环中不断更新;当该循环运行时,一个CPU内核持续100%处于运行状态.在那个循环中,我们的代码都不是 叫循环似乎完全发生在.NET框架内(我们已经使用探查器进行了检查).

We have one problem in our application where the horizontal scrollbar of a WPF ScrollViewer is continuously updated in an endless Measure-Arrange loop; while that loop is running, one CPU core is continuously at 100%. During that loop, none of our code is called; the loop seems to happen completely inside the .NET framework (we have checked that with a profiler).

仅当滚动条的拇指几乎是滚动条宽度的100%时,处理器使用率才会很高. .NET 3.5 SP1会出现此问题.在.NET 4.0中,它似乎没有发生,但目前我们无法使用.NET 4.0.

The high processor usage happens only if the thumb of the scrollbar is almost at 100% of the width of the scrollbar. The problem occurs with .NET 3.5 SP1; under .NET 4.0, it does not seem to occur, but we cannot use .NET 4.0 at the moment.

不幸的是,我无法拿出一个简单的示例代码来演示问题.

Unfortunately, I was unable to come up with a simple piece of sample code that demonstrates the problem.

.NET 3.5 SP1中这是一个已知问题吗?还是有某种方法可以调试这种情况?

Is this a known problem in .NET 3.5 SP1? Or is there some way to debug that scenario?

致谢
-弗兰克(Frank)

Regards
- Frank

推荐答案

我认为其中两个或其中之一已在4.0中实现,因此您必须亲自检查一下并对其进行硬编码在3.5

I think two or one of these where implemented in 4.0, and you have to check them out for yourself and hardcode it in 3.5

http://social.msdn.microsoft.com /Forums/eu/wpf/thread/98090161-0abf-4799-bbcb-852dcc0f0608


这篇关于如何调试无休止的Measure-Arrange循环?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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