rthomasv3 / Scum-Bag

Scum Bag is an all-in-one save manager for all your characters and games.
5 stars 2 forks source link

Corrupt ACF file sends program into infinite loop #1

Closed DAOWAce closed 5 months ago

DAOWAce commented 6 months ago

Well, found the cause for the issue I reported on nexus.

Here's the ACF file for troubleshooting: appmanifest_1281930.zip

Weird I didn't have the tmodloader installed on Steam when I do. Wonder how long this ACF has been corrupt.. last modified in 2021.

Now it's still visibly frozen like before, but it's actually still scanning! Guess it's a good benchmark for code performance. And to find corrupt ACF's...

DAOWAce commented 6 months ago

Found 5 corrupt ACF's, all last updated in 2021. Can't remember what happened.. All the game data is still there. Hell I even had 2 installations of HoI4, waste of space, solved thanks to this bug.

[Info]: GameService>UpdateSteamLibrary - Steam App Entry Found: S:\Program Files (x86)\Steam\steamapps\appmanifest_1281930.acf [Info]: GameService>UpdateSteamLibrary - Steam App Entry Found: V:\Games\Steam\steamapps\appmanifest_422970.acf [Info]: GameService>UpdateSteamLibrary - Steam App Entry Found: N:\Games\Steam\steamapps\appmanifest_329970.acf [Info]: GameService>UpdateSteamLibrary - Steam App Entry Found: X:\Games\Steam\steamapps\appmanifest_394360.acf [Info]: GameService>UpdateSteamLibrary - Steam App Entry Found: X:\Games\Steam\steamapps\appmanifest_546560.acf

With all this fixed, the program is finally working as expected.


With that out of the way, gonna keep this hijacked to report another issue. Log kept spamming this every half a minute or so:

[Error]: GameService>UpdateSteamLibrary - System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\SteamLibrary\steamapps'.
   at System.IO.Enumeration.FileSystemEnumerator`1.CreateDirectoryHandle(String, Boolean )
   at System.IO.Enumeration.FileSystemEnumerator`1.Init()
   at System.IO.Enumeration.FileSystemEnumerator`1..ctor(String, Boolean, EnumerationOptions )
   at System.IO.Enumeration.FileSystemEnumerable`1.DelegateEnumerator..ctor(FileSystemEnumerable`1, Boolean)
   at System.IO.Enumeration.FileSystemEnumerable`1..ctor(String, FindTransform, EnumerationOptions, Boolean)
   at System.IO.Enumeration.FileSystemEnumerable`1..ctor(String, FindTransform , EnumerationOptions )
   at System.IO.Enumeration.FileSystemEnumerableFactory.UserFiles(String, String, EnumerationOptions)
   at System.IO.Directory.InternalEnumeratePaths(String, String, SearchTarget, EnumerationOptions)
   at System.IO.Directory.EnumerateFiles(String, String, EnumerationOptions)
   at System.IO.Directory.EnumerateFiles(String, String)
   at Scum_Bag.Services.GameService.UpdateSteamLibrary(Boolean logInfo)

Then it changed to:

[Error]: GameService>UpdateSteamLibrary - System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\SteamLibrary\steamapps'.
   at System.IO.Enumeration.FileSystemEnumerator`1.Init()
   at System.IO.Directory.InternalEnumeratePaths(String, String, SearchTarget, EnumerationOptions)
   at Scum_Bag.Services.GameService.UpdateSteamLibrary(Boolean logInfo)

Not doing anything but just sitting in the background.

Is this another issue specific to my system (ie bogus steam library in registry?) or is it a code issue?

rthomasv3 commented 6 months ago

Wow this is a great a bug report - thanks so much for digging in and getting all these details. I'm going over everything now and will try to have a fix out later today.

rthomasv3 commented 6 months ago

Found 5 corrupt ACF's, all last updated in 2021. Can't remember what happened.. All the game data is still there. Hell I even had 2 installations of HoI4, waste of space, solved thanks to this bug.

[Info]: GameService>UpdateSteamLibrary - Steam App Entry Found: S:\Program Files (x86)\Steam\steamapps\appmanifest_1281930.acf [Info]: GameService>UpdateSteamLibrary - Steam App Entry Found: V:\Games\Steam\steamapps\appmanifest_422970.acf [Info]: GameService>UpdateSteamLibrary - Steam App Entry Found: N:\Games\Steam\steamapps\appmanifest_329970.acf [Info]: GameService>UpdateSteamLibrary - Steam App Entry Found: X:\Games\Steam\steamapps\appmanifest_394360.acf [Info]: GameService>UpdateSteamLibrary - Steam App Entry Found: X:\Games\Steam\steamapps\appmanifest_546560.acf

With all this fixed, the program is finally working as expected.

With that out of the way, gonna keep this hijacked to report another issue. Log kept spamming this every half a minute or so:

[Error]: GameService>UpdateSteamLibrary - System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\SteamLibrary\steamapps'.
   at System.IO.Enumeration.FileSystemEnumerator`1.CreateDirectoryHandle(String, Boolean )
   at System.IO.Enumeration.FileSystemEnumerator`1.Init()
   at System.IO.Enumeration.FileSystemEnumerator`1..ctor(String, Boolean, EnumerationOptions )
   at System.IO.Enumeration.FileSystemEnumerable`1.DelegateEnumerator..ctor(FileSystemEnumerable`1, Boolean)
   at System.IO.Enumeration.FileSystemEnumerable`1..ctor(String, FindTransform, EnumerationOptions, Boolean)
   at System.IO.Enumeration.FileSystemEnumerable`1..ctor(String, FindTransform , EnumerationOptions )
   at System.IO.Enumeration.FileSystemEnumerableFactory.UserFiles(String, String, EnumerationOptions)
   at System.IO.Directory.InternalEnumeratePaths(String, String, SearchTarget, EnumerationOptions)
   at System.IO.Directory.EnumerateFiles(String, String, EnumerationOptions)
   at System.IO.Directory.EnumerateFiles(String, String)
   at Scum_Bag.Services.GameService.UpdateSteamLibrary(Boolean logInfo)

Then it changed to:

[Error]: GameService>UpdateSteamLibrary - System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\SteamLibrary\steamapps'.
   at System.IO.Enumeration.FileSystemEnumerator`1.Init()
   at System.IO.Directory.InternalEnumeratePaths(String, String, SearchTarget, EnumerationOptions)
   at Scum_Bag.Services.GameService.UpdateSteamLibrary(Boolean logInfo)

Not doing anything but just sitting in the background.

Is this another issue specific to my system (ie bogus steam library in registry?) or is it a code issue?

Both issues should be fixed in Release v1.0.3.

Thanks again for finding this bug. Let me know if everything is working for you or if you run into any more issues.