melonDS icon indicating copy to clipboard operation
melonDS copied to clipboard

Game crashes when saving in pokemon white

Open AbsenceFlintIvy opened this issue 4 years ago • 34 comments

Screenshot from 2020-09-03 19-34-37

AbsenceFlintIvy avatar Sep 04 '20 00:09 AbsenceFlintIvy

this bug is already known and a bit of a specter. Weren't eable to reproduce and/or pin it down by much, because it seems to occur after a long playtime and seemingly at random.

For reference this is what we already know:

  • it's probably wifi related, because disabling the C-Gear allegedly prevents it from happening. Also there's a very similar bug happening in the Underground in Pokemon Diamond/Perl/Platinum, where wifi is enabled as well. Also the console is spammed with rx buffer overflow messages (in both cases).
  • the ARM7 state seems to be corrupted in some way, but not completely. 1. the wifi rx buffer is full. 2. the time is displayed wrong (as in the screenshot), 3. the game freezes once some specific (likely wifi related) thing is requested from the ARM7. In one savestate we received the game was still playable (including the touchscreen still working), but every action involving wifi (which includes saving in Pokemon Black/White), results in a freeze.

Welp!

RSDuck avatar Sep 04 '20 01:09 RSDuck

this bug is due to wifi power saving not being properly implemented, which can lead to the ARM7 getting into an infinite loop.

RSDuck avatar Sep 17 '20 13:09 RSDuck

this can still happen

RSDuck avatar Sep 17 '20 15:09 RSDuck

big oof

AbsenceFlintIvy avatar Sep 18 '20 15:09 AbsenceFlintIvy

Is there any workaround or temporary fix for this issue?

Priestyle avatar Mar 03 '21 05:03 Priestyle

as already said, not enabling C-Gear should prevent this issue from happening

RSDuck avatar Mar 03 '21 05:03 RSDuck

Hey, thanks for the response. I just want to report that the gen 5 Pokemon games crash A LOT earlier on versions 9.1 and above. When I use the c-gear on 0.8.3 for multiplayer stuff (survey, entralink, etc.), it crashes maybe after 15 ~ 20 minutes as opposed to 9.1 & up crashing as early as 1 ~ 2 minutes (including freezing during saving).

Priestyle avatar Mar 03 '21 11:03 Priestyle

Been playing Pokémon Black and when I get to the Ferris wheel in Nimbasa City the screen goes black. Music plays but I can’t do anything. Wait for about 20 minutes and still no loading. It seems like this “cut scene” is vital to move forward so any help would be appreciated.

bhsmith90 avatar Jul 05 '21 14:07 bhsmith90

I can reproduce this with the error (wifi: RX buffer full) on Ubuntu with 0.9.2.

If it helps the developers I can provide a save state in which the bug has occurred.

orlp avatar Jul 05 '21 21:07 orlp

The cgear freezes too when i try to turn it off

Icywastaken avatar Apr 22 '22 04:04 Icywastaken

what version of melonDS where you using when the freeze was first happening?

RSDuck avatar Apr 22 '22 13:04 RSDuck

(Using 0.9.3) So this issue happened to me too however I was playing Blaze Black 2 Redux. I hadn't saved properly since before the first gym and beat the 2nd gym now with a bunch of save states up leading up to that point. My most recent states result in the exact same issue as what's shown at the beginning of this thread. Attempting to turn off the C-Gear also freezes the game. I found a state that doesn't seem to have a corrupted date and time on the save screen, however when attempting to save it gives me this. save state issue Turning off the C-Gear in this state does work, however it still results in the same error when trying to save. Unlike with the newest state, this one is also VERY prone to crashing MelonDS entirely. Even while writing this comment it crashed twice and after a while it actually just began to refuse to load the state and ends up crashing instantly when I try to.

Fallen-Feces avatar May 06 '22 23:05 Fallen-Feces

Is it known whether or not this issue was fixed in 0.9.4? Would love to be able to use C-Gear boosts in gen 5 again.

Fallen-Feces avatar May 10 '22 23:05 Fallen-Feces

It is fixed in 0.9.4.

nadiaholmquist avatar May 10 '22 23:05 nadiaholmquist

* should be, if it still happens please notify me.

RSDuck avatar May 10 '22 23:05 RSDuck

currently playing black 2 and am experiencing the same issue during the force save at pokestar studios in which the game freezes. i’ve been using save states instead of saving in-game but i have another save state from the first few minutes of the game that does let me save. i can’t manually turn off the c-gear or it’ll freeze as well, but i tried a cheat that turns the c-gear off but alas i still couldn’t save. any idea how to fix this?

mpurdie26 avatar Jul 01 '22 02:07 mpurdie26

did you ran into the issue with 0.9.3 or 0.9.4?

RSDuck avatar Jul 01 '22 02:07 RSDuck

i believe 0.9.4, i’m playing through delta with their melon core

mpurdie26 avatar Jul 01 '22 02:07 mpurdie26

definitely 0.9.4 and i'm still encountering this issue

mpurdie26 avatar Jul 20 '22 19:07 mpurdie26

can you give me a savestate where this issue is present?

RSDuck avatar Jul 20 '22 20:07 RSDuck

neither savestates nor save files are supported file types on Github, according to the message when I try uploading them. i've restarted the game, as well as tried other roms for Black 2, but the issue still arises once the game tries to make me force save

mpurdie26 avatar Jul 20 '22 21:07 mpurdie26

Put it in a zip file or rename it, then you should be able to post it.

nadiaholmquist avatar Jul 20 '22 21:07 nadiaholmquist

D0445296-1F08-4EB0-8074-35D785F2A906.zip lol thank you so much for your patience i'm not the most experienced with emulators and such

mpurdie26 avatar Jul 20 '22 21:07 mpurdie26

based on the state of https://github.com/rileytestut/melonDS and information in the savestate you provided the melonDS version the delta melonDS core or however it is called uses is 0.9.1.

RSDuck avatar Jul 20 '22 21:07 RSDuck

oh wow okay, thank you both for your help. the new savestate seems to let me save in-game, so i appreciate the assistance. i'll open this issue with Delta as opposed to MelonDS if this problem arises in the future -- my apologizes for assuming i had the correct version

mpurdie26 avatar Jul 20 '22 21:07 mpurdie26

From here on out, never turn on the C-Gear in the game until their melonDS port is updated.

nadiaholmquist avatar Jul 20 '22 21:07 nadiaholmquist

D0445296-1F08-4EB0-8074-35D785F2A906.fixed.zip

Try this

What exactly did you do to fix this bugged savestate? I'm currently facing similar issues as described above, namely (i) game freeze upon saving in-game, (ii) game freeze upon attempting to switch off c-gear, and most urgently (iii) black screen upon accepting Skyla's request to join her on her plane towards Lentimas town. From what i have read, all of these seem to be related to the c-gear interface? If possible, I'd like to see the black screen issue resolved since this is the issue limitting my current play through the most. Is there such an answer?

-Currently playing on the Android app store beta melonds 1.7.0 PS. which according to the app description uses melonds 0.9.3. -Can provide devs with playable savestates just before the issue occurs.

AaronPenders avatar Aug 01 '22 03:08 AaronPenders

yes this is the same issue. Nadia has put together a tool for fixing savestates: https://gist.github.com/nadiaholmquist/a90e5810ddb27544a9eb967e4448636c

Note that if you enable the C gear again, the freeze can also happen again.

RSDuck avatar Aug 01 '22 10:08 RSDuck

yes this is the same issue. Nadia has put together a tool for fixing savestates: https://gist.github.com/nadiaholmquist/a90e5810ddb27544a9eb967e4448636c

Note that if you enable the C gear again, the freeze can also happen again.

@RSDuck @nadiaholmquist Alright, I had to install a GCC compiler to compile the c-code Nadia so nicely wrote. I am not so keen on C programming as you'll see. However, my issue has not been resolved as for now. MelonDS says "Fails to load state" whenever i attempt to load the "fixed" gamestate. The following outlines my steps:

In the command window:

  1. "gcc fix-pokemon-state.c" to create an executable file "a.exe"
  2. Rename my save state from "pkmn black 2 new.ml1" to "tobefixed.m1" (I know, the rom I have was named that way)
  3. Compile "a tobefixed.m1" to produces a new file "tobefixed.m1.fixed" with a slightly changed filesize from 6878kb to 6904kb
  4. Rename "tobefixed.m1.fixed" to "pkmn black 2 new.ml1" to have melonDS recognize the save state (otherwise it doesn't).
  5. Attempt to load the new .ml1 file in melonDS -- to no result: "Fails to load state"

If you want to have a go, I'll leave my original unfixed save state here: pkmn black 2 new.zip

Thanks for your answers!

AaronPenders avatar Aug 02 '22 08:08 AaronPenders