FromDarkHell / BL3SaveEditor

A desktop based save and profile editor for Borderlands 3
GNU General Public License v3.0
227 stars 44 forks source link

Lost access to a file? #23

Open Daliness opened 2 years ago

Daliness commented 2 years ago

Hi, I've been playing around with the BL3 Save Editor, and run into something similar to #20 (regarding the Index being out of range). What bothers me is that I can't even get back into it to access the file to fix the issue I caused, and was wondering if there was ANY WAY besides a nonexistent backup to fix the file.

For reference, here is the Debug info and a copy of the file giving me problems. Please convert the .txt to a .sav, since Github doesn't allow me to link it directly: Save Game Version: 2 Package version: 516 Engine version: 4.20.3.2150113183 Build ID: OAK-PATCHWIN640-293 Custom Format Version: 3 Custom Format Data Count: 59 Save Game Type: OakSaveGame Failed to load save (C:\Users\tjone\Documents\My Games\Borderlands 3\Saved\SaveGames\76561198082434027\44.sav) :: Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: startIndex at System.ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument argument, ExceptionResource resource) at System.BitConverter.ToInt32(Byte[] value, Int32 startIndex) at IOTools.IOWrapper.ReadInt32() in J:\Coding Projecties\BL3SaveEditor\IOTools\IOWrapper.cs:line 399 at BL3Tools.BL3Tools.LoadFileFromDisk(String filePath, Platform platform, Boolean bBackup) in J:\Coding Projecties\BL3SaveEditor\BL3Tools\BL3Tools.cs:line 63 at BL3SaveEditor.MainWindow.OpenSave(String filePath, Platform platform) in J:\Coding Projecties\BL3SaveEditor\BL3SaveEditor\MainWindow.xaml.cs:line 337 44.sav.txt

Thanks for your time.

FromDarkHell commented 2 years ago

No, there's no way to uncorrupt the file.

Pretty much, the save file you've given isn't really even a BL3 save file (as in, it doesn't have anything really BL3 specific, it's just things like engine version/etc). It's crashing because it reads in the "header" (where it says "this is a BL3 save file, here's the engine version/etc"), then it expects more data but it's already hit the end of the file and so it crashes when trying to read in more data than the file even has.

Nicolas-GE commented 2 years ago

this is really late but the only way left to save your file, since you haven't backed it up before editing it, is through the steam cloud

https://store.steampowered.com/account/remotestorageapp/?appid=397540