FSGModding / FSG_Mod_Assistant

Farming Simulator 22 Mod Manager.
https://fsgmodding.github.io/FSG_Mod_Assistant/
ISC License
71 stars 11 forks source link

[BUG] Crash for "Manage local game saves" option #237

Open KITT3000 opened 3 months ago

KITT3000 commented 3 months ago

Is there an existing issue for this?

Current Behavior

Program crashes when I try to use "Manage local game saves"

Expected Behavior

Something should appear, but certainly not an error message.

Steps To Reproduce

  1. Click the option "Manage local game records".
  2. Immediately an error message appears and the program shuts down.

Environment

- Mod Assistant Version: 4.0.0 (but I had it on earlier ones too, certainly on 3.5.2 too)
- OS: Win10 and 11
- Virtualized: No

Anything else?

crash.log

I don't know if this is related but the link in the documentation to this option returns "404" xD

jtsage commented 3 months ago

Huh. ok, i see where that is happening, but not why. any chance you wanna do me a huge favor and send me over an archive of your savegames? maybe include the backup folder?

KITT3000 commented 3 months ago

https://mega.nz/file/pKtACQiL#QfEAwRLTOKtZqHtkhXNLQbGfpMpV8CMKVkDYzoA9D_g

jtsage commented 3 months ago

thanks. fwiw, it's save number 8. but of course it should fail more gracefully than that.

SimPaulJack commented 2 months ago

AH sorry to potentially reopen this but I had the same issue but it seems it was because of a nonstandard folder in my SaveGameBackup folder (I had a Manual Save Backup) folder there. I just moved it out and now it works. You might want to put that warning in the docs real quick. Great software by the way!

jtsage commented 2 months ago

all good - how was that folder structured? I'd prefer to set up MA so it just ignored stuff it can't handle like that

SimPaulJack commented 2 months ago

For me it was just the standard "SaveGameBackup" folder and then I had another "Manual Save Backup" folder under it where I put other subfolders in that one for the various series I'm making (YT) before starting just in case I run across a FS22 "feature"(not a bug) during play haha.


For example:
.\SaveGameBackup\
  ManualSaveBackup\
    Series1\
      EpXX\
        savvegame#

Of course to solve it I just moved it to the root of the FS22 profile folder so it just ignores it now.

(there we go, got the comment formatted right)

jtsage commented 2 months ago

cool. thanks. I'll do some more checking to make sure it won't error out when it hits unexpected things :)

onehandclapping commented 1 month ago

Just FYI. I too had a crash with this feature..

Caught rejection: TypeError: Cannot set properties of undefined (setting 'active')

Origin: [object Promise]

TypeError: Cannot set properties of undefined (setting 'active') at C:\Users\Mark\AppData\Local\Programs\fsg-mod-assistant\resources\app.asar\lib\modCheckLib.js:1690:36 at async saveGameManager.getInfo (C:\Users\Mark\AppData\Local\Programs\fsg-mod-assistant\resources\app.asar\lib\modCheckLib.js:1634:3)rejection Timestamp : 2024-05-13T13:05:55.833Z

As with SimPaulJack this was caused by a non standard folder "savegame2.calmsden.old" (a backup from ages ago). Deleted that and all well.

jtsage commented 1 month ago

will be fixed in 4.0.2, later today most likely

GrimGadget commented 1 week ago

will be fixed in 4.0.2, later today most likely

I'm using 4.06 and have same issue:

rejection Timestamp : 2024-06-27T23:08:50.778Z

Caught rejection: TypeError: Cannot set properties of undefined (setting 'active')

Origin: [object Promise]

TypeError: Cannot set properties of undefined (setting 'active') at C:\Users\Toby\AppData\Local\Programs\fsg-mod-assistant\resources\app.asar\lib\modCheckLib.js:1690:36 at async saveGameManager.getInfo (C:\Users\Toby\AppData\Local\Programs\fsg-mod-assistant\resources\app.asar\lib\modCheckLib.js:1634:3)rejection Timestamp : 2024-06-27T23:09:22.427Z

Caught rejection: TypeError: Cannot set properties of undefined (setting 'active')

Origin: [object Promise]

TypeError: Cannot set properties of undefined (setting 'active') at C:\Users\Toby\AppData\Local\Programs\fsg-mod-assistant\resources\app.asar\lib\modCheckLib.js:1690:36 at async saveGameManager.getInfo (C:\Users\Toby\AppData\Local\Programs\fsg-mod-assistant\resources\app.asar\lib\modCheckLib.js:1634:3)

jtsage commented 1 week ago

Gross. I'll take a look at this later tonight or sometime this weekend

GrimGadget commented 1 week ago

I just took another look at mine, though. I had two folders named savegame1 - Backup A and savegame1 - Backup B where I created manual backups of my main game after what I considered to be key events.

I deleted those two folders and the problem has gone away.

You still might want to put in a safety net of some sort, though.

jtsage commented 1 week ago

Just curious - like, those folders were a copy of an existing backup folder? or one of the individual saves copied over? (I do like to explicitly recreate so I can find exactly where my logic bug is)

GrimGadget commented 1 week ago

Just curious - like, those folders were a copy of an existing backup folder? or one of the individual saves copied over? (I do like to explicitly recreate so I can find exactly where my logic bug is)

I copied the save to a new folder, then renamed it from savegame1 - (Copy) to savegame1 - Backup A

At the time I was receiving this error, I had actually erased all the content from these backup folders because I had decided to abandon the savegame and start over with a different map.

jtsage commented 1 week ago

ah, so they were empty folders at the time - thank you - that gives me several varieties to test so I can kill this bug off for good. Appreciate the feedback!