(Codr and Bond697 are going to kill me for saying this.)
You could try to see if Pokesav DP properly edits your save. I saved and it didn't crash. But depending on your cart it might make the save not load.
Also, be sure you're using Wood R4 if you're not.
e: pokegen is properly editing the save. it gets stuck when it tries to.. repair the save after making changes.
that's a save state, not a saved game. i saved game would end in .dsv or .sav. also, either you're not using english pearl or the state is broken, because pokegen can't identify it. this is also not a pokegen bug.
what version of desmume are you using?
I just want to know why this is happening and a way to fix it. Once again this is only happening to every thing Pearl and Diamond version I have tried so far and no other Pokemon version.
i honestly don't know. it could be that the firmware/software on your flash card has an issue with patching dp to work. try this:
start a new game in desmume. play up to the point the game would crash. save your game in desmume. export the save as a .sav file from desmume and run it on your r4. play for a minute or whatever and then save again. see if pokegen works at that point.
why not? you have an r4. dump the saves.
For me, It's HeartGold that doesn't work
For those using desmume,
Try troubleshooting with the following steps:.
1. Save twice in game (at the pokedex /Pokemon/items menu )
2. Soft reset (press L+R+START+SELECT Or Ctrl R)
3. Don't enter "Continue"
4. Emulator menu, export battery file/save file.
Om-nom-nom - Wailord
If someone's using Desmume, there is literally nothing extra that needs to be done once you save in-game...