runtime: NRE from PresentationFramework-SystemXmlLinq.dll cctor

Latest builds of the .NET Core 3 packages have an NRE from a static ctor. The LKG for me was on 10/13, and when I updated on 10/18, get this. This is causing a hard block loading my WPF app on Core.

/cc @ericstj @vatsan-madhavan

              PresentationFramework-SystemXmlLinq.dll!MS.Internal.SystemXmlLinqExtension.SystemXmlLinqExtension()              Unknown
             [Native to Managed Transition]  
             [Managed to Native Transition]  
             PresentationFramework-SystemXmlLinq.dll!MS.Internal.SystemXmlLinqExtension.SystemXmlLinqExtension()              Unknown
             [Native to Managed Transition]  
             [Managed to Native Transition]  
System.Private.CoreLib.dll!System.RuntimeType.CreateInstanceSlow(bool publicOnly, bool wrapExceptions, bool skipCheckThis, bool fillCache)            Unknown
System.Private.CoreLib.dll!System.Activator.CreateInstance(System.Type type, bool nonPublic, bool wrapExceptions)         Unknown
WindowsBase.dll!MS.Internal.AssemblyHelper.LoadExtensionFor(string name)   Unknown
WindowsBase.dll!MS.Internal.AssemblyHelper.ExtensionsForSystemXmlLinq(bool force)    Unknown
PresentationFramework.dll!MS.Internal.SystemXmlLinqHelper.IsXElement(object item)     Unknown
PresentationFramework.dll!System.Windows.Controls.ContentPresenter.DataTypeForItem(object item, System.Windows.DependencyObject target, out System.Type type)          Unknown
PresentationFramework.dll!System.Windows.FrameworkElement.FindTemplateResourceInternal(System.Windows.DependencyObject target, object item, System.Type templateType) Unknown
PresentationFramework.dll!System.Windows.Controls.ContentPresenter.DefaultSelector.SelectTemplate(object item, System.Windows.DependencyObject container)              Unknown
PresentationFramework.dll!System.Windows.Controls.ContentPresenter.ChooseTemplate()              Unknown
PresentationFramework.dll!System.Windows.Controls.ContentPresenter.EnsureTemplate()              Unknown
PresentationFramework.dll!System.Windows.Controls.ContentPresenter.OnPreApplyTemplate()              Unknown
PresentationFramework.dll!System.Windows.FrameworkElement.ApplyTemplate()              Unknown
PresentationFramework.dll!System.Windows.FrameworkElement.MeasureCore(System.Windows.Size availableSize)     Unknown
PresentationCore.dll!System.Windows.UIElement.Measure(System.Windows.Size availableSize)     Unknown
PresentationFramework.dll!System.Windows.Controls.Grid.MeasureCell(int cell, bool forceInfinityV) Unknown
PresentationFramework.dll!System.Windows.Controls.Grid.MeasureCellsGroup(int cellsHead, System.Windows.Size referenceSize, bool ignoreDesiredSizeU, bool forceInfinityV, out bool hasDesiredSizeUChanged)           Unknown
PresentationFramework.dll!System.Windows.Controls.Grid.MeasureCellsGroup(int cellsHead, System.Windows.Size referenceSize, bool ignoreDesiredSizeU, bool forceInfinityV) Unknown
PresentationFramework.dll!System.Windows.Controls.Grid.MeasureOverride(System.Windows.Size constraint)         Unknown
PresentationFramework.dll!System.Windows.FrameworkElement.MeasureCore(System.Windows.Size availableSize)     Unknown
PresentationCore.dll!System.Windows.UIElement.Measure(System.Windows.Size availableSize)     Unknown
PresentationFramework.dll!System.Windows.Controls.Control.MeasureOverride(System.Windows.Size constraint)         Unknown
PresentationFramework.dll!System.Windows.FrameworkElement.MeasureCore(System.Windows.Size availableSize)     Unknown
PresentationCore.dll!System.Windows.UIElement.Measure(System.Windows.Size availableSize)     Unknown
PresentationFramework.dll!System.Windows.Controls.StackPanel.StackMeasureHelper(System.Windows.Controls.IStackMeasure measureElement, System.Windows.Controls.IStackMeasureScrollData scrollData, System.Windows.Size constraint)       Unknown
PresentationFramework.dll!System.Windows.Controls.StackPanel.MeasureOverride(System.Windows.Size constraint)         Unknown
PresentationFramework.dll!System.Windows.FrameworkElement.MeasureCore(System.Windows.Size availableSize)     Unknown
PresentationCore.dll!System.Windows.UIElement.Measure(System.Windows.Size availableSize)     Unknown
PresentationFramework.dll!System.Windows.Controls.Grid.MeasureOverride(System.Windows.Size constraint)         Unknown
PresentationFramework.dll!System.Windows.FrameworkElement.MeasureCore(System.Windows.Size availableSize)     Unknown
PresentationCore.dll!System.Windows.UIElement.Measure(System.Windows.Size availableSize)     Unknown
PresentationFramework.dll!System.Windows.Controls.Grid.MeasureCell(int cell, bool forceInfinityV) Unknown
PresentationFramework.dll!System.Windows.Controls.Grid.MeasureCellsGroup(int cellsHead, System.Windows.Size referenceSize, bool ignoreDesiredSizeU, bool forceInfinityV, out bool hasDesiredSizeUChanged)           Unknown
PresentationFramework.dll!System.Windows.Controls.Grid.MeasureCellsGroup(int cellsHead, System.Windows.Size referenceSize, bool ignoreDesiredSizeU, bool forceInfinityV) Unknown
PresentationFramework.dll!System.Windows.Controls.Grid.MeasureOverride(System.Windows.Size constraint)         Unknown
PresentationFramework.dll!System.Windows.FrameworkElement.MeasureCore(System.Windows.Size availableSize)     Unknown
PresentationCore.dll!System.Windows.UIElement.Measure(System.Windows.Size availableSize)     Unknown
PresentationFramework.dll!MS.Internal.Helper.MeasureElementWithSingleChild(System.Windows.UIElement element, System.Windows.Size constraint)          Unknown
PresentationFramework.dll!System.Windows.Controls.ContentPresenter.MeasureOverride(System.Windows.Size constraint)         Unknown
PresentationFramework.dll!System.Windows.FrameworkElement.MeasureCore(System.Windows.Size availableSize)     Unknown
PresentationCore.dll!System.Windows.UIElement.Measure(System.Windows.Size availableSize)     Unknown
PresentationFramework.dll!System.Windows.Controls.Decorator.MeasureOverride(System.Windows.Size constraint)         Unknown
PresentationFramework.dll!System.Windows.Documents.AdornerDecorator.MeasureOverride(System.Windows.Size constraint)         Unknown
PresentationFramework.dll!System.Windows.FrameworkElement.MeasureCore(System.Windows.Size availableSize)     Unknown
PresentationCore.dll!System.Windows.UIElement.Measure(System.Windows.Size availableSize)     Unknown
PresentationFramework.dll!System.Windows.Controls.Border.MeasureOverride(System.Windows.Size constraint)         Unknown
PresentationFramework.dll!System.Windows.FrameworkElement.MeasureCore(System.Windows.Size availableSize)     Unknown
PresentationCore.dll!System.Windows.UIElement.Measure(System.Windows.Size availableSize)     Unknown
PresentationFramework.dll!System.Windows.Window.MeasureOverrideHelper(System.Windows.Size constraint)         Unknown
PresentationFramework.dll!System.Windows.Window.MeasureOverride(System.Windows.Size availableSize)     Unknown
PresentationFramework.dll!System.Windows.FrameworkElement.MeasureCore(System.Windows.Size availableSize)     Unknown
PresentationCore.dll!System.Windows.UIElement.Measure(System.Windows.Size availableSize)     Unknown
PresentationCore.dll!System.Windows.Interop.HwndSource.SetLayoutSize()              Unknown
PresentationCore.dll!System.Windows.Interop.HwndSource.RootVisualInternal.set(System.Windows.Media.Visual value)   Unknown
PresentationCore.dll!System.Windows.Interop.HwndSource.RootVisual.set(System.Windows.Media.Visual value)   Unknown
PresentationFramework.dll!System.Windows.Window.SourceWindowHelper.RootVisual.set(System.Windows.Media.Visual value)   Unknown
PresentationFramework.dll!System.Windows.Window.SetRootVisual()              Unknown
PresentationFramework.dll!System.Windows.Window.SetRootVisualAndUpdateSTC()              Unknown
PresentationFramework.dll!System.Windows.Window.SetupInitialState(double requestedTop, double requestedLeft, double requestedWidth, double requestedHeight)          Unknown
PresentationFramework.dll!System.Windows.Window.CreateSourceWindow(bool duringShow)      Unknown
PresentationFramework.dll!System.Windows.Window.CreateSourceWindowDuringShow()              Unknown
PresentationFramework.dll!System.Windows.Window.SafeCreateWindowDuringShow()              Unknown
PresentationFramework.dll!System.Windows.Window.ShowHelper(object booleanBox)      Unknown
PresentationFramework.dll!System.Windows.Window.Show()              Unknown
PresentationFramework.dll!System.Windows.Window.ShowDialog()              Unknown
> NuGetPackageExplorer.dll!PackageExplorer.PackageChooserDialog.ShowDialog(string searchTerm) Line 169    C#
NuGetPackageExplorer.dll!PackageExplorer.PackageChooserService.SelectPackage(string searchTerm) Line 52      C#
NuGetPackageExplorer.dll!PackageExplorer.MainWindow.OpenPackageFromRepository(string searchTerm) Line 335    C#
NuGetPackageExplorer.dll!PackageExplorer.MainWindow.OpenFeedItem_Click(object sender, System.Windows.Input.ExecutedRoutedEventArgs e) Line 303         C#
PresentationCore.dll!System.Windows.Input.CommandBinding.OnExecuted(object sender, System.Windows.Input.ExecutedRoutedEventArgs e)          Unknown
PresentationCore.dll!System.Windows.Input.CommandManager.ExecuteCommandBinding(object sender, System.Windows.Input.ExecutedRoutedEventArgs e, System.Windows.Input.CommandBinding commandBinding)          Unknown
PresentationCore.dll!System.Windows.Input.CommandManager.FindCommandBinding(System.Windows.Input.CommandBindingCollection commandBindings, object sender, System.Windows.RoutedEventArgs e, System.Windows.Input.ICommand command, bool execute)             Unknown
PresentationCore.dll!System.Windows.Input.CommandManager.FindCommandBinding(object sender, System.Windows.RoutedEventArgs e, System.Windows.Input.ICommand command, bool execute)             Unknown
PresentationCore.dll!System.Windows.Input.CommandManager.OnExecuted(object sender, System.Windows.Input.ExecutedRoutedEventArgs e)          Unknown
PresentationCore.dll!System.Windows.UIElement.OnExecutedThunk(object sender, System.Windows.Input.ExecutedRoutedEventArgs e)          Unknown
PresentationCore.dll!System.Windows.Input.ExecutedRoutedEventArgs.InvokeEventHandler(System.Delegate genericHandler, object target)   Unknown
PresentationCore.dll!System.Windows.RoutedEventArgs.InvokeHandler(System.Delegate handler, object target)   Unknown
PresentationCore.dll!System.Windows.EventRoute.InvokeHandlersImpl(object source, System.Windows.RoutedEventArgs args, bool reRaised)            Unknown
PresentationCore.dll!System.Windows.UIElement.RaiseEventImpl(System.Windows.DependencyObject sender, System.Windows.RoutedEventArgs args)              Unknown
PresentationCore.dll!System.Windows.Input.RoutedCommand.ExecuteImpl(object parameter, System.Windows.IInputElement target, bool userInitiated)     Unknown
PresentationCore.dll!System.Windows.Input.RoutedCommand.ExecuteCore(object parameter, System.Windows.IInputElement target, bool userInitiated)     Unknown
PresentationFramework.dll!MS.Internal.Commands.CommandHelpers.CriticalExecuteCommandSource(System.Windows.Input.ICommandSource commandSource, bool userInitiated)       Unknown
PresentationFramework.dll!MS.Internal.Commands.CommandHelpers.ExecuteCommandSource(System.Windows.Input.ICommandSource commandSource)            Unknown
PresentationFramework.dll!System.Windows.Controls.Primitives.ButtonBase.OnClick()              Unknown
PresentationFramework.dll!System.Windows.Controls.Button.OnClick()              Unknown
PresentationFramework.dll!System.Windows.Controls.Primitives.ButtonBase.OnMouseLeftButtonUp(System.Windows.Input.MouseButtonEventArgs e)          Unknown
PresentationCore.dll!System.Windows.UIElement.OnMouseLeftButtonUpThunk(object sender, System.Windows.Input.MouseButtonEventArgs e)              Unknown
PresentationCore.dll!System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(System.Delegate genericHandler, object genericTarget)    Unknown
PresentationCore.dll!System.Windows.RoutedEventArgs.InvokeHandler(System.Delegate handler, object target)   Unknown
PresentationCore.dll!System.Windows.EventRoute.InvokeHandlersImpl(object source, System.Windows.RoutedEventArgs args, bool reRaised)            Unknown
PresentationCore.dll!System.Windows.EventRoute.ReInvokeHandlers(object source, System.Windows.RoutedEventArgs args)              Unknown
PresentationCore.dll!System.Windows.UIElement.ReRaiseEventAs(System.Windows.DependencyObject sender, System.Windows.RoutedEventArgs args, System.Windows.RoutedEvent newEvent)           Unknown
PresentationCore.dll!System.Windows.UIElement.CrackMouseButtonEventAndReRaiseEvent(System.Windows.DependencyObject sender, System.Windows.Input.MouseButtonEventArgs e)              Unknown
PresentationCore.dll!System.Windows.UIElement.OnMouseUpThunk(object sender, System.Windows.Input.MouseButtonEventArgs e)              Unknown
PresentationCore.dll!System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(System.Delegate genericHandler, object genericTarget)    Unknown
PresentationCore.dll!System.Windows.RoutedEventArgs.InvokeHandler(System.Delegate handler, object target)   Unknown
PresentationCore.dll!System.Windows.EventRoute.InvokeHandlersImpl(object source, System.Windows.RoutedEventArgs args, bool reRaised)            Unknown
PresentationCore.dll!System.Windows.UIElement.RaiseEventImpl(System.Windows.DependencyObject sender, System.Windows.RoutedEventArgs args)              Unknown
PresentationCore.dll!System.Windows.UIElement.RaiseTrustedEvent(System.Windows.RoutedEventArgs args)     Unknown
PresentationCore.dll!System.Windows.Input.InputManager.ProcessStagingArea()              Unknown
PresentationCore.dll!System.Windows.Input.InputManager.ProcessInput(System.Windows.Input.InputEventArgs input)    Unknown
PresentationCore.dll!System.Windows.Input.InputProviderSite.ReportInput(System.Windows.Input.InputReport inputReport)      Unknown
PresentationCore.dll!System.Windows.Interop.HwndMouseInputProvider.ReportInput(System.IntPtr hwnd, System.Windows.Input.InputMode mode, int timestamp, System.Windows.Input.RawMouseActions actions, int x, int y, int wheel)     Unknown
PresentationCore.dll!System.Windows.Interop.HwndMouseInputProvider.FilterMessage(System.IntPtr hwnd, MS.Internal.Interop.WindowMessage msg, System.IntPtr wParam, System.IntPtr lParam, ref bool handled)             Unknown
PresentationCore.dll!System.Windows.Interop.HwndSource.InputFilterMessage(System.IntPtr hwnd, int msg, System.IntPtr wParam, System.IntPtr lParam, ref bool handled)            Unknown
WindowsBase.dll!MS.Win32.HwndWrapper.WndProc(System.IntPtr hwnd, int msg, System.IntPtr wParam, System.IntPtr lParam, ref bool handled)            Unknown
WindowsBase.dll!MS.Win32.HwndSubclass.DispatcherCallbackOperation(object o)          Unknown
WindowsBase.dll!System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate callback, object args, int numArgs)          Unknown
WindowsBase.dll!System.Windows.Threading.ExceptionWrapper.TryCatchWhen(object source, System.Delegate callback, object args, int numArgs, System.Delegate catchHandler)            Unknown
WindowsBase.dll!System.Windows.Threading.Dispatcher.LegacyInvokeImpl(System.Windows.Threading.DispatcherPriority priority, System.TimeSpan timeout, System.Delegate method, object args, int numArgs)           Unknown
WindowsBase.dll!MS.Win32.HwndSubclass.SubclassWndProc(System.IntPtr hwnd, int msg, System.IntPtr wParam, System.IntPtr lParam) Unknown
             [Native to Managed Transition]  
             [Managed to Native Transition]  
WindowsBase.dll!System.Windows.Threading.Dispatcher.TranslateAndDispatchMessage(ref System.Windows.Interop.MSG msg)       Unknown
WindowsBase.dll!System.Windows.Threading.Dispatcher.PushFrameImpl(System.Windows.Threading.DispatcherFrame frame)  Unknown
WindowsBase.dll!System.Windows.Threading.Dispatcher.PushFrame(System.Windows.Threading.DispatcherFrame frame)  Unknown
WindowsBase.dll!System.Windows.Threading.Dispatcher.Run()              Unknown
PresentationFramework.dll!System.Windows.Application.RunDispatcher(object ignore)  Unknown
PresentationFramework.dll!System.Windows.Application.RunInternal(System.Windows.Window window)             Unknown
PresentationFramework.dll!System.Windows.Application.Run(System.Windows.Window window)             Unknown
PresentationFramework.dll!System.Windows.Application.Run()              Unknown
        NuGetPackageExplorer.dll!PackageExplorer.App.Main()              Unknown

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 24 (15 by maintainers)

Most upvoted comments

Yep, that’s the issue. It showed up as a regression because @rladuca fixed the loading of these extensions. Closing this out for now.

Confirmed working for me as well! 🎉

@onovotny I copied the file here: C:\Program Files\dotnet\shared\Microsoft.DesktopUI.App\3.0.0-alpha-27017-4 (modify it according to your destination)

@Lakritzator

Patching the cctor with a hex editor is another option. Then you’re not blocked for X weeks until this is fixed.

dotnet --version: 3.0.100-alpha1-009697
File: PresentationFramework-SystemXmlLinq.dll
x86 / x64:
File offset 0250
orig: 133002006C00000001000011720100....
 new: 062A

@Lakritzator I have not tried yet as it looked like a fair bit of extra code. I’ve been tracking dotnet/runtime#27548 and hoping it’s fixed soon.