Closed ghost closed 3 years ago
Is this new?
Whoops, never mind, I can repro this in other games (Wipeout for example).
I'll track down and fix this later today.
Hm never mind I tricked myself, my savestate was just at the start so I thought I had the same symptom :/
Can you upload the save state?
-[Unknown]
Can you upload the save state?
-[Unknown]
What is this?
This save state is corrupt as we saw in #14564, but the corruption is different.
However, this one is more concerning looking. I'm hoping #14692 may have helped this too, but I'm pretty worried that it won't.
In this one, we have:
I'm now worried we have a bug where MEASURE and WRITE don't consistently return the same sizes. It really seems like we generated corrupt data and ZSTD had no problems on its end in this save state.
-[Unknown]
Also, I see the warning just fine. Is HideStateWarnings = True
in ppsspp.ini?
-[Unknown]
This can be close now.
Okay - haven't seen any save states fail to save or not show warnings? I'll close then. Really hope those changes helped.
-[Unknown]
I can reproduce this again why 🤔
Can you attach the save state? You didn't get an error when creating it, right?
-[Unknown]
Can you attach the save state? You didn't get an error when creating it, right?
-[Unknown]
Unfortunately I deleted the savestates with that issue I will try again to reproduce this issue.
Mhhh, while I totally gotta admit I don't really get all the logic behind the save state I wonder:
Here we resize the vector if is smaller: https://github.com/hrydgard/ppsspp/blob/d31eddf417934c9106311d77a66bca8515862b5b/Core/SaveState.cpp#L95-L96
That vector can be either this static one:
https://github.com/hrydgard/ppsspp/blob/d31eddf417934c9106311d77a66bca8515862b5b/Core/SaveState.cpp#L121
or one of this two (note that: typedef std::vector<u8> StateBuffer;
) that are class member:
https://github.com/hrydgard/ppsspp/blob/d31eddf417934c9106311d77a66bca8515862b5b/Core/SaveState.cpp#L244
Now the compress code loop over the vector size: https://github.com/hrydgard/ppsspp/blob/d31eddf417934c9106311d77a66bca8515862b5b/Core/SaveState.cpp#L179
So I wonder if the savestate size is smaller than the previous one does this work? Not sure if this is of any concern, but better ask ig :)
That code is only related to the rewind save states kept in RAM. That's not used for save states persisted to disk at all.
The compression code is just to deduplicate so it doesn't use insane amounts of RAM. It's true that it could probably be improved, but I just wanted it to be fast. See #5129.
Anyway, this issue is about save state files, which are handled here: https://github.com/hrydgard/ppsspp/blob/d31eddf417934c9106311d77a66bca8515862b5b/Core/SaveState.cpp#L913
That in turn calls the serialization code: https://github.com/hrydgard/ppsspp/blob/d31eddf417934c9106311d77a66bca8515862b5b/Common/Serialize/Serializer.h#L198
Which is where all the buffer and compression handling for file based save states is: https://github.com/hrydgard/ppsspp/blob/d31eddf417934c9106311d77a66bca8515862b5b/Common/Serialize/Serializer.cpp#L351
Ultimately, they both use the same mechanics, but the rewind code is bypassing all the file handling in the serializer since it wants to keep everything in RAM. Disk IO would make the perf impact of rewind much worse.
-[Unknown]
Cannot reproduce this again anymore 🤔 Tried to abuse savestate and then load state for playing for an hours and no issue. Closing.
This video tell the issues. Screenrecorder-2021-07-28-11-33-19-421.zip logs-2021-07-28-11-34-27.zip
Redmi Note 9 ppsspp v1.11.3-975