
Ok, so before I start explaining here is a link to my drop box... In this link is all my surrent save games, a single Wind Waker state and some screen shots... https://www.dropbox.com/sh/1s9fyvnmsub6g..._hH3a?dl=0
Here is a link to another support thread I made regarding saves, not sure if this should have been appended to that one but I have a feeling this is related but different, either way here it is for anyones reading pleasure. https://forums.dolphin-emu.org/Thread-al...-corrupted
OK! so, I have had another corrupted memory card error within wind waker. (screenshot in dropbox link) This time dolphin did not overwrite all of the saves I had in the GCI folder, this is good, it did overwrite just one, Waverace BlueStorm. THIS time, the reason I am assuming it's different than last time is because I have a state saved at a point just before dolphin corrupts this file. Last time I had not saved or loaded states in some time. This time though, I had. Here is my hypothesis... I play zelda, save to GCI files and save a state in slots 1, 2, 3 and 4. This is what I ALWAYS do for every game that I play to lower the probability of losing a save. This is not because of the last issue I just do this and have since I first used dolphin back in the old days. I then go and play waverace and some other games. My understanding of how dolphin handles saves is it loads the GCI files in some arbitrary order. It may not be arbitrary but I don't actually know. Waverace or another game like I-Ninja creates a new save files and thus changes the number of files to be loaded or perhaps their order itself. I then load the state so my 3 year old can just pick up where he left off and then sure as flies on dog poop this error occurs. If you were to start with a clean save folder and copy all my saves to it and then load the included state you WILL see that now WW will save properly but will incorrectly save INTO the waverace file. It's insane u can actually see the yellow test in WW save right into the waverace file. I would bet you dollars to donuts if you have a different number of saves from different games and load the state it would have chosen a different save file to save into. Strangely, I-Ninja was the last game I played and saved into and also made a fresh save for before loading WW. How exactly does dolphin decide to order save files when u initialize the emulation? When I load the save file and save without loading the state then blamo, no issue and it saves to the zelda save file just as expected. So, I am thinking WW and probable more games don't actually check the file header to find their own save before attempting to save into whatever ordered number that it detected the save to be in when it was either first booted and NOT when it actually goes to save. So my guess is that dolphin is ordering the GCI saves not in a consistent way and the dumb system the game uses to detect what file it should save into is confused and tries to load the wrong save into memory and thus detects it as corrupted when it's not actually for that game at all!
Another question is, why are some files now renamed as .deleted? These files are from F-zero and I-ninja, a couple others and after removing the *.deleted they work properly like nothing had ever happened. If a games deletes a save file from the GCI folder does dolphin keep it instead of deleting it? Or is this the game WW itself doing this to the file?
There is also a screen shot of after the corruption and how dolphin decides not to load a save file because the header matches another file. I just included it for no real reason. I have reproduced this scenario now and as far as I can tell it IS reproducible. My only real concern here and why I have done so much testing is the fact that Dolphin 5.0 is right round the corner and who knows if someone else might end up having this issue later on too. I don't know if this issue is just part of using GCI folders or if this is some sort of regression, I doubt that it is a regression. This is more likely just a VERY non standard use case and I am probably just the first one to care enough to do any real testing on it.
Either way, thanks again for all you guys do! I am very thankful to every one of the devs, I cant put it into words. Keep it up!
Here is a link to another support thread I made regarding saves, not sure if this should have been appended to that one but I have a feeling this is related but different, either way here it is for anyones reading pleasure. https://forums.dolphin-emu.org/Thread-al...-corrupted
OK! so, I have had another corrupted memory card error within wind waker. (screenshot in dropbox link) This time dolphin did not overwrite all of the saves I had in the GCI folder, this is good, it did overwrite just one, Waverace BlueStorm. THIS time, the reason I am assuming it's different than last time is because I have a state saved at a point just before dolphin corrupts this file. Last time I had not saved or loaded states in some time. This time though, I had. Here is my hypothesis... I play zelda, save to GCI files and save a state in slots 1, 2, 3 and 4. This is what I ALWAYS do for every game that I play to lower the probability of losing a save. This is not because of the last issue I just do this and have since I first used dolphin back in the old days. I then go and play waverace and some other games. My understanding of how dolphin handles saves is it loads the GCI files in some arbitrary order. It may not be arbitrary but I don't actually know. Waverace or another game like I-Ninja creates a new save files and thus changes the number of files to be loaded or perhaps their order itself. I then load the state so my 3 year old can just pick up where he left off and then sure as flies on dog poop this error occurs. If you were to start with a clean save folder and copy all my saves to it and then load the included state you WILL see that now WW will save properly but will incorrectly save INTO the waverace file. It's insane u can actually see the yellow test in WW save right into the waverace file. I would bet you dollars to donuts if you have a different number of saves from different games and load the state it would have chosen a different save file to save into. Strangely, I-Ninja was the last game I played and saved into and also made a fresh save for before loading WW. How exactly does dolphin decide to order save files when u initialize the emulation? When I load the save file and save without loading the state then blamo, no issue and it saves to the zelda save file just as expected. So, I am thinking WW and probable more games don't actually check the file header to find their own save before attempting to save into whatever ordered number that it detected the save to be in when it was either first booted and NOT when it actually goes to save. So my guess is that dolphin is ordering the GCI saves not in a consistent way and the dumb system the game uses to detect what file it should save into is confused and tries to load the wrong save into memory and thus detects it as corrupted when it's not actually for that game at all!

Another question is, why are some files now renamed as .deleted? These files are from F-zero and I-ninja, a couple others and after removing the *.deleted they work properly like nothing had ever happened. If a games deletes a save file from the GCI folder does dolphin keep it instead of deleting it? Or is this the game WW itself doing this to the file?

There is also a screen shot of after the corruption and how dolphin decides not to load a save file because the header matches another file. I just included it for no real reason. I have reproduced this scenario now and as far as I can tell it IS reproducible. My only real concern here and why I have done so much testing is the fact that Dolphin 5.0 is right round the corner and who knows if someone else might end up having this issue later on too. I don't know if this issue is just part of using GCI folders or if this is some sort of regression, I doubt that it is a regression. This is more likely just a VERY non standard use case and I am probably just the first one to care enough to do any real testing on it.

Either way, thanks again for all you guys do! I am very thankful to every one of the devs, I cant put it into words. Keep it up!
