bug report: save state problems under linux with svn 4115

Found a bug? Please report it, but remember to follow the bug reporting guidelines.
Missing a sane feature? Let us know!
But please do NOT request ports to other systems.

Moderator: ZSNES Mods

Post Reply
someguy
New Member
Posts: 5
Joined: Tue Dec 19, 2006 2:17 pm

bug report: save state problems under linux with svn 4115

Post by someguy »

The save state feature does not work correctly. Specifically, it cannot load any other save state except save state 0. It can save other states but it will not load them. If you look in ~/.zsnes you will see the save states. If you rename the states such that they have a .zst extension then they will load - as save state 0. I have reproduced this problem on 2 systems. The first is a PIII 550 with 512M of RAM, running Slackware 10.2 with kernel version 2.6.13. The second is a AMD64 3500+ with 2G of RAM, running Novell SUSE 10.1 64bit with kernel 2.6.16.21-0.25-default.

The 1.42 version does not have the problem on the Slackware system. I cannot build version 1.42 on the SUSE system due, I believe, to the glibc issue mentioned elsewhere on the forum.
Nach
ZSNES Developer
ZSNES Developer
Posts: 3904
Joined: Tue Jul 27, 2004 10:54 pm
Location: Solar powered park bench
Contact:

Post by Nach »

Any details on a particular game?
I can't recreate this.
May 9 2007 - NSRT 3.4, now with lots of hashing and even more accurate information! Go download it.
_____________
Insane Coding
someguy
New Member
Posts: 5
Joined: Tue Dec 19, 2006 2:17 pm

Post by someguy »

I happens with any ROM I use. The problem happens consistently on both systems with svn 4115, but doesn't happen with version 1.42. If you can't recreate it on your system, is there anything you can think of I should try on mine? I checked file/directory permissions, etc. before I posted but if you have any ideas I'll try them.
Nach
ZSNES Developer
ZSNES Developer
Posts: 3904
Joined: Tue Jul 27, 2004 10:54 pm
Location: Solar powered park bench
Contact:

Post by Nach »

I'd make clean, rerun configure with --enable-debug, make again, then check the filename status output to see what's going on.
May 9 2007 - NSRT 3.4, now with lots of hashing and even more accurate information! Go download it.
_____________
Insane Coding
someguy
New Member
Posts: 5
Joined: Tue Dec 19, 2006 2:17 pm

Post by someguy »

Nach wrote:I'd make clean, rerun configure with --enable-debug, make again, then check the filename status output to see what's going on.
OK.

I couldn't build revision 4115 with --enable-debug. When I tried I got this:

Code: Select all

nasm  -w-orphan-labels -D__UNIXSDL__ -f elf -DELF -D__OPENGL__ -DDEBUG -g -F stabs -s -O0 -o gui/gui.o gui/gui.asm
gui/guiwindp.inc:1783: error: short jump is out of range
make: *** [gui/gui.o] Error 1
I got the same problem with revision 4117. Fortunately, I still had a copy of 4067 which had also given me the problem I reported. I ran configure --enable-debug with it and it worked. I deleted my ~/.zsnes directory to make sure everything was clean. I then ran zsnesd straight from the build src directory and captured the output with tee. I ran it twice creating 2 separate logs. log1.txt shows the initial execution of zsnesd and shows me opening MARIO.SMC and saving a save state to slot 9 (MARIO.zs9), and then exiting. log2.txt shows the second execution of zsnesd and shows me load MARIO.SMC. It then shows me try to load the save state for slot 0 (MARIO.zst) five separate times. The thing is, I actually tried to load slot 9 five separate times. zsnesd told me each time "UNABLE TO LOAD STATE 9". It looks like it was unable to load because it was looking for MARIO.zst which didn't exist.

This happens for me every time on both systems. It's very consistent. Any ideas?


Here are the actual logs, if you want to see.

log1.txt:

Code: Select all

fopen_dir_rb: /home/gamer/.zsnes/data.cmb
fopen_dir_r: /home/gamer/.zsnes/zfont.txt
fopen_dir_w: /home/gamer/.zsnes/zfont.txt
ZStartPath: /home/gamer/zsnes.4067/src/
ZCfgPath: /home/gamer/.zsnes/
ZRomPath: /home/gamer/zsnes.4067/src/
ZSramPath: /home/gamer/.zsnes/
ZSnapPath: /home/gamer/.zsnes/
ZSpcPath: /home/gamer/.zsnes/
ZSNES vPre 1.43, (c) 1997-2006, ZSNES Team
Be sure to check http://www.zsnes.com/ for the latest version.

ZSNES is written by the ZSNES Team (See AUTHORS.TXT)
ZSNES comes with ABSOLUTELY NO WARRANTY.  This is free software,
and you are welcome to redistribute it under certain conditions;
please read 'LICENSE.TXT' thoroughly before doing so.

Use ZSNES -? for command line definitions.

This is a work in progress build. It contains code which
May or may not be complete
Starting Mouse detection.
access_dir_fr: /dev/input/event3
access_dir_fr: /dev/input/event0
access_dir_fr: /dev/input/event1
access_dir_fr: /dev/input/event2
ManyMouse: 1 mice detected.
Device 0 Logitech Logitech RumblePad 2 USB
  4 axis, 12 buttons, 1 hats, 0 balls
stat_dir: /home/gamer/zsnes.4067/src/cpu
stat_dir: /home/gamer/zsnes.4067/src/dos
stat_dir: /home/gamer/zsnes.4067/src/gui
stat_dir: /home/gamer/zsnes.4067/src/jma
stat_dir: /home/gamer/zsnes.4067/src/net

[snip]

stat_dir: /home/gamer/bin
stat_dir: /home/gamer/Documents
stat_dir: /home/gamer/zsnes.4115
stat_dir: /home/gamer/dev
stat_dir: /home/gamer/roms
stat_dir: /home/gamer/zsnes.4117
stat_dir: /home/gamer/zsnes.4067
stat_dir: /home/gamer/roms/MARIO.SMC
access_dir_fr: /home/gamer/roms/MARIO.SMC
ZRomPath: /home/gamer/roms/
ZCartName: MARIO.SMC
ZStateName: MARIO.zst
stat_dir: /home/gamer/roms/MARIO.SMC
fopen_dir_rb: /home/gamer/roms/MARIO.SMC
fopen_dir_rb: /home/gamer/.zsnes/MARIO.srm
fopen_dir_rb: /home/gamer/.zsnes/MARIO.cmb
fopen_dir_rb: /home/gamer/.zsnes/MARIO.ips
fopen_dir_rb: /home/gamer/roms/MARIO.ips
fopen_dir_w: /home/gamer/.zsnes/rominfo.txt
fopen_dir_wb: /home/gamer/.zsnes/MARIO.srm
fopen_dir_wb: /home/gamer/.zsnes/MARIO.srm
fopen_dir_wb: /home/gamer/.zsnes/MARIO.zs9 <--- writes correct file
fopen_dir_wb: /home/gamer/.zsnes/MARIO.srm
fopen_dir_wb: /home/gamer/.zsnes/MARIO.srm
fopen_dir_wb: /home/gamer/.zsnes/MARIO.srm
See how it wrote /home/gamer/.zsnes/MARIO.zs9 for slot 9. So far so good.

log2.txt:

Code: Select all

fopen_dir_rb: /home/gamer/.zsnes/data.cmb
fopen_dir_r: /home/gamer/.zsnes/zfont.txt
ZStartPath: /home/gamer/zsnes.4067/src/
ZCfgPath: /home/gamer/.zsnes/
ZRomPath: /home/gamer/roms/
ZSramPath: /home/gamer/.zsnes/
ZSnapPath: /home/gamer/.zsnes/
ZSpcPath: /home/gamer/.zsnes/
ZSNES vPre 1.43, (c) 1997-2006, ZSNES Team
Be sure to check http://www.zsnes.com/ for the latest version.

ZSNES is written by the ZSNES Team (See AUTHORS.TXT)
ZSNES comes with ABSOLUTELY NO WARRANTY.  This is free software,
and you are welcome to redistribute it under certain conditions;
please read 'LICENSE.TXT' thoroughly before doing so.

Use ZSNES -? for command line definitions.

This is a work in progress build. It contains code which
May or may not be complete
Starting Mouse detection.
access_dir_fr: /dev/input/event3
access_dir_fr: /dev/input/event0
access_dir_fr: /dev/input/event1
access_dir_fr: /dev/input/event2
ManyMouse: 1 mice detected.
Device 0 Logitech Logitech RumblePad 2 USB
  4 axis, 12 buttons, 1 hats, 0 balls
stat_dir: /home/gamer/roms/MARIO.SMC
access_dir_fr: /home/gamer/roms/MARIO.SMC
ZRomPath: /home/gamer/roms/
ZCartName: MARIO.SMC
ZStateName: MARIO.zst
stat_dir: /home/gamer/roms/MARIO.SMC
fopen_dir_rb: /home/gamer/roms/MARIO.SMC
fopen_dir_rb: /home/gamer/.zsnes/MARIO.srm
fopen_dir_rb: /home/gamer/.zsnes/MARIO.cmb
fopen_dir_rb: /home/gamer/.zsnes/MARIO.ips
fopen_dir_rb: /home/gamer/roms/MARIO.ips
fopen_dir_w: /home/gamer/.zsnes/rominfo.txt
fopen_dir_wb: /home/gamer/.zsnes/MARIO.srm
fopen_dir_wb: /home/gamer/.zsnes/MARIO.srm
fopen_dir_rb: /home/gamer/.zsnes/MARIO.zst <--- reads wrong file
fopen_dir_wb: /home/gamer/.zsnes/MARIO.srm
fopen_dir_rb: /home/gamer/.zsnes/MARIO.zst <--- reads wrong file
fopen_dir_wb: /home/gamer/.zsnes/MARIO.srm
fopen_dir_rb: /home/gamer/.zsnes/MARIO.zst <--- reads wrong file
fopen_dir_wb: /home/gamer/.zsnes/MARIO.srm
fopen_dir_rb: /home/gamer/.zsnes/MARIO.zst <--- reads wrong file
fopen_dir_wb: /home/gamer/.zsnes/MARIO.srm
fopen_dir_rb: /home/gamer/.zsnes/MARIO.zst <--- reads wrong file
fopen_dir_wb: /home/gamer/.zsnes/MARIO.srm
fopen_dir_wb: /home/gamer/.zsnes/MARIO.srm
fopen_dir_wb: /home/gamer/.zsnes/MARIO.srm
See how it tried to open /home/gamer/.zsnes/MARIO.zst for slot 9. It couldn't open slot 9 because it was trying to open the wrong file.
Nach
ZSNES Developer
ZSNES Developer
Posts: 3904
Joined: Tue Jul 27, 2004 10:54 pm
Location: Solar powered park bench
Contact:

Post by Nach »

Okay I see there is a problem, thanks for the report.
In the mean time use F3 to pick a state and F4 to load it.

Edit:
r4119 should have it fixed.
May 9 2007 - NSRT 3.4, now with lots of hashing and even more accurate information! Go download it.
_____________
Insane Coding
AspiringSquire
Born to Rule... Impatiently
Posts: 265
Joined: Wed Nov 17, 2004 8:21 pm
Location: Everywhere I want to be.
Contact:

F4 Quick Key loads incorrect state

Post by AspiringSquire »

There seems to be a similar problem with saving states in the DOS port. In the latest revision, I can load states fine using Load State in the main GUI, but it doesn't work with the F4 quick key. I have save states in slots 4, 6, and 9, and regardless of whichever slot I select (including empty ones), ZSNES will load state 9 (the earliest one saved) and report the selected slot as being loaded (even empty ones).
[url=http://board.zsnes.com/phpBB2/viewtopic.php?t=3298][color=brown]My [u]NES palette[/u][/color][/url] - better colors with any emulator.

"the more you know, and the more you can do... the more you are."
- [url=http://www.danielbohman.com][color=brown][u]daniel bohman[/u][/color][/url]
Deathlike2
ZSNES Developer
ZSNES Developer
Posts: 6747
Joined: Tue Dec 28, 2004 6:47 am

Post by Deathlike2 »

AspiringSquire, if you are compiling with Zget, make sure to say yes to clean out the object files.

someguy, try to make clean before you compile. There seems to be a huge problem on your end.
Continuing [url=http://slickproductions.org/forum/index.php?board=13.0]FF4[/url] Research...
AspiringSquire
Born to Rule... Impatiently
Posts: 265
Joined: Wed Nov 17, 2004 8:21 pm
Location: Everywhere I want to be.
Contact:

Clean enough

Post by AspiringSquire »

Deathlike2 wrote:AspiringSquire, if you are compiling with Zget, make sure to say yes to clean out the object files.
I did tell it to clean.
[url=http://board.zsnes.com/phpBB2/viewtopic.php?t=3298][color=brown]My [u]NES palette[/u][/color][/url] - better colors with any emulator.

"the more you know, and the more you can do... the more you are."
- [url=http://www.danielbohman.com][color=brown][u]daniel bohman[/u][/color][/url]
Deathlike2
ZSNES Developer
ZSNES Developer
Posts: 6747
Joined: Tue Dec 28, 2004 6:47 am

Re: Clean enough

Post by Deathlike2 »

AspiringSquire wrote:
Deathlike2 wrote:AspiringSquire, if you are compiling with Zget, make sure to say yes to clean out the object files.
I did tell it to clean.
Hmmm

I did try to reproduce your situation... but I'm having trouble with it though. Give me some steps of what you are doing though. Also note what save options are enabled..... just in case.
Continuing [url=http://slickproductions.org/forum/index.php?board=13.0]FF4[/url] Research...
AspiringSquire
Born to Rule... Impatiently
Posts: 265
Joined: Wed Nov 17, 2004 8:21 pm
Location: Everywhere I want to be.
Contact:

Re: F4 Quick Key loads incorrect state in DOS

Post by AspiringSquire »

Deathlike2 wrote:Hmmm

I did try to reproduce your situation... but I'm having trouble with it though. Give me some steps of what you are doing though. Also note what save options are enabled..... just in case.
Both state 4 and state 9 existed prior to my testing this. I've tried selecting the slot via "Pick State" and via the F3 menu, with the same result when loading using F4. The save options that are enabled are: SRAM Check+Save, Start at Latest Save, and Load Save State w/SRAM (the game doesn't use SRAM, though). I guess I'll try to see if changing any of those makes a difference, and I'll try other games.
[url=http://board.zsnes.com/phpBB2/viewtopic.php?t=3298][color=brown]My [u]NES palette[/u][/color][/url] - better colors with any emulator.

"the more you know, and the more you can do... the more you are."
- [url=http://www.danielbohman.com][color=brown][u]daniel bohman[/u][/color][/url]
Deathlike2
ZSNES Developer
ZSNES Developer
Posts: 6747
Joined: Tue Dec 28, 2004 6:47 am

Post by Deathlike2 »

I think something is currently wonky at the moment. Could you briefly try this in the Windows port and see if it still happens? Also, please mention what OS you are using. I'm completely having issues with this.
Continuing [url=http://slickproductions.org/forum/index.php?board=13.0]FF4[/url] Research...
Deathlike2
ZSNES Developer
ZSNES Developer
Posts: 6747
Joined: Tue Dec 28, 2004 6:47 am

Post by Deathlike2 »

Ok, apparently this is triggered in 9x. Windows port under 9x doesn't have this issue.
Continuing [url=http://slickproductions.org/forum/index.php?board=13.0]FF4[/url] Research...
AspiringSquire
Born to Rule... Impatiently
Posts: 265
Joined: Wed Nov 17, 2004 8:21 pm
Location: Everywhere I want to be.
Contact:

Re: F4 Quick Key loads incorrect state in DOS

Post by AspiringSquire »

Deathlike2 wrote:Ok, apparently this is triggered in 9x.
I was compiling my post before I saw that you posted again. Probably not all of the information below is useful, but I don't feel like rewriting anything.

I'm running the DOS port in Win98SE. Just now, I compiled the Win port and briefly tested in WinXP; the issues don't apply.

Changing the save options appears to have no effect. The game I was testing initially was Rock N' Roll Racing, but Super Mario Kart had the same problems, except that without a state 9, it fails to load and says so, for whatever state# you selected. However, I have noted something else: choosing a slot via F3 then loading with Pick State doesn't work either; the only way to successfully load a state is by selecting with Pick State then using Load State in the menu.

Judging by Nach's last post above, this seems like it may be the opposite of what was happening before (quick keys working, Pick/Load in the menu not working), but that's just my perception.

Should I try using the debugger in DOS to see what it can gather, or do you have it covered now?
[url=http://board.zsnes.com/phpBB2/viewtopic.php?t=3298][color=brown]My [u]NES palette[/u][/color][/url] - better colors with any emulator.

"the more you know, and the more you can do... the more you are."
- [url=http://www.danielbohman.com][color=brown][u]daniel bohman[/u][/color][/url]
Deathlike2
ZSNES Developer
ZSNES Developer
Posts: 6747
Joined: Tue Dec 28, 2004 6:47 am

Post by Deathlike2 »

We're working on it right now.
Continuing [url=http://slickproductions.org/forum/index.php?board=13.0]FF4[/url] Research...
someguy
New Member
Posts: 5
Joined: Tue Dec 19, 2006 2:17 pm

Post by someguy »

Nach wrote:Okay I see there is a problem, thanks for the report.
In the mean time use F3 to pick a state and F4 to load it.

Edit:
r4119 should have it fixed.
OK, I just tested 4120 and the issue is gone for me. 4120 also seems to have fixed the issue I had with 4115 and 4117 in building zsnes with --enable-debug. Thanks for the fix!
Deathlike2
ZSNES Developer
ZSNES Developer
Posts: 6747
Joined: Tue Dec 28, 2004 6:47 am

Post by Deathlike2 »

AspiringSquire, it is fixed in r4121. This bug only manifests itself in the DOS port only because there was some missing code 8-bit F3 menu. This bug isn't 9x specific anyways. The 16-bit F3 menu code was never affected at all.
Continuing [url=http://slickproductions.org/forum/index.php?board=13.0]FF4[/url] Research...
Post Reply