WPF 问题 PresentationCore.dll!System.Windows.Media.Composition.DUCE.Channel.SyncFlush() 分析
错误信息:
没有足够的内存继续执行程序 在 System.Windows.Media.Composition.DUCE.Channel.SyncFlush()
在 System.Windows.Interop.HwndTarget.UpdateWindowSettings(Boolean enableRenderTarget, Nullable` channelSet)
在 System.Windows.Interop.HwndTarget.UpdateWindowPos(IntPtr lParam)
在 System.Windows.Interop.HwndTarget.OnWindowPosChanging(IntPtr lParam)
在 System.Windows.Interop.HwndTarget.HandleMessage(WindowMessage msg, IntPtr wparam, IntPtr lparam)
在 System.Windows.Interop.HwndSource.HwndTargetFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
在 MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
在 MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
在 System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
在 System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
我们认为这个问题也可能与硬件有关,并且它可能不会出现在不同的视频卡的机器上。
通过禁用硬件加速来检查它,并在应用程序中的主窗体的加载事件处理程序中放置以下代码:
var hwnd_source = (System.Windows.Interop.HwndSource)PresentationSource.FromVisual(this);
var hwnd_target = hwnd_source.CompositionTarget;
hwnd_target.RenderMode = System.Windows.Interop.RenderMode.SoftwareOnly;
禁用后,不会出现问题了,可能是硬件问题!
有待解决...................
WPF 问题 PresentationCore.dll!System.Windows.Media.Composition.DUCE.Channel.SyncFlush() 分析的更多相关文章
- C# using System.Windows.Media.Imaging;该引用哪个dll
在网上看到BitmapSource和WriteableBitmap一些类听说是用 using System.Windows.Media.Imaging:可是我发现VS中没有什么System.Windo ...
- WPF System.InvalidCastException: 无法将类型为“System.Windows.Media.Color”的对象强制转换为类型“System.Windows.Media.Brush”。
场景:添加ComboBox样式,界面卡死,日志异常文件如下: -- ::, | ERROR | System.InvalidCastException: 无法将类型为“System.Windows.M ...
- C# Pen绘制虚线(System.Drawing.Pen与System.Windows.Media.Pen)
一.绘制虚线的方法 GDI绘制,使用的是System.Drawing.Pen Pen pen = new Pen(Color.Red, 1); pen.DashStyle = S ...
- System.Windows.Media.Imageing.BItmapImage 这么用才不会占用文件
// Read byte[] from png file BinaryReader binReader = new BinaryReader(File.Open(filepath, FileMode. ...
- 保存图片控件上的图片到本地 出现错误:无法将类型为“System.Windows.Media.Imaging.BitmapFrameDecode”的对象强制转换为类型“System.Windows.Media.Imaging.BitmapImage”。
保存图片控件上的图片到本地 出现错误:无法将类型为“System.Windows.Media.Imaging.BitmapFrameDecode”的对象强制转换为类型“System.Windows.M ...
- 【C#/WPF】如何查看System.Windows.Interactivity.dll中EventTrigger的EventNames属性有哪些
WPF项目中,从Nuget搜索并下载System.Windows.Interactivity.dll,安装到项目中,并在XAML界面引入. <UserControl xmlns:i=" ...
- 【WPF/WAF】使用System.Windows.Interactivity交互事件
下载System.Windows.Interactivity.dll文件,并引入项目中(在VS项目的引用列表中可以看到).可在Nuget搜索System.Windows.Interactivity下载 ...
- WPF学习笔记——在“System.Windows.StaticResourceExtension”上提供值时引发了异常
在"System.Windows.StaticResourceExtension"上提供值时引发了异常 因应需要,写了一个转换器,然后窗体上引用,结果就出来这个错.编译的时候没事, ...
- 关于WPF System.windows.Media.FontFamily 的类型初始值设定项引发异常问题解决方法
造成原因:此问题的根本原因是.NET Framework January 2018 Rollup(KB4055002)与已安装的.NET Framework 4.7.1产品版本之间的MSI安装交互.R ...
随机推荐
- 配置logback日志管理的时候
在使用logback时候,需要引入 thymeleaf的配置 thymeleaf: suffix: .html check-template-location: true encoding: UTF- ...
- java中List集合
List集合是一个元素有序可以重复的集合,集合中每个元素都有其对应的顺序索引.List集合允许使用重复集合,前面博客写到Set不允许有重复集合.List集合可以通过索引来访问指定位置的集合元素. Li ...
- Machine learning system design---prioritizing what to work on
prioritizing what to work on 设计一个机器学习算法时,我们应该先做什么?以垃圾邮件识别的例子为例: 垃圾邮件发送者可能会故意将一些字符写错,如上图中的Medicine用1 ...
- C#向数据库中插入或更新null空值
一.在SQL语句中直接插入null或空字符串“” int? item = null; item == null ? "null" : item.ToString(); item = ...
- HDFS日志的查看总结
HDFS日志查看的两种方式:HDFS安装目录中的logs中和HDFS WEB UI上 HDFS安装目录中的logs中看日志 我们分别在master.slave1以及slave2上安装了HDFS,只 ...
- Vue 实例成员
Vue 一. 什么是Vue 可以独立完成前后端分离时 Web项目的JavaScript框架 二.为什么学Vue 前端三大主流框架:Angular React Vue Vue结合了其他框架优点.轻量级. ...
- 关闭win10 任务栏窗口预览的步骤:
win10虽好,但是总有不利于使用的反人类设计,好在可以设置,这也是比较好了的, 作为开发人员,经常会开好几个窗口,但是win10的预览很不好,设计的就是娱乐用途一般,因此必须是把他关了 一下步骤亲自 ...
- netty: 以默认的ByteBuf作为传输数据
client部分代码: //线程 EventLoopGroup worker = new NioEventLoopGroup(); //辅助类 Bootstrap b = new Bootstrap( ...
- Flume组件
1.什么是Flume:apache顶级项目,主要用来做数据采集.分布式.高可用,将海量日志进行采集.聚合.传输的系统.能够对数据进行简单处理在发送到接收方. 2.Flume组件:source.chan ...
- RestTemplate 使用中的几个问题
Spring Boot使用RestTemplate消费REST服务的几个问题记录 我们可以通过Spring Boot快速开发REST接口,同时也可能需要在实现接口的过程中,通过Spring Boot调 ...