异常报错:Exception:尝试执行未经授权的操作。

CL 2021/4/7 发布 · 2021/4/18 更新 · 1625 次阅读

现象

报错信息:尝试执行未经授权的操作。

   在 MS.Internal.TextFormatting.TextMetrics.FullTextLine.FormatLine(FullTextState fullText, Int32 cpFirst, Int32 lineLength, Int32 formatWidth, Int32 finiteFormatWidth, Int32 paragraphWidth, LineFlags lineFlags, FormattedTextSymbols collapsingSymbol)
   在 MS.Internal.TextFormatting.TextMetrics.FullTextLine..ctor(FormatSettings settings, Int32 cpFirst, Int32 lineLength, Int32 paragraphWidth, LineFlags lineFlags)
   在 MS.Internal.TextFormatting.TextFormatterImp.FormatLineInternal(TextSource textSource, Int32 firstCharIndex, Int32 lineLength, Double paragraphWidth, TextParagraphProperties paragraphProperties, TextLineBreak previousLineBreak, TextRunCache textRunCache)
   在 MS.Internal.TextFormatting.TextFormatterImp.FormatLine(TextSource textSource, Int32 firstCharIndex, Double paragraphWidth, TextParagraphProperties paragraphProperties, TextLineBreak previousLineBreak, TextRunCache textRunCache)
   在 System.Windows.Controls.TextBlock.MeasureOverride(Size constraint)
   在 System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   在 System.Windows.UIElement.Measure(Size availableSize)
   在 MS.Internal.Helper.MeasureElementWithSingleChild(UIElement element, Size constraint)
   在 System.Windows.Controls.ContentPresenter.MeasureOverride(Size constraint)

 

问题原因

安装的某个字体文件有问题,导致系统渲染出错。

可以进入Windows的字体设置界面查看是否有不能正常显示的字体。

 

解决办法

尝试办法:

1 还原系统主题为Windows默认主题

2 修复windows字体问题。

- 参考《使用系统文件检查器工具修复丢失或损坏的系统文件

- 参考《如何修复WINDOWS 10中的字体错误》《恢复Windows10的默认字体

· {{comment.createTimeStr}}
{{reply.votePoints}}
回复   – {{reply.createTimeStr}}
回复 x
标签
目录
相关操作