Slazanger / SMT

Slazanger's Eve Map Tool
MIT License
264 stars 77 forks source link

Bug: v1.26 - Crashing when Windows is locked #143

Closed andrewtquick closed 11 months ago

andrewtquick commented 11 months ago

When Windows user session is locked, SMT is crashing. Below are the event logs.

OS: Windows 11 Pro

.NET Runtime Error

Application: SMT.exe
CoreCLR Version: 6.0.2423.51814
.NET Version: 6.0.24
Description: The process was terminated due to an unhandled exception.
Exception Info: System.InvalidOperationException: Collection was modified; enumeration operation may not execute.
   at System.Collections.Generic.List`1.Enumerator.MoveNextRare()
   at SMT.RegionControl.AddDataToMap() in D:\Projects\SMT\SMT\RegionControl.xaml.cs:line 1846
   at SMT.RegionControl.ReDrawMap(Boolean FullRedraw) in D:\Projects\SMT\SMT\RegionControl.xaml.cs:line 705
   at System.Windows.Threading.DispatcherOperation.InvokeDelegateCore()
   at System.Windows.Threading.DispatcherOperation.InvokeImpl()
--- End of stack trace from previous location ---
   at System.Windows.Threading.DispatcherOperation.Wait(TimeSpan timeout)
   at System.Windows.Threading.Dispatcher.InvokeImpl(DispatcherOperation operation, CancellationToken cancellationToken, TimeSpan timeout)
   at System.Windows.Threading.Dispatcher.Invoke(Action callback, DispatcherPriority priority, CancellationToken cancellationToken, TimeSpan timeout)
   at SMT.RegionControl.UiRefreshTimer_Tick(Object sender, EventArgs e) in D:\Projects\SMT\SMT\RegionControl.xaml.cs:line 4051
   at System.Windows.Threading.DispatcherTimer.FireTick()
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
   at System.Windows.Threading.DispatcherOperation.InvokeImpl()
   at MS.Internal.CulturePreservingExecutionContext.CallbackWrapper(Object obj)
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location ---
   at MS.Internal.CulturePreservingExecutionContext.Run(CulturePreservingExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Windows.Threading.DispatcherOperation.Invoke()
   at System.Windows.Threading.Dispatcher.ProcessQueue()
   at System.Windows.Threading.Dispatcher.WndProcHook(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
   at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
   at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
   at MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
   at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
   at System.Windows.Threading.Dispatcher.PushFrame(DispatcherFrame frame)
   at System.Windows.Threading.Dispatcher.Run()
   at System.Windows.Application.RunDispatcher(Object ignore)
   at System.Windows.Application.RunInternal(Window window)
   at System.Windows.Application.Run()
   at XamlGeneratedNamespace.GeneratedApplication.Main()

Application Error

Faulting application name: SMT.exe, version: 1.0.0.0, time stamp: 0x6387d353
Faulting module name: KERNELBASE.dll, version: 10.0.22621.2428, time stamp: 0x9223bda8
Exception code: 0xe0434352
Fault offset: 0x0000000000064ffc
Faulting process id: 0x0x361C
Faulting application start time: 0x0x1DA0EC423CBD733
Faulting application path: D:\SMT\SMT.exe
Faulting module path: C:\Windows\System32\KERNELBASE.dll
Report Id: 75748193-fd24-412c-9218-7e02f3d000d9
Faulting package full name: 
Faulting package-relative application ID: 
Slazanger commented 11 months ago

This should be fixed in 1.27