Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

File is wiped upon export #13

Open
ghost opened this issue Feb 2, 2024 · 13 comments
Open

File is wiped upon export #13

ghost opened this issue Feb 2, 2024 · 13 comments
Assignees
Labels
bug Something isn't working

Comments

@ghost
Copy link

ghost commented Feb 2, 2024

Steps to reproduce

  1. Upload Pokémon White 2.dsv save file using google chrome at pkmds.app on an android phone

  2. Make any edit

  3. Hit save on your edits

  4. Export save file

  5. Move the save file to the correct location

  6. Try running the game via emulator

  7. Save file is wiped empty

@codemonkey85 codemonkey85 self-assigned this Feb 13, 2024
@codemonkey85
Copy link
Owner

Thanks for the report. Would you mind sharing your 'Pokémon White 2.dsv' save file so I can test with it?

@ghost
Copy link
Author

ghost commented Feb 18, 2024

Unfortunately I don't think I have it anymore, honestly didn't expect a reply, but I did supply my exact steps to replicate the problem, the save file must have been reset to be an empty one.

I moved it to replace the old save file, so the original was lost, and the new save started off with "New Game" at the top, and continue wasn't an option so I knew my progress had been lost.

Edit: If I find it, how would you like me to send it to you?

@codemonkey85
Copy link
Owner

Edit: If I find it, how would you like me to send it to you?

You should be able to attach it to a comment in this thread.

@codemonkey85 codemonkey85 added the bug Something isn't working label Feb 19, 2024
@ghost
Copy link
Author

ghost commented Feb 20, 2024

I couldn't find it so I recreated the error with a new file, when attempting to open it with PKHeX it says it's unsupported

Edit: However, github doesn't support .dsv file attachments so I'll attach it as a zip instead

@ghost
Copy link
Author

ghost commented Feb 20, 2024

White_2.zip

After checking a hex viewer, it seems like it's full of FF for some reason except for the DeSmuME file footer which looks like this

image

@codemonkey85
Copy link
Owner

Thank you for sharing. I will look into this.

@ghost
Copy link
Author

ghost commented Mar 6, 2024

Any updates?

@codemonkey85
Copy link
Owner

Not yet. This is a hobby project, finding time to work on it is challenging.

@ghost
Copy link
Author

ghost commented Mar 13, 2024

Okay! Thanks regardless!

@codemonkey85
Copy link
Owner

@Luna-Karch I started looking into this today. The save file you shared with me - is it the corrupted file? Can you share the original file you tried to load into PKMDS? That's the one I need to debug this issue.

@ghost
Copy link
Author

ghost commented Mar 17, 2024

The one I shared to you is the corrupted one yes. I would have to recreate the white 2.dsv file but I was able to reproduce the issue multiple times with any generic white 2.dsv

@arleypadua
Copy link

I faced the same issue while developing a cross platform CLI

It turns out that PKHeX.Core doesn't know the format of the file unless you specifically tell it what the file name is (including the file extension)

So, whenever it loads up a Desmume save, it will strip out the Desmume specific footer.

Without the footer, it is a totally valid save file, but invalid for Desmume

When Desmume sees a save without the footer, it will wipe out the whole save adding the footer back.

I solved it by passing down the file path when loading the file:

https://github.com/arleypadua/PKHeX.CLI/blob/ee9d7ddbb9b681b1cd295b312cb72f4a67c89c6e/src/PKHeX.Facade/Game.cs#L27

@anjeronett
Copy link

Issue also occurs on Platinum.
I did some more testing and the exported save file is completely incapable of writing new saves. It wipes after each reset.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants