Skip to content
This repository has been archived by the owner on Sep 11, 2023. It is now read-only.

Crash when loading previous 'auto saved' state #70

Closed
mhughson opened this issue Nov 27, 2021 · 10 comments
Closed

Crash when loading previous 'auto saved' state #70

mhughson opened this issue Nov 27, 2021 · 10 comments

Comments

@mhughson
Copy link

I'm not sure what it's called, but when you open up Mesen without loading a ROM you are presented with a grid screenshots of the last games played. When you click on one it is supposed to load that ROM.

In Mesen-X it crashes shortly after clicking any game. I've tried a few different games, all with the same issue.

Here's a video. Note that the video ends at the moment Mesen crashes.

Mesen.2021-11-26.21-23-09.mp4
@mhughson mhughson changed the title Crash on when loading previous 'auto saved' state Crash when loading previous 'auto saved' state Nov 27, 2021
@NovaSquirrel
Copy link
Owner

NovaSquirrel commented Nov 27, 2021

I think this has to do with making a savestate in another Mesen version and trying to load it in this one - I know the last official Mesen-S does this when attempting to load the savestates from my Mesen-S fork. It works fine for me if I play and close the emulator and then click on the corresponding state.

@ghost
Copy link

ghost commented Dec 11, 2021

Hi! I can confirm that when making entirely new savestate, closing and reloading the emulator then it still crashes. Even when I change configuration folders and all, admittedly I only came to learn recently of your forks so I did try Mesen versions before. I'll report with more if something else happens.

I'm using the latest Mono 6.12 on Debian Bullseye.

@ghost
Copy link

ghost commented Dec 11, 2021

Followup: I can confirm, after compiling Mesen-X and Mesen-SX on my machine. The latter was able to get states working so far but Mesen-X had an issue with them. I was able to: Create new savestates and load them inside while the program was being ran
I wasn't able to: Create new savestates, close the emulator, turn it back on, load them again as it would segfault immediately (the application that is), choosing savestates through the file loader was also useless as it segfault'd as well.

This seems to be a bug due to an incompatibility be it with the recent Mono or a more recent glibc.

@RokkumanX
Copy link

THANK GOD!

I'm not alone with this issue, I can't make any new save states with the recent version of Mesen.

If I play for a while and make a save state, reloading will always work during both the Mesen session (or if I restart Mesen) and the current Windows session.

If I were to restart Windows ALL save states made during last session will crash.

HOWEVER, I don't know when save states went kaputt but older save states doesn't suffer from this issue, meaning a couple of save states I had from months back loads and saves just fine with the current commit build.

This makes me really sad because I just went clean slate with my gaming computer and the first thing I were to find out was the save states not working as they should.

@RokkumanX
Copy link

I've tested older builds from my fork going back to October 27th and the issue persists.

Make a save state and it will work the entire Windows session until you restart Windows and bam bam bam crash loading a save state made from the last previous session.

Been a loooong while since I had issues with Mesen but not be able to use save states reliably and not have the application crash all the time is pretty serious criteria to me.

Off-topic:

I'm burned out in real life, home sick from work because of it and I literally got no energy left to do anything more than the basic.
If I was healthy I could spend more time testing builds out but for now I have to revert to puNES to get my Famicom and NES needs.

Being burned out is not a lame excuse, it's a serious condition and since this is my 4th time in my life no one can tell what will happen.

@mkwong98
Copy link

I have traced it down to SSGAudio.h and emu2149.h. It seems the pointer voltbl in struct __PSG is not handled correctly in save state. It is pointing to a static array so it works within the same session because the address doesn't change. But in a new session, the old address will not work and causes a crash. The correct handling should be saving the volume mode and call PSG_setVolumeMode when loading state.

@mkwong98
Copy link

#73

@RokkumanX
Copy link

THANK YOU!!!!

@RokkumanX
Copy link

It works just as good as it did before the crashes started, no problem what so ever!

This issue can from my part safely be closed.

Thank you very much yet again!

@ghost
Copy link

ghost commented Dec 23, 2021

I'll agree. The issue seems to now be a non-issue from my part on Linux too. I loaded old savestates and they worked and I made a bit more progress in one game and close the emulator in order to test out new ones and it seems to still work too. I don't have problems on my end really!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants