syntax-tm / SteamAchievementManager

Steam Achievement Manager
zlib License
146 stars 4 forks source link

Display all steam games, instead only my library #22

Closed Skiexx closed 3 months ago

Skiexx commented 3 months ago

Version of the program 0.6 When I launch SAM.exe, instead of (as before) displaying my library, it starts gathering 30k games from all of Steam. Also, when launching any game, it throws an error starting that very game.

Errors.log:

SAM 2024-06-30 03:55:01,973 FATAL App [1] - Dispatcher unhandled exception occurred. Object reference not set to an instance of an object.
System.NullReferenceException: Object reference not set to an instance of an object.
   at Wpf.Ui.Controls.AutoSuggestBox.GetStringFromObj(Object obj)
   at Wpf.Ui.Controls.AutoSuggestBox.<>c__DisplayClass81_0.<DefaultFiltering>b__0(Object item)
   at System.Linq.Enumerable.WhereEnumerableIterator`1.ToList()
   at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
   at Wpf.Ui.Controls.AutoSuggestBox.DefaultFiltering(String text)
   at Wpf.Ui.Controls.AutoSuggestBox.OnTextChanged(AutoSuggestionBoxTextChangeReason reason, String text)
   at Wpf.Ui.Controls.AutoSuggestBox.TextBoxOnTextChanged(Object sender, TextChangedEventArgs e)
   at System.Windows.Controls.TextChangedEventArgs.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.RaiseEvent(RoutedEventArgs e)
   at System.Windows.Controls.Primitives.TextBoxBase.OnTextChanged(TextChangedEventArgs e)
   at Wpf.Ui.Controls.TextBox.OnTextChanged(TextChangedEventArgs e)
   at System.Windows.Controls.Primitives.TextBoxBase.OnTextContainerChanged(Object sender, TextContainerChangedEventArgs e)
   at System.Windows.Controls.TextBox.OnTextContainerChanged(Object sender, TextContainerChangedEventArgs e)
   at System.Windows.Documents.TextContainerChangedEventHandler.Invoke(Object sender, TextContainerChangedEventArgs e)
   at System.Windows.Documents.TextContainer.EndChange(Boolean skipEvents)
   at System.Windows.Documents.TextContainer.System.Windows.Documents.ITextContainer.EndChange(Boolean skipEvents)
   at System.Windows.Documents.TextRangeBase.EndChange(ITextRange thisRange, Boolean disableScroll, Boolean skipEvents)
   at System.Windows.Documents.TextRange.System.Windows.Documents.ITextRange.EndChange(Boolean disableScroll, Boolean skipEvents)
   at System.Windows.Documents.TextRange.ChangeBlock.System.IDisposable.Dispose()
   at System.Windows.Documents.TextEditorTyping.DoTextInput(TextEditor This, String textData, Boolean isInsertKeyToggled, Boolean acceptControlCharacters)
   at System.Windows.Documents.TextEditorTyping.TextInputItem.Do()
   at System.Windows.Documents.TextEditorTyping.ScheduleInput(TextEditor This, InputItem item)
   at System.Windows.Documents.TextEditorTyping.OnTextInput(Object sender, TextCompositionEventArgs e)
   at System.Windows.Controls.Primitives.TextBoxBase.OnTextInput(TextCompositionEventArgs e)
   at System.Windows.UIElement.OnTextInputThunk(Object sender, TextCompositionEventArgs e)
   at System.Windows.Input.TextCompositionEventArgs.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.TextCompositionManager.UnsafeCompleteComposition(TextComposition composition)
   at System.Windows.Input.TextCompositionManager.PostProcessInput(Object sender, ProcessInputEventArgs e)
   at System.Windows.Input.InputManager.RaiseProcessInputEventHandlers(Tuple`2 postProcessInput, ProcessInputEventArgs processInputEventArgs)
   at System.Windows.Input.InputManager.ProcessStagingArea()
   at System.Windows.Input.InputManager.ProcessInput(InputEventArgs input)
   at System.Windows.Input.TextCompositionManager.UnsafeStartComposition(TextComposition composition)
   at System.Windows.Input.TextCompositionManager.PostProcessInput(Object sender, ProcessInputEventArgs e)
   at System.Windows.Input.InputManager.RaiseProcessInputEventHandlers(Tuple`2 postProcessInput, ProcessInputEventArgs processInputEventArgs)
   at System.Windows.Input.InputManager.ProcessStagingArea()
   at System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport)
   at System.Windows.Interop.HwndKeyboardInputProvider.ProcessTextInputAction(IntPtr hwnd, WindowMessage msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at System.Windows.Interop.HwndSource.OnPreprocessMessage(Object param)
   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)
SAM 2024-06-30 14:13:27,742 ERROR SAM.Core.SteamClientManager [1] - An error occurred attempting to initialize the Steam client with app ID '2845220'. Failed to connect to global user
SAM.API.ClientInitializeException: Failed to connect to global user
   at SAM.API.Client.Initialize(UInt32 appId) in D:\a\SteamAchievementManager\SteamAchievementManager\src\SAM.API\Client.cs:line 48
   at SAM.Core.SteamClientManager.Init(UInt32 appId) in D:\a\SteamAchievementManager\SteamAchievementManager\src\SAM.Core\API\Steam\SteamClientManager.cs:line 81
SAM 2024-06-30 14:13:28,077 ERROR App [1] - An error occurred on application startup. An error occurred attempting to initialize the Steam client with app ID '2845220'. Failed to connect to global user
SAM.Core.SAMInitializationException: An error occurred attempting to initialize the Steam client with app ID '2845220'. Failed to connect to global user
 ---> SAM.API.ClientInitializeException: Failed to connect to global user
   at SAM.API.Client.Initialize(UInt32 appId) in D:\a\SteamAchievementManager\SteamAchievementManager\src\SAM.API\Client.cs:line 48
   at SAM.Core.SteamClientManager.Init(UInt32 appId) in D:\a\SteamAchievementManager\SteamAchievementManager\src\SAM.Core\API\Steam\SteamClientManager.cs:line 81
   --- End of inner exception stack trace ---
   at SAM.Core.SteamClientManager.Init(UInt32 appId) in D:\a\SteamAchievementManager\SteamAchievementManager\src\SAM.Core\API\Steam\SteamClientManager.cs:line 93
   at SAM.App.HandleOptions(SAMOptions options) in D:\a\SteamAchievementManager\SteamAchievementManager\src\SAM\App.xaml.cs:line 98
   at SAM.App.OnStartup(StartupEventArgs args) in D:\a\SteamAchievementManager\SteamAchievementManager\src\SAM\App.xaml.cs:line 60

The application is located on a different drive from Steam at D:\SAM\

Skiexx commented 3 months ago

My Steam library contains only 232 games, while in the first 10 seconds SAM loads more than 5k games. image

syntax-tm commented 3 months ago

That's really weird. Which version is that? The most recent release or pre-release?

syntax-tm commented 3 months ago

Can you try putting it on the C:\ drive? I wonder if it's Windows Defender blocking it when it's on a different drive or something. I have Defender exceptions for pretty much everything so that it doesn't get in my way or I'd try it myself.

Skiexx commented 3 months ago

That's really weird. Which version is that? The most recent release or pre-release?

0.6 release, not 0.7 pre

Skiexx commented 3 months ago

Can you try putting it on the C:\ drive? I wonder if it's Windows Defender blocking it when it's on a different drive or something. I have Defender exceptions for pretty much everything so that it doesn't get in my way or I'd try it myself.

As you asked, I moved SAM to drive C, and placed it next to Steam. The result is the same. I think you should try reinstalling Steam. image

Skiexx commented 3 months ago

Okay, after reinstalling Steam, the library started working fine, most likely because of the koaloader I had installed on Steam earlier through koalagedon. Everything works fine now. image

syntax-tm commented 3 months ago

Oh, yeah that would 100% be why. I was trying to think about how those Steam client functions could be returning the wrong info.

Anything that writes the Steam process' memory could cause problems since SAM, and managed code in general, relies on P/Invokes to access the structs, functions, etc. in unmanaged assemblies (steamclient.dll). How they're stored in memory (the order, size, types, etc.) all have to match (e.g. ISteamApps008).

Anyways, glad you figured it out. Appreciate the follow-up. ✌️