Skip to content

AccessViolationException - Unable to Lauch few WPF applications on few VM machines  #5493

Open
@gnanamu

Description

@gnanamu
  • .NET Version: .Net 4.8
  • Windows version: Win10 21H1
  • Does the bug reproduce also in WPF for .NET Framework 4.8?: Yes

Launch the application from desktop icon.

Actual:
Nothing happens, AccessViolationException error is logged Application EventLog.

Expected:
Application should launch successfully

Event Viewer Log

Faulting application name: ComponentBrowser.exe, version: 1.14.4.0, time stamp: 0x60d07906
Faulting module name: unknown, version: 0.0.0.0, time stamp: 0x00000000
Exception code: 0xc0000005
Fault offset: 0x0000000000000000
Faulting process id: 0x2b78
Faulting application start time: 0x01d7bc4b94aa12b3
Faulting application path: C:\Program Files\Sample\ComponentBrowser.exe
Faulting module path: unknown
Report Id: 705073b0-3f7d-452b-ba75-885809c319fe
Faulting package full name:

Faulting package-relative application ID:

=====================

Application: ComponentBrowser.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.AccessViolationException
at MS.Internal.FontCache.FontSourceCollection.System.Collections.Generic.IEnumerable<MS.Internal.Text.TextInterface.IFontSource>.GetEnumerator()
at MS.Internal.Text.TextInterface.FontCollectionLoader.CreateEnumeratorFromKey(IntPtr, Void*, UInt32, IntPtr*)
at MS.Internal.Text.TextInterface.Factory.GetFontCollection(System.Uri)
at MS.Internal.FontCache.DWriteFactory.GetFontCollectionFromFileOrFolder(System.Uri, Boolean)
at System.Windows.Media.FontFamily.LookupFontFamilyAndFace(MS.Internal.FontCache.CanonicalFontFamilyReference, System.Windows.FontStyle ByRef, System.Windows.FontWeight ByRef, System.Windows.FontStretch ByRef)
at System.Windows.Media.FontFamily.FindFirstFontFamilyAndFace(System.Windows.FontStyle ByRef, System.Windows.FontWeight ByRef, System.Windows.FontStretch ByRef)
at System.Windows.Media.Typeface.ConstructCachedTypeface()
at System.Windows.Media.Typeface.get_CachedTypeface()
at MS.Internal.TextFormatting.TextStore.FetchTextRun(Int32)
at MS.Internal.TextFormatting.TextStore.FetchLSRun(Int32, System.Windows.Media.TextFormattingMode, Boolean, MS.Internal.TextFormatting.Plsrun ByRef, Int32 ByRef, Int32 ByRef)
at MS.Internal.TextFormatting.LineServicesCallbacks.FetchRunRedefined(IntPtr, Int32, Int32, IntPtr, Char*, Int32, Int32 ByRef, Char* ByRef, Int32 ByRef, Int32 ByRef, MS.Internal.TextFormatting.LsChp ByRef, IntPtr ByRef)
at MS.Internal.TextFormatting.UnsafeNativeMethods.LoCreateLine(IntPtr, Int32, Int32, Int32, UInt32, IntPtr, MS.Internal.TextFormatting.LsLInfo ByRef, IntPtr ByRef, Int32 ByRef, MS.Internal.TextFormatting.LsLineWidths ByRef)
at System.Windows.Media.TextFormatting.TextFormatterContext.CreateLine(Int32, Int32, Int32, MS.Internal.TextFormatting.LineFlags, IntPtr, IntPtr ByRef, MS.Internal.TextFormatting.LsLInfo ByRef, Int32 ByRef, MS.Internal.TextFormatting.LsLineWidths ByRef)
at MS.Internal.TextFormatting.TextMetrics+FullTextLine.FormatLine(MS.Internal.TextFormatting.FullTextState, Int32, Int32, Int32, Int32, Int32, MS.Internal.TextFormatting.LineFlags, MS.Internal.TextFormatting.FormattedTextSymbols)
at MS.Internal.TextFormatting.TextMetrics+FullTextLine..ctor(MS.Internal.TextFormatting.FormatSettings, Int32, Int32, Int32, MS.Internal.TextFormatting.LineFlags)
at MS.Internal.TextFormatting.TextFormatterImp.FormatLineInternal(System.Windows.Media.TextFormatting.TextSource, Int32, Int32, Double, System.Windows.Media.TextFormatting.TextParagraphProperties, System.Windows.Media.TextFormatting.TextLineBreak, System.Windows.Media.TextFormatting.TextRunCache)
at MS.Internal.TextFormatting.TextFormatterImp.FormatLine(System.Windows.Media.TextFormatting.TextSource, Int32, Double, System.Windows.Media.TextFormatting.TextParagraphProperties, System.Windows.Media.TextFormatting.TextLineBreak, System.Windows.Media.TextFormatting.TextRunCache)
at MS.Internal.Text.Line.Format(Int32, Double, System.Windows.Media.TextFormatting.TextParagraphProperties, System.Windows.Media.TextFormatting.TextLineBreak, System.Windows.Media.TextFormatting.TextRunCache, Boolean)
at System.Windows.Controls.TextBlock.MeasureOverride(System.Windows.Size)
at System.Windows.FrameworkElement.MeasureCore(System.Windows.Size)
at System.Windows.UIElement.Measure(System.Windows.Size)
at System.Windows.Controls.Grid.MeasureCell(Int32, Boolean)
at System.Windows.Controls.Grid.MeasureCellsGroup(Int32, System.Windows.Size, Boolean, Boolean, Boolean ByRef)
at System.Windows.Controls.Grid.MeasureCellsGroup(Int32, System.Windows.Size, Boolean, Boolean)
at System.Windows.Controls.Grid.MeasureOverride(System.Windows.Size)
at System.Windows.FrameworkElement.MeasureCore(System.Windows.Size)
at System.Windows.UIElement.Measure(System.Windows.Size)
at System.Windows.Controls.Border.MeasureOverride(System.Windows.Size)
at System.Windows.FrameworkElement.MeasureCore(System.Windows.Size)
at System.Windows.UIElement.Measure(System.Windows.Size)
at System.Windows.Controls.Grid.MeasureOverride(System.Windows.Size)
at System.Windows.FrameworkElement.MeasureCore(System.Windows.Size)
at System.Windows.UIElement.Measure(System.Windows.Size)
at System.Windows.Controls.Control.MeasureOverride(System.Windows.Size)
at System.Windows.Controls.ToolBar.MeasureOverride(System.Windows.Size)
at System.Windows.FrameworkElement.MeasureCore(System.Windows.Size)
at System.Windows.UIElement.Measure(System.Windows.Size)
at System.Windows.Controls.StackPanel.StackMeasureHelper(System.Windows.Controls.IStackMeasure, System.Windows.Controls.IStackMeasureScrollData, System.Windows.Size)
at System.Windows.Controls.StackPanel.MeasureOverride(System.Windows.Size)
at System.Windows.FrameworkElement.MeasureCore(System.Windows.Size)
at System.Windows.UIElement.Measure(System.Windows.Size)
at System.Windows.Controls.Grid.MeasureOverride(System.Windows.Size)
at System.Windows.FrameworkElement.MeasureCore(System.Windows.Size)
at System.Windows.UIElement.Measure(System.Windows.Size)
at System.Windows.Controls.Grid.MeasureCell(Int32, Boolean)
at System.Windows.Controls.Grid.MeasureCellsGroup(Int32, System.Windows.Size, Boolean, Boolean, Boolean ByRef)
at System.Windows.Controls.Grid.MeasureCellsGroup(Int32, System.Windows.Size, Boolean, Boolean)
at System.Windows.Controls.Grid.MeasureOverride(System.Windows.Size)
at System.Windows.FrameworkElement.MeasureCore(System.Windows.Size)
at System.Windows.UIElement.Measure(System.Windows.Size)
at MS.Internal.Helper.MeasureElementWithSingleChild(System.Windows.UIElement, System.Windows.Size)
at System.Windows.Controls.ContentPresenter.MeasureOverride(System.Windows.Size)
at System.Windows.FrameworkElement.MeasureCore(System.Windows.Size)
at System.Windows.UIElement.Measure(System.Windows.Size)
at System.Windows.Documents.AdornerDecorator.MeasureOverride(System.Windows.Size)
at System.Windows.FrameworkElement.MeasureCore(System.Windows.Size)
at System.Windows.UIElement.Measure(System.Windows.Size)
at System.Windows.Controls.Border.MeasureOverride(System.Windows.Size)
at System.Windows.FrameworkElement.MeasureCore(System.Windows.Size)
at System.Windows.UIElement.Measure(System.Windows.Size)
at System.Windows.Window.MeasureOverrideHelper(System.Windows.Size)
at System.Windows.Window.MeasureOverride(System.Windows.Size)
at System.Windows.FrameworkElement.MeasureCore(System.Windows.Size)
at System.Windows.UIElement.Measure(System.Windows.Size)
at System.Windows.Interop.HwndSource.SetLayoutSize()
at System.Windows.Interop.HwndSource.set_RootVisualInternal(System.Windows.Media.Visual)
at System.Windows.Window.SetRootVisualAndUpdateSTC()
at System.Windows.Window.SetupInitialState(Double, Double, Double, Double)
at System.Windows.Window.CreateSourceWindow(Boolean)
at System.Windows.Window.ShowHelper(System.Object)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate, System.Object, Int32)
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(System.Object, System.Delegate, System.Object, Int32, System.Delegate)
at System.Windows.Threading.DispatcherOperation.InvokeImpl()
at MS.Internal.CulturePreservingExecutionContext.CallbackWrapper(System.Object)
at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)
at MS.Internal.CulturePreservingExecutionContext.Run(MS.Internal.CulturePreservingExecutionContext, System.Threading.ContextCallback, System.Object)
at System.Windows.Threading.DispatcherOperation.Invoke()
at System.Windows.Threading.Dispatcher.ProcessQueue()
at System.Windows.Threading.Dispatcher.WndProcHook(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)
at MS.Win32.HwndWrapper.WndProc(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)
at MS.Win32.HwndSubclass.DispatcherCallbackOperation(System.Object)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate, System.Object, Int32)
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(System.Object, System.Delegate, System.Object, Int32, System.Delegate)
at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(System.Windows.Threading.DispatcherPriority, System.TimeSpan, System.Delegate, System.Object, Int32)
at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr, Int32, IntPtr, IntPtr)
at MS.Win32.UnsafeNativeMethods.DispatchMessage(System.Windows.Interop.MSG ByRef)
at System.Windows.Threading.Dispatcher.PushFrameImpl(System.Windows.Threading.DispatcherFrame)
at System.Windows.Application.RunInternal(System.Windows.Window)
at System.Windows.Application.Run()
at ComponentBrowser.App.Main()

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions