我有一个WPF应用程序,在尝试使用ShowDialog()
打开一个表单时,我在一台机器上遇到了下面这个奇怪的异常。
您有什么想法可能是问题所在吗?
异常消息 = 操作中止(HRESULT: 0x80004004(E_ABORT))
异常堆栈跟踪 =
在 System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo) 中抛出异常
在 System.Runtime.InteropServices.Marshal.ThrowExceptionForHR(Int32 errorCode, IntPtr errorInfo) 中抛出异常
在 MS.Internal.Text.TextInterface.Native.Util.ConvertHresultToException(Int32 hr) 中抛出异常
在 MS.Internal.Text.TextInterface.FontCollection.FindFamilyName(String familyName, UInt32& index) 中查找字体族名称
在 MS.Internal.FontCache.FamilyCollection.LookupFamily(String familyName, FontStyle& fontStyle, FontWeight& fontWeight, FontStretch& fontStretch) 中查找字体族
在 System.Windows.Media.FontFamily.LookupFontFamilyAndFace(CanonicalFontFamilyReference canonicalFamilyReference, FontStyle& style, FontWeight& weight, FontStretch& stretch) 中查找字体和字形
在 System.Windows.Media.FontFamily.FindFirstFontFamilyAndFace(FontStyle& style, FontWeight& weight, FontStretch& stretch) 中查找第一个字体族和字形
在 System.Windows.Media.Typeface.ConstructCachedTypeface() 中构造缓存的字体
在 System.Windows.Media.Typeface.get_CachedTypeface() 中获取缓存的字体
在 MS.Internal.TextFormatting.SimpleTextLine..ctor(FormatSettings settings, Int32 cpFirst, Int32 paragraphWidth, ArrayList runs, Int32& trailing, Int32& trailingSpaceWidth) 中创建简单文本行
在 MS.Internal.TextFormatting.SimpleTextLine.Create(FormatSettings settings, Int32 cpFirst, Int32 paragraphWidth) 中创建简单文本行
在 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.TextBoxLine.Format(Int32 dcp, Double formatWidth, Double paragraphWidth, LineProperties lineProperties, TextRunCache textRunCache, TextFormatter formatter) 中格式化文本框行
在 System.Windows.Controls.TextBoxView.FullMeasureTick(Double constraintWidth, LineProperties lineProperties) 中测量完整的文本框视图
在 System.Windows.Controls.TextBoxView.MeasureOverride(Size constraint) 中重写测量方法
在 System.Windows.FrameworkElement.MeasureCore(Size availableSize) 中测量核心元素
在 System.Windows.UIElement.Measure(Size availableSize) 中测量 UI 元素
在 MS.Internal.Helper.MeasureElementWithSingleChild(UIElement element, Size constraint) 中使用单个子元素测量元素
在 System.Windows.Controls.ScrollContentPresenter.MeasureOverride(Size constraint) 中重写测量方法
在 System.Windows.FrameworkElement.MeasureCore(Size availableSize) 中测量核心元素
在 System.Windows.UIElement.Measure(Size availableSize) 中测量 UI 元素
在 System.Windows.Controls.Grid.MeasureCell(Int32 cell, Boolean forceInfinityV) 中测量网格单元格
在 System.Windows.Controls.Grid.MeasureCellsGroup(Int32 cellsHead, Size referenceSize, Boolean ignoreDesiredSizeU, Boolean forceInfinityV) 中测量网格单元格组
在 System.Windows.Controls.Grid.MeasureOverride(Size constraint) 中重写测量方法
在 System.Windows.FrameworkElement.MeasureCore(Size availableSize) 中测量核心元素
在 System.Windows.UIElement.Measure(Size availableSize) 中测量 UI 元素
在 System.Windows.Controls.ScrollViewer.MeasureOverride(Size constraint) 中重写测量方法
在 System.Windows.FrameworkElement.MeasureCore(Size availableSize) 中测量核心元素
在 System.Windows.UIElement.Measure(Size availableSize) 中测量 UI 元素
在 System.Windows.Controls.Border.MeasureOverride(Size constraint) 中重写测量方法
在 System.Windows.FrameworkElement.MeasureCore(Size availableSize) 中测量核心元素
在 System.Windows.UIElement.Measure(Size availableSize) 中测量 UI 元素
在 System.Windows.Controls.Control.MeasureOverride(Size constraint) 中重写测量方法
在 System.Windows.FrameworkElement.MeasureCore(Size availableSize) 中测量核心元素
在 System.Windows.UIElement.Measure(Size availableSize) 中测量 UI 元素
在 System
...at MS.Internal.Text.TextInterface.FontCollection.FindFamilyName(String familyName, UInt32& index)...
。 - Dan J