WPF中抛出NullReferenceException:System.Windows.Markup.IStyleConnector.Connect(Int32, System.Object)
来源:互联网 发布:mac os sierra 下载 编辑:程序博客网 时间:2024/06/17 15:53
最近遇到一个情况,应用起来就崩溃, 查看dump信息如下:0:017> !pe
The version of SOS does not match the version of CLR you are debugging. Please
load the matching version of SOS for the version of CLR you are debugging.
CLR Version: 4.0.30319.225
SOS Version: 4.0.30319.18408
Exception object: 0000000003e09428
Exception type: System.NullReferenceException
Message: 未将对象引用设置到对象的实例。
InnerException: <none>
StackTrace (generated):
SP IP Function
00000000266F58F0 000007FF0067A971 XXXXX.XXXXX.System.Windows.Markup.IStyleConnector.Connect(Int32, System.Object)+0x161
00000000266F5940 000007FED4DB56A8 PresentationFramework_ni!System.Windows.FrameworkTemplate.LoadTemplateXaml(System.Xaml.XamlReader, System.Xaml.XamlObjectWriter)+0xf221e8
00000000266F59E0 000007FED3E93448 PresentationFramework_ni!System.Windows.FrameworkTemplate.LoadTemplateXaml(System.Xaml.XamlObjectWriter)+0x68
00000000266F5A40 000007FED3E93304 PresentationFramework_ni!System.Windows.FrameworkTemplate.LoadOptimizedTemplateContent(System.Windows.DependencyObject, System.Windows.Markup.IComponentConnector, System.Windows.Markup.IStyleConnector, System.Collections.Generic.List`1<System.Windows.DependencyObject>, System.Windows.UncommonField`1<System.Collections.Hashtable>)+0x364
00000000266F5AD0 000007FED3E92F76 PresentationFramework_ni!System.Windows.FrameworkTemplate.LoadContent(System.Windows.DependencyObject, System.Collections.Generic.List`1<System.Windows.DependencyObject>)+0x96
00000000266F5B50 000007FED3E92CC4 PresentationFramework_ni!System.Windows.StyleHelper.ApplyTemplateContent(System.Windows.UncommonField`1<System.Collections.Specialized.HybridDictionary[]>,
这个问题原因是.net 4.0不支持嵌套模板中加入event和style, 必须打补丁。
下面是x64版本的补丁。
http://download.csdn.net/detail/muzizongheng/9449049
对应的官方说明:
https://support.microsoft.com/zh-cn/kb/2464222
或者安装.Net 4.0.3的集成补丁包或者.Net 4.5.
2 0
- WPF中抛出NullReferenceException:System.Windows.Markup.IStyleConnector.Connect(Int32, System.Object)
- WPF的TreeView执行ExpandSubtree时抛出异常System.NullReferenceException
- System.NullReferenceException
- C#WPF 问题解决 发生了 System.Windows.Markup.XamlParseException HResult=-2146233087 Message=“对类型“
- WPF中加载System.Windows.Forms;
- System.NullReferenceException异常
- System.NullReferenceException[转] 解决方法
- GridView控件 System.NullReferenceException
- System.NullReferenceException[转…
- C#中int和System.Int32理解总结
- WinForm中的Color( System.Drawing.Color)与Wpf中Color(System.Windows.Media.Color)互转
- 针对SoundViewer声波显示出现Audio exception System.NullReferenceException: Object reference not set to an ins
- 在Share Point 2010中,如何使用 in 语句?并且解决Boolean Contains[Int32](System.Collections.Generic.IEnumerable`1[System.Int32], Int32)的问题。
- System.Object
- wpf System.Drawing.Color转换为System.Windows.Media.Color
- 類型 'System.NullReferenceException' 的未處理例外狀況發生於 system.web.dll
- System.Collections.Generic.Dictionary`2.Insert System.NullReferenceException
- 解决vb.net 2003:未处理的“System.NullReferenceException”类型的异常出现在 system.data.dll 中
- MergeKSortedList
- 深入理解Java异常处理机制
- Codeforces--633D--Fibonacci-ish(暴力搜索+去重)(map)
- k近邻算法实例
- STL-list实现
- WPF中抛出NullReferenceException:System.Windows.Markup.IStyleConnector.Connect(Int32, System.Object)
- 查找BADI的方法
- 51nod 1019 逆序数
- BZOJ 1878 HH的项链(莫队算法)
- 安卓系统启动脚本init.rc说明文件readme.txt翻译
- Error instantiating class book.pojo.User with invalid types () or values (). 报错解决方法
- MongoDB学习—(1)安装时出现The default storage engine 'wiredTiger' is not available问题解决
- 深度学习数据集Deep Learning Datasets
- java