元素不存在或已被虚拟化;如果支持,请使用VirtualizedItem Pattern [英] Element does not exist or it is virtualized; use VirtualizedItem Pattern if it is supported

查看:44
本文介绍了元素不存在或已被虚拟化;如果支持,请使用VirtualizedItem Pattern的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们有一个WPF应用程序.我们的一些客户遇到了崩溃,无法在我的机器上重现.我可以从他们的机器上获得的所有信息都在堆栈跟踪下方,该堆栈跟踪仅包含WPF代码,因此我实际上无法指出应用程序中的哪些代码导致此问题.

We have a WPF application. Some of our customer are getting a crash, which I am not able to reproduce on my machine.All information that I can get from their machine is below stack trace, which contains only WPF code so I actually cannot pin point what code in my application is causing this issue.

System.Windows.Automation.ElementNotAvailableException: Element does not exist or it is virtualized; use VirtualizedItem Pattern if it is supported.
at System.Windows.Automation.Peers.ItemAutomationPeer.ThrowElementNotAvailableException()
at System.Windows.Automation.Peers.ItemAutomationPeer.GetItemStatusCore()
at System.Windows.Automation.Peers.AutomationPeer.UpdateSubtree()
at System.Windows.Automation.Peers.AutomationPeer.UpdateSubtree()
at System.Windows.Automation.Peers.AutomationPeer.UpdatePeer(Object arg)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)

有人遇到同样的问题吗?任何帮助表示赞赏.这可能与Windows 10有关,但我不确定我的计算机也是Windows 10,但我没有收到此错误.

Does anyone facing the same issue? any help is appreciated. This might be related to windows 10 but I am not sure as my machine is also window 10 but I am not getting this error.

推荐答案

MS支持人员最终发现,这是.Net Framework 4.7中引入的错误,并且仍在4.7.1中存在(并且很可能在4.7中存在).2).不幸的是,在某些Windows 10版本(Creators Update及更高版本)上,您无法降级到例如4.6.2,因此您将必须等待(热)修复.(在我的另一个答案(2017年10月24日)中,我说Win4.6 SP1和4.6.1也受到了影响,但是事实证明这是无效的.Net Framework安装,注册表显示了与文件相反的4.6.1版本是4.7.xxxx.)

MS support has finally figured out that this is a bug introduced in .Net Framework 4.7 and is still there in 4.7.1 (& most likely in 4.7.2). Unfortunately, on certain Windows 10 versions (Creators Update and above) you can't downgrade to e.g. 4.6.2, so you will have to wait for a (hot)fix. (In my other answer (24 Oct, 2017), I stated that Win7 SP1 with 4.6.1 was also affected, however that turned out to be an invalid .Net Framework installation, where the registry showed 4.6.1 in contrast to the file versions being 4.7.xxxx.)

2018年5月18日更新:@ user1336827,@Phillip,@Rhom:我为您带来好消息:此问题已在2018年5月质量汇总中解决,请参阅此

UPDATE 05/18/2018: @user1336827, @Phillip, @Rhom: I have great news for you: this issue was addressed in the May 2018 quality rollup, see this link and look for 555225.

这篇关于元素不存在或已被虚拟化;如果支持,请使用VirtualizedItem Pattern的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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