TeddyHuang-00 / BalatroSaveEditor

This is a helper for managing saves of Balatro, including merging and editing
MIT License
5 stars 2 forks source link

Crash on load of exported & imported save #1

Open jskrzypek opened 6 months ago

jskrzypek commented 6 months ago

On Mac OSX 14.2.1 & python 3.11, I'm getting this crash message:

Screenshot 2024-03-12 at 19 11 16

Here are the commands I ran:

BalatroSaveEditor on  main
[I] ➜ python3 main.py e "/Users/jskrzypek/Library/Application Support/Balatro/1/save.jkr" -o "/Users/jskrzypek/balatro/exported-clean.json"
Exported data saved to /Users/jskrzypek/balatro/exported-clean.json

BalatroSaveEditor on  main
[I] ➜ python3 main.py i "/Users/jskrzypek/balatro/exported-clean.json" -o "/Users/jskrzypek/Library/Application Support/Balatro/1/save.jkr" 
Imported data saved to /Users/jskrzypek/Library/Application Support/Balatro/1/save.jkr

Inspecting the exported-clean.json file, it looks fine.

TeddyHuang-00 commented 6 months ago

Noted. I was looking into the problem. It seems that there was format misalignment in profile.jkr and save.jkr. I will fix this ASAP.

TeddyHuang-00 commented 6 months ago

Yeah I found where the issue is. Expect to fix this in hours

TeddyHuang-00 commented 6 months ago

Hi, would you like to try again with the latest commit? It passed on my tests and I want to see if this solves the problem. I am sorry that your save file might be lost in such a case as I have to migrate to a safer way to encode the key types, which in short means that the old exported json file will not be usable.

jskrzypek commented 6 months ago

Yep, that fixed it!

jskrzypek commented 6 months ago

Actually I take it back something is still wonky.. I loaded my save and it ended my run immediately, even though it didn't crash...

jskrzypek commented 6 months ago

It works for me with my lua PR btw

TeddyHuang-00 commented 6 months ago

I loaded my save and it ended my run immediately, even though it didn't crash...

I guess this should not happen at all... Did you checked the shasum of the re-imported file to see if it is the same? I suppose with everything exactly the same as the original, there's no reason that the run should end...

jskrzypek commented 6 months ago

Hmm good question, I didn't compare the shasum of those two. I'll see if I can check that

On Wed, Mar 13, 2024, 10:57 Nan Huang @.***> wrote:

I loaded my save and it ended my run immediately, even though it didn't crash...

I guess this should not happen at all... Did you checked the shasum of the re-imported file to see if it is the same? I suppose with everything exactly the same as the original, there's no reason that the run should end...

— Reply to this email directly, view it on GitHub https://github.com/TeddyHuang-00/BalatroSaveEditor/issues/1#issuecomment-1994594570, or unsubscribe https://github.com/notifications/unsubscribe-auth/AALROMKHWVIA2EMUQ7DQZXTYYBSNVAVCNFSM6AAAAABETEC6BKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSOJUGU4TINJXGA . You are receiving this because you authored the thread.Message ID: @.***>