首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >WPF System.OutOfMemoryException System.Windows.Automation.Peers.AutomationPeer.UpdateSubtree

WPF System.OutOfMemoryException System.Windows.Automation.Peers.AutomationPeer.UpdateSubtree
EN

Stack Overflow用户
提问于 2015-09-09 23:31:50
回答 1查看 466关注 0票数 2

我已经在.NET框架4.5.1上构建了一个WPF桌面应用程序。它“通常”工作得很好,但在某些机器上,在运行时,当WPF数据网格将要显示时,它会显示一个System.OutOfMemoryException。

堆栈跟踪报告:

代码语言:javascript
复制
An error of type System.OutOfMemoryException occurred.
       in System.Windows.Controls.ItemContainerGenerator.ContainerFromItem(Object item)
       in Microsoft.Windows.Controls.DataGrid.TryFindCell(Object item, DataGridColumn column)
       in Microsoft.Windows.Automation.Peers.DataGridCellItemAutomationPeer.get_OwningCellPeer()
       in Microsoft.Windows.Automation.Peers.DataGridCellItemAutomationPeer.IsEnabledCore()
       in System.Windows.Automation.Peers.AutomationPeer.UpdateSubtree()
       in System.Windows.Automation.Peers.AutomationPeer.UpdateSubtree()
       in System.Windows.Automation.Peers.AutomationPeer.UpdateSubtree()
       in System.Windows.Automation.Peers.AutomationPeer.UpdateSubtree()
       in System.Windows.Automation.Peers.AutomationPeer.UpdateSubtree()
       in System.Windows.Automation.Peers.AutomationPeer.UpdateSubtree()
       in System.Windows.ContextLayoutManager.fireAutomationEvents()
       in System.Windows.ContextLayoutManager.UpdateLayout()
       in System.Windows.ContextLayoutManager.UpdateLayoutCallback(Object arg)
       in System.Windows.Media.MediaContext.InvokeOnRenderCallback.DoWork()
       in System.Windows.Media.MediaContext.FireInvokeOnRenderCallbacks()
       in System.Windows.Media.MediaContext.RenderMessageHandlerCore(Object resizedCompositionTarget)
       in System.Windows.Media.MediaContext.RenderMessageHandler(Object resizedCompositionTarget)
       in System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
       in MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)

非工作机器是32位,Windows7,2 GB内存,.NET框架4.5.1。

我必须指出的是,数据网格只显示了几行。我一直在网上寻找类似的错误,但我找不到任何合适的解决方案。

有什么建议吗?

谢谢!

EN

回答 1

Stack Overflow用户

发布于 2015-09-09 23:34:15

这个问题被证明是与运行中的帐户缺少某些权限有关。

一旦用户通过以下方式启动可执行文件

右键单击,以管理员身份运行

问题就消失了。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/32483711

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档