Viewing Issue Advanced Details
ID Category [?] Severity [?] Reproducibility Date Submitted Last Update
02140 Save/Restore Minor Always Aug 21, 2008, 05:50 Oct 21, 2008, 22:57
Tester Lord Nightmare View Status Public Platform MAME (Self-compiled)
Assigned To Phil Bennett Resolution Fixed OS Windows XP/Vista 32-bit
Status [?] Resolved Driver
Version 0.127 Fixed in Version 0.128u1 Build Normal
Fixed in Git Commit Github Pull Request #
Summary 02140: cubeqst: cube quest crashes mame when saving state
Description cube quest crashes mame to prompt immediately when saving state
Steps To Reproduce mame cubeqst
hit shift-f7
press any number key
Additional Information
Program received signal SIGSEGV, Segmentation fault.
0x77c46fe2 in msvcrt!memcpy () from C:\WINDOWS\system32\msvcrt.dll
(gdb) bt full
#0  0x77c46fe2 in msvcrt!memcpy () from C:\WINDOWS\system32\msvcrt.dll
No symbol table info available.
#1  0x00a34cdd in state_save_save_continue () at src/emu/state.c:685
        entry = (ss_entry *) 0x8a60a30
        func = (ss_func *) 0x0
        count = 0
Backtrace stopped: frame did not save the PC
Github Commit
Flags
Regression Version
Affected Sets / Systems cubeqst
Attached Files
 
Relationships
There are no relationship linked to this issue.
Notes
10
User avatar
No.02152
Tafoid
Administrator
Aug 21, 2008, 08:29
I'm not sure, but doesn't the game expect there to be a video to play? If you have no CHD (you don't have the CHD yet.. correct?) it would have no idea where to leave off and probably cause an error expecting to save a location of video referenced from actual CHD data.. just guessing.

It does crash for me without a CHD - that I can confirm.
User avatar
No.02153
Robbbert
Senior Tester
Aug 21, 2008, 08:41
Looking at the game driver, save states don't appear to be supported yet.
User avatar
No.02155
Tafoid
Administrator
Aug 21, 2008, 08:57
Supported or not, under normal circumstances, attempting to save a game shouldn't cause a fatal error crash of MAME.
User avatar
No.02166
Phil Bennett
Developer
Aug 22, 2008, 09:41
edited on: Aug 22, 2008, 09:41
The state saving in the bit-sliced CPU cores is embarrassing; saving RAM pointers before you make the actual allocations isn't wise! A fix should make it into u1/u2.
User avatar
No.02169
Firewave
Senior Tester
Aug 22, 2008, 11:00
Missing save state support can cause anything. I am quite sure I will get at least a dozen crashes when I force state saving on each driver in a regtest.
IMO if a driver doesn't support savestates, it should not be possible at all to save or load them.
User avatar
No.02171
Robbbert
Senior Tester
Aug 22, 2008, 11:18
I'd agree with that last statement. The f-keys and command-line options should be ignored if the game doesn't support save states.
User avatar
No.02175
robiza
Developer
Aug 22, 2008, 16:05
i don't agree
partial savestate is useful
User avatar
No.02176
Firewave
Senior Tester
Aug 22, 2008, 16:08
Maybe for a developer, so maybe it should be only disabled in debug builds and show a warning (yellow or even red background) when using it to avoid invalid or bogus bug reports.
This might cause even more havoc and false reports, if people are using the "autosave" option with sets not supporting savestates properly.
User avatar
No.02181
etabeta
Developer
Aug 22, 2008, 17:38
edited on: Aug 22, 2008, 17:39
it's already written in the documentation that the option works only for games supporting saves

 -[no]autosave
  
When enabled, automatically creates a save state file when exiting
MAME and automatically attempts to reload it when later starting MAME
with the same game. This only works for games that have explicitly
enabled save state support in their driver. The default is OFF
(-noautosave).

and it's off by default. I see no reason to change the current behavior since:

1. there has been no bogus report until now due to autosave used in games not supporting it
2. change an useful option because users are lazy is wrong, imho

what can be reasonably done is to add a rule to Mametesters, stating save state reports are only accepted if a game supports save states (if devs agree this should be the rule)
User avatar
No.02186
Firewave
Senior Tester
Aug 22, 2008, 20:55
Oh sorry. I did remember I was forcing this option on each driver and not go by the listxml information, but I must have been modifiying the source back then. SOrry for the confusion.