syntax-tm / SteamAchievementManager

Steam Achievement Manager
zlib License
149 stars 4 forks source link

Crash on startup #30

Closed iBreakEverything closed 12 hours ago

iBreakEverything commented 2 days ago

Crashed when clicking on interface (anywhere) after loading library.

log.txt

SAM 2024-12-01 22:56:19,499 INFO  App [1] - Application startup.
SAM 2024-12-01 22:56:30,241 FATAL App [1] - Dispatcher unhandled exception occurred. Exception has been thrown by the target of an invocation.
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
 ---> SAM.Core.SAMException: An error occurred handling the RequestMessage for Library Refresh. Collection was modified; enumeration operation may not execute.
 ---> System.InvalidOperationException: Collection was modified; enumeration operation may not execute.
   at System.Linq.Enumerable.Count[TSource](IEnumerable`1 source, Func`2 predicate)
   at SAM.SteamLibrary.RefreshCounts() in D:\a\SteamAchievementManager\SteamAchievementManager\src\SAM\Models\SteamLibrary.cs:line 315
   at SAM.SteamLibrary.OnRequestMessage(RequestMessage request) in D:\a\SteamAchievementManager\SteamAchievementManager\src\SAM\Models\SteamLibrary.cs:line 90
   --- End of inner exception stack trace ---
   at SAM.SteamLibrary.OnRequestMessage(RequestMessage request) in D:\a\SteamAchievementManager\SteamAchievementManager\src\SAM\Models\SteamLibrary.cs:line 97
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor)
   at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args)
   at System.Reflection.MethodBaseInvoker.InvokeDirectByRefWithFewArgs(Object obj, Span`1 copyOfArgs, BindingFlags invokeAttr)
   --- End of inner exception stack trace ---
   at System.Reflection.MethodBaseInvoker.InvokeDirectByRefWithFewArgs(Object obj, Span`1 copyOfArgs, BindingFlags invokeAttr)
   at System.Reflection.MethodBaseInvoker.InvokeWithOneArg(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters)
   at DevExpress.Mvvm.Native.WeakReferenceActionInvoker`1.Execute(Object parameter)
   at DevExpress.Mvvm.Native.ActionInvokerBase.DevExpress.Mvvm.Native.IActionInvoker.ExecuteIfMatched(Type messageTargetType, Object parameter)
   at DevExpress.Mvvm.Messenger.ActionInvokerCollection.Send(Object message, Type messageTargetType, Object token, Type messageType)
   at DevExpress.Mvvm.Messenger.Send[TMessage](TMessage message, Type messageTargetType, Object token)
   at DevExpress.Mvvm.MessengerExtensions.Send[TMessage](IMessenger messenger, TMessage message)
   at SAM.Extensions.MessengerExtensions.SendRequest(IMessenger messenger, EntityType entityType, RequestType request) in D:\a\SteamAchievementManager\SteamAchievementManager\src\SAM\Common\Extensions\MessengerExtensions.cs:line 30
   at SAM.SteamApp.ToggleFavorite() in D:\a\SteamAchievementManager\SteamAchievementManager\src\SAM\Models\SteamApp.cs:line 154
   at DevExpress.Mvvm.DelegateCommand.<>c__DisplayClass2_0.<.ctor>b__0(Object o)
   at DevExpress.Mvvm.DelegateCommand`1.Execute(T parameter)
   at DevExpress.Mvvm.CommandBase`1.System.Windows.Input.ICommand.Execute(Object parameter)
   at MS.Internal.Commands.CommandHelpers.CriticalExecuteCommandSource(ICommandSource commandSource, Boolean userInitiated)
   at System.Windows.Controls.Primitives.ButtonBase.OnClick()
   at System.Windows.Controls.Button.OnClick()
   at System.Windows.Controls.Primitives.ButtonBase.OnMouseLeftButtonUp(MouseButtonEventArgs e)
   at System.Windows.UIElement.OnMouseLeftButtonUpThunk(Object sender, MouseButtonEventArgs e)
   at System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
   at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
   at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
   at System.Windows.UIElement.ReRaiseEventAs(DependencyObject sender, RoutedEventArgs args, RoutedEvent newEvent)
   at System.Windows.UIElement.OnMouseUpThunk(Object sender, MouseButtonEventArgs e)
   at System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
   at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
   at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
   at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
   at System.Windows.UIElement.RaiseTrustedEvent(RoutedEventArgs args)
   at System.Windows.Input.InputManager.ProcessStagingArea()
   at System.Windows.Input.InputManager.ProcessInput(InputEventArgs input)
   at System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport)
   at System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawMouseActions actions, Int32 x, Int32 y, Int32 wheel)
   at System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr hwnd, WindowMessage msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at System.Windows.Interop.HwndSource.InputFilterMessage(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)
syntax-tm commented 1 day ago

Which version was this?

You can try deleting the cache (%LOCALAPPDATA%\SAM) and see if that fixes it.

iBreakEverything commented 13 hours ago

latest (0.6.0) I deleted the cache and app, downloaded the app again and launch it: loaded library to 100% and just when downloading images it freezes and crashes. no logs are made apart from SAM 2024-12-03 17:56:41,700 INFO App [1] - Application startup.

At the second run (with the new cache) the following error was recorded:

SAM 2024-12-03 17:59:42,769 FATAL App [1] - Dispatcher unhandled exception occurred. Exception has been thrown by the target of an invocation.
<log4net.Error>Exception rendering object type [System.Reflection.TargetInvocationException]<stackTrace>System.OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown.
   at System.Exception.get_StackTrace()
   at System.Exception.ToString()
   at System.Exception.ToString()
   at log4net.ObjectRenderer.DefaultRenderer.RenderObject(RendererMap rendererMap, Object obj, TextWriter writer)
   at log4net.ObjectRenderer.RendererMap.FindAndRender(Object obj, TextWriter writer)</stackTrace></log4net.Error>
iBreakEverything commented 12 hours ago

I downloaded v0.7.0-beta and it works fine, the problem was from my large library (+7000 apps).