lucasg / Dependencies

A rewrite of the old legacy software "depends.exe" in C# for Windows devs to troubleshoot dll load dependencies issues.
MIT License
8.47k stars 697 forks source link

Dependencies crashes on windows10 machine after windows update #243

Open TreatTrick opened 9 months ago

TreatTrick commented 9 months ago

I currently use the latest version v1.11.1, and I cannot start the software after windows 10 's update KB5011048, the software crashes after double clicking. .net runtime throws a System.TypeLoadException in windows system log. The interesting thing is after I uninstalled windows update KB5011048, the software worked again.

TreatTrick commented 9 months ago

I got the windows Error. I will past them below.

<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
<System>
  <Provider Name=".NET Runtime" /> 
  <EventID 
Qualifiers="0">1026</EventID> 
  <Version>0</Version> 
  <Level>2</Level> 
  <Task>0</Task> 
  <Opcode>0</Opcode> 
  <Keywords>0x80000000000000</Keywords> 
  <TimeCreated SystemTime="2023-10-18T02:49:16.8593197Z" /> 
  <EventRecordID>11814</EventRecordID> 
  <Correlation /> 
  <Execution ProcessID="0" ThreadID="0" /> 
  <Channel>Application</Channel> 
  <Computer>PC-20230717VQDN</Computer> 
  <Security /> 
  </System>
[-](https://github.com/lucasg/Dependencies/issues/243#) <EventData>
  <Data>应用程序: DependenciesGui.exe Framework 版本: v4.0.30319 说明: 
由于未经处理的异常,进程终止。异常信息: System.TypeLoadException 在 
System.Windows.Automation.Peers.AutomationPeer.Initialize() 在 
System.Windows.Automation.Peers.AutomationPeer..cctor() 异常信息: 
System.TypeInitializationException 在 
System.Windows.Controls.ListBox.OnSelectionChanged(System.Windows.Controls.SelectionChangedEventArgs) 
在 System.Windows.Controls.Primitives.Selector+SelectionChanger.End() 在 
System.Windows.Controls.Primitives.Selector+SelectionChanger.SelectJustThisItem(ItemInfo, 
Boolean) 在 
System.Windows.Controls.Primitives.Selector.OnSelectedIndexChanged(System.Windows.DependencyObject, 
System.Windows.DependencyPropertyChangedEventArgs) 在 
System.Windows.DependencyObject.OnPropertyChanged(System.Windows.DependencyPropertyChangedEventArgs) 
在 
System.Windows.FrameworkElement.OnPropertyChanged(System.Windows.DependencyPropertyChangedEventArgs) 
在 
System.Windows.DependencyObject.NotifyPropertyChange(System.Windows.DependencyPropertyChangedEventArgs) 
在 
System.Windows.DependencyObject.UpdateEffectiveValue(System.Windows.EntryIndex, 
System.Windows.DependencyProperty, System.Windows.PropertyMetadata, 
System.Windows.EffectiveValueEntry, System.Windows.EffectiveValueEntry ByRef, 
Boolean, Boolean, System.Windows.OperationType) 在 
System.Windows.DependencyObject.SetValueCommon(System.Windows.DependencyProperty, 
System.Object, System.Windows.PropertyMetadata, Boolean, Boolean, 
System.Windows.OperationType, Boolean) 在 
System.Windows.DependencyObject.SetValue(System.Windows.DependencyProperty, 
System.Object) 在 
Dependencies.UserSettings.SelectListItem(System.Windows.Controls.ListBox, 
System.Object) 在 Dependencies.UserSettings.OnInitialized(System.EventArgs) 在 
System.Windows.FrameworkElement.TryFireInitialized() 在 
MS.Internal.Xaml.Runtime.ClrObjectRuntime.InitializationGuard(System.Xaml.XamlType, 
System.Object, Boolean) 异常信息: System.Windows.Markup.XamlParseException 在 
System.Windows.Markup.XamlReader.RewrapException(System.Exception, 
System.Xaml.IXamlLineInfo, System.Uri) 在 
System.Windows.Markup.WpfXamlLoader.Load(System.Xaml.XamlReader, 
System.Xaml.IXamlObjectWriterFactory, Boolean, System.Object, 
System.Xaml.XamlObjectWriterSettings, System.Uri) 在 
System.Windows.Markup.WpfXamlLoader.LoadBaml(System.Xaml.XamlReader, Boolean, 
System.Object, System.Xaml.Permissions.XamlAccessLevel, System.Uri) 在 
System.Windows.Markup.XamlReader.LoadBaml(System.IO.Stream, 
System.Windows.Markup.ParserContext, System.Object, Boolean) 在 
Dependencies.UserSettings.InitializeComponent() 在 
Dependencies.UserSettings..ctor() 在 Dependencies.MainWindow..ctor() 在 
Dependencies.App.App_Startup(System.Object, System.Windows.StartupEventArgs) 在 
System.Windows.Application.OnStartup(System.Windows.StartupEventArgs) 在 
System.Windows.Application.<.ctor>b__1_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() 在 
MS.Internal.CulturePreservingExecutionContext.CallbackWrapper(System.Object) 在 
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) 在 
Dependencies.App.Main()</Data> 
  </EventData>
  </Event>

and

<Event 
xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
<System>
  <Provider Name="Application Error" 
/> 
  <EventID 
Qualifiers="0">1000</EventID> 
  <Version>0</Version> 
  <Level>2</Level> 
  <Task>100</Task> 
  <Opcode>0</Opcode> 
  <Keywords>0x80000000000000</Keywords> 
  <TimeCreated SystemTime="2023-10-18T02:49:16.9510742Z" /> 
  <EventRecordID>11815</EventRecordID> 
  <Correlation /> 
  <Execution ProcessID="0" ThreadID="0" /> 
  <Channel>Application</Channel> 
  <Computer>PC-20230717VQDN</Computer> 
  <Security /> 
  </System>
 <EventData>
  <Data>DependenciesGui.exe</Data> 
  <Data>1.11.1.0</Data> 
  <Data>6176fab9</Data> 
  <Data>KERNELBASE.dll</Data> 
  <Data>10.0.19041.2364</Data> 
  <Data>5b7d4d22</Data> 
  <Data>e0434352</Data> 
  <Data>000000000002cd29</Data> 
  <Data>26cc</Data> 
  <Data>01da016daf5499c1</Data> 
  <Data>C:\Users\Administrator\Downloads\Dependencies_x64_Debug\DependenciesGui.exe</Data> 
  <Data>C:\Windows\System32\KERNELBASE.dll</Data> 
  <Data>4bae307e-ccfb-4e25-8640-ee768a386381</Data> 
  <Data /> 
  <Data /> 
  </EventData>
  </Event>
pzhlkj6612 commented 9 months ago

Hi @TreatTrick , are you interested in debugging this program on your computer? You can download the Debug build of Dependencies and the source code at version v1.11.1, then try debugging it with Visual Studio or dnSpy.

pzhlkj6612 commented 9 months ago

Well, it seems to be a common issue caused by that DotNET update... KB5011048 breaks PowerShell in Windows Sandboxes - Developer Community.