问题背景

公司线上最新的安装包,有公司内部的小伙伴安装后不能不行,现象为:双击后应用程序直接崩溃。查看了window 日志,内容为:

应用程序: YNBlackboard47.exe
Framework 版本: v4.0.30319
说明: 由于未经处理的异常,进程终止。
异常信息: System.NullReferenceException在 MS.Internal.FontCache.FontFaceLayoutInfo+IntMap.TryGetValue(Int32, UInt16 ByRef)在 System.Windows.Media.GlyphTypeface.Initialize(System.Uri, System.Windows.Media.StyleSimulations)在 MS.Internal.Xaml.Runtime.ClrObjectRuntime.InitializationGuard(System.Xaml.XamlType, System.Object, Boolean)在 System.Xaml.XamlObjectWriter.Logic_EndInit(MS.Internal.Xaml.Context.ObjectWriterContext)在 System.Xaml.XamlObjectWriter.WriteEndObject()在 System.Windows.FrameworkTemplate.LoadTemplateXaml(System.Xaml.XamlReader, System.Xaml.XamlObjectWriter)在 System.Windows.FrameworkTemplate.LoadTemplateXaml(System.Xaml.XamlObjectWriter)在 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>)在 System.Windows.FrameworkTemplate.LoadContent(System.Windows.DependencyObject, System.Collections.Generic.List`1<System.Windows.DependencyObject>)在 System.Windows.StyleHelper.ApplyTemplateContent(System.Windows.UncommonField`1<System.Collections.Specialized.HybridDictionary[]>, System.Windows.DependencyObject, System.Windows.FrameworkElementFactory, Int32, System.Collections.Specialized.HybridDictionary, System.Windows.FrameworkTemplate)在 System.Windows.FrameworkTemplate.ApplyTemplateContent(System.Windows.UncommonField`1<System.Collections.Specialized.HybridDictionary[]>, System.Windows.FrameworkElement)在 System.Windows.FrameworkElement.ApplyTemplate()在 System.Windows.FrameworkElement.MeasureCore(System.Windows.Size)在 System.Windows.UIElement.Measure(System.Windows.Size)在 System.Windows.Controls.StackPanel.StackMeasureHelper(System.Windows.Controls.IStackMeasure, System.Windows.Controls.IStackMeasureScrollData, System.Windows.Size)在 System.Windows.Controls.StackPanel.MeasureOverride(System.Windows.Size)在 System.Windows.FrameworkElement.MeasureCore(System.Windows.Size)在 System.Windows.UIElement.Measure(System.Windows.Size)在 System.Windows.Controls.Grid.MeasureOverride(System.Windows.Size)在 System.Windows.FrameworkElement.MeasureCore(System.Windows.Size)在 System.Windows.UIElement.Measure(System.Windows.Size)在 System.Windows.Controls.Control.MeasureOverride(System.Windows.Size)在 System.Windows.FrameworkElement.MeasureCore(System.Windows.Size)在 System.Windows.UIElement.Measure(System.Windows.Size)在 System.Windows.Controls.Grid.MeasureOverride(System.Windows.Size)在 System.Windows.FrameworkElement.MeasureCore(System.Windows.Size)在 System.Windows.UIElement.Measure(System.Windows.Size)在 MS.Internal.Helper.MeasureElementWithSingleChild(System.Windows.UIElement, System.Windows.Size)在 System.Windows.Controls.ContentPresenter.MeasureOverride(System.Windows.Size)在 System.Windows.FrameworkElement.MeasureCore(System.Windows.Size)在 System.Windows.UIElement.Measure(System.Windows.Size)在 System.Windows.Controls.Decorator.MeasureOverride(System.Windows.Size)在 System.Windows.Documents.AdornerDecorator.MeasureOverride(System.Windows.Size)在 System.Windows.FrameworkElement.MeasureCore(System.Windows.Size)在 System.Windows.UIElement.Measure(System.Windows.Size)在 System.Windows.Controls.Border.MeasureOverride(System.Windows.Size)在 System.Windows.FrameworkElement.MeasureCore(System.Windows.Size)在 System.Windows.UIElement.Measure(System.Windows.Size)在 System.Windows.Window.MeasureOverrideHelper(System.Windows.Size)在 System.Windows.Window.MeasureOverride(System.Windows.Size)在 System.Windows.FrameworkElement.MeasureCore(System.Windows.Size)在 System.Windows.UIElement.Measure(System.Windows.Size)在 System.Windows.Interop.HwndSource.SetLayoutSize()在 System.Windows.Interop.HwndSource.set_RootVisualInternal(System.Windows.Media.Visual)在 System.Windows.Window.SetRootVisual()在 System.Windows.Window.SetRootVisualAndUpdateSTC()在 System.Windows.Window.SetupInitialState(Double, Double, Double, Double)在 System.Windows.Window.CreateSourceWindow(Boolean)在 System.Windows.Window.ShowHelper(System.Object)在 YNBlackboard.StartUp+<Window_Loaded>d__34.MoveNext()在 System.Runtime.CompilerServices.AsyncMethodBuilderCore+<>c.<ThrowAsync>b__6_0(System.Object)在 System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate, System.Object, Int32)在 System.Windows.Threading.ExceptionWrapper.TryCatchWhen(System.Object, System.Delegate, System.Object, Int32, System.Delegate)在 System.Windows.Threading.DispatcherOperation.InvokeImpl()在 System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)在 System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)在 System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)在 MS.Internal.CulturePreservingExecutionContext.Run(MS.Internal.CulturePreservingExecutionContext, System.Threading.ContextCallback, System.Object)在 System.Windows.Threading.DispatcherOperation.Invoke()在 System.Windows.Threading.Dispatcher.ProcessQueue()在 System.Windows.Threading.Dispatcher.WndProcHook(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)在 MS.Win32.HwndWrapper.WndProc(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)在 MS.Win32.HwndSubclass.DispatcherCallbackOperation(System.Object)在 System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate, System.Object, Int32)在 System.Windows.Threading.ExceptionWrapper.TryCatchWhen(System.Object, System.Delegate, System.Object, Int32, System.Delegate)在 System.Windows.Threading.Dispatcher.LegacyInvokeImpl(System.Windows.Threading.DispatcherPriority, System.TimeSpan, System.Delegate, System.Object, Int32)在 MS.Win32.HwndSubclass.SubclassWndProc(IntPtr, Int32, IntPtr, IntPtr)在 MS.Win32.UnsafeNativeMethods.DispatchMessage(System.Windows.Interop.MSG ByRef)在 System.Windows.Threading.Dispatcher.PushFrameImpl(System.Windows.Threading.DispatcherFrame)在 System.Windows.Application.RunDispatcher(System.Object)在 System.Windows.Application.RunInternal(System.Windows.Window)在 YNBlackboard.App.Main()

错误提醒:
异常信息: System.NullReferenceException 在 MS.Internal.FontCache.FontFaceLayoutInfo+IntMap.TryGetValue(Int32, UInt16 ByRef)

修复过程

首先重新安装了下net 4.5.2的环境,安装后运行程序仍然报错。然后又在win7个性化设置里面设置了字体,在其他电脑拷贝了宋体字体覆盖到问题电脑,使用Windows Aero (Tahoma Font).exe主题修改 这些方法都不行。仍然报错…

最终解决办法

修复win7注册表:使用系统自带字体的注册表对问题机器进行注册表合并。然后运行软件,完美解决。注册表如下:

Windows Registry Editor Version 5.00

;Restores default system font setting (to Segoe UI) in Windows 7

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Fonts]
“Segoe UI (TrueType)”=“segoeui.ttf”
“Segoe UI Bold (TrueType)”=“segoeuib.ttf”
“Segoe UI Bold Italic (TrueType)”=“segoeuiz.ttf”
“Segoe UI Italic (TrueType)”=“segoeuii.ttf”
“Segoe UI Light (TrueType)”=“segoeuil.ttf”
“Segoe UI Semibold (TrueType)”=“seguisb.ttf”
“Segoe UI Symbol (TrueType)”=“seguisym.ttf”

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\FontSubstitutes]
“Segoe UI”=-

把上面文本,保存为xxxx.reg然后进行注册表合并

WPF运行报错 在MS.Internal.FontCache.FontFaceLayoutInfo+IntMap.TryGetValue(Int32, UInt16 ByRef)相关推荐

  1. WPF运行报错System.Windows.Markup.XamlParseException:““在“System.Windows.StaticResourceExtension”

    报错信息 System.Windows.Markup.XamlParseException:""在"System.Windows.StaticResourceExtens ...

  2. vue-elemnt-admin npm run dev 运行报错

    vue-elemnt-admin npm run dev 运行报错 描述: vue-element-admin 4.4.4 电脑中有之前的vue-element-admin 模板,可以正常的运行,但是 ...

  3. vue2.6.11版本源码运行报错问题处理

    vue2.6.11版本源码运行报错问题处理 1.源码下载 git clone http://github.com/vuejs/vue.git 2.安装npm依赖包 npm install 3.运行报错 ...

  4. MAVEN项目报错:An internal error occurred during: Updating Maven Project java.lang.NullPoint

    MAVEN项目报错:An internal error occurred during: "Updating Maven Project" java.lang.NullPoint ...

  5. SAP WM 自动创建TO单的JOB运行报错 - Enter the storage unit type - 对策

    SAP WM 自动创建TO单的JOB运行报错 - Enter the storage unit type - 对策 报错如下: 详细信息: Log for automatic creation of ...

  6. python3运行报错:TypeError: Object of type ‘type‘ is not JSON serializable解决方法(详细)

    python3运行报错:TypeError: Object of type 'type' is not JSON serializable解决方法(详细) 参考文章: (1)python3运行报错:T ...

  7. appium运行报错java.net.SocketException: socket write error

    这个错我调了 快两天一点头绪没有,脚本正常跑没问题,但是就是控制台输出信息报错,没法定位问题在哪.报错如图: 虽然这个报错不影响测试结果,但是本人有强迫症,一定要查出究竟: 我的尝试: 1.那天试验, ...

  8. tomcat运行报错Failed to start component [StandardEngine[Catalina].StandardHost[localhost].

    一.问题 tomcat运行报错Failed to start component [StandardEngine[Catalina].StandardHost[localhost]. 多半情况是找不到 ...

  9. mpi tcp连接报错_MPI分布式编程 --3.OpenMPI多节点运行报错

    1. OpenMPI多节点运行报错问题 问题描述:节点一即host3,通过mpirun调用节点二即host4的mpi程序,报错如下. $ mpirun -np 1 --host host4 ./mai ...

最新文章

  1. Java小故事(一)
  2. vue中使用elmentUI的Upload组件提交文件和后台接收
  3. linux下批量添加新用户
  4. 远程桌面Web连接访问及端口更改方法
  5. 基于LZ77算法的文件解压缩项目缺陷分析
  6. 如何在 SAP BTP 平台 ABAP 编程环境里消费基于 SOAP 的 Web Service
  7. 首届中国信息通信大数据大会将于4月20-21日在京召开
  8. css 百分比 怎么固定正方形_web前端入门到实战:一次搞懂CSS字体单位:px、em、rem和%
  9. u盘iso安装服务器系统怎么安装win7系统安装方法,win7 iso,手把手教你U盘如何安装win7系统...
  10. AngularJS中的表单验证机制
  11. shell编程sed命令替换文件内容
  12. Django学习手册 - csrf
  13. Atitit 成果艺术 attilax著 艾提拉著 目录 1. 2 2. 理论类 2 2.1. xxx模型 曲线 定律 原则 曲线 2 3. 代码类成果 范例代码项目 代码类库 与代码片段
  14. STEP 7 V5.5 版本特性
  15. mysql如何源码安装_MySQL源码安装
  16. 计算机不能删除用户,删除用户时提示无法在内置账户上运行此操作 -电脑资料...
  17. TCP、IP、链路层报文l结构
  18. excel设置斑马线
  19. 网站域名服务器加密,网站域名利用https防劫持方法
  20. 思岚科技受邀CES Asia 展示机器人定位导航领先技术

热门文章

  1. 矮胖企鹅NFT创下历史新高,反超CloneX和Doodles等蓝筹
  2. 第六届上海市大学生网络安全大赛__千毒网盘
  3. html线条 实线中带一圆点,HTML5 Canvas: 绘制圆点虚线
  4. C# 汉字 转 拼音 G2312编码
  5. 【笔记】嵌入式根文件系统制作随堂笔记
  6. python学习笔记——csv文件
  7. C语言_写一个关机程序,只要程序运行起来,电脑在1分钟内关机。
  8. 手机充电器CB认证哪里可以办理?CB报告转沙特IECEE报告方法
  9. 现代Java开发速度很快
  10. redis 命令总结