Viewing Issue Advanced Details
ID Category [?] Severity [?] Reproducibility Date Submitted Last Update
01999 Crash/Freeze Critical (emulator) Always Jul 11, 2008, 09:19 Jan 2, 2015, 13:40
Tester Firewave View Status Public Platform MAME (Self-compiled)
Assigned To aaron Resolution Fixed OS
Status [?] Resolved Driver vegas.cpp
Version 0.126 Fixed in Version 0.126u3 Build Debug
Fixed in Git Commit Github Pull Request #
Summary 01999: sf2049, sf2049se: fatal error when loading a save state
Description When loading a save state the games report this error:

Attempted to malloc zero bytes (src/emu/state.c:746)
--- memory leak warning ---
allocation #006922, 72 bytes (src/osd/windows/winfile.c:77)
allocation #006920, 584 bytes (src/lib/util/corefile.c:116)
allocation #006919, 256 bytes (src/lib/util/astring.c:127)
allocation #006917, 288 bytes (src/emu/fileio.c:224)
allocation #006735, 256 bytes (src/lib/util/astring.c:127)
a total of 1456 bytes were not free()'d
Steps To Reproduce
Additional Information
Github Commit
Regression Version 0.126
Affected Sets / Systems sf2049, sf2049se
Attached Files
There are no relationship linked to this issue.
User avatar
Jul 12, 2008, 23:10
edited on: Jul 12, 2008, 23:11
I tried a regular save state on 32-bit .. I had to make it during the initialization period while the screen is black as it crashes on my machine a bit in wiih:
Exception at EIP=00635876: INTEGER DIVIDE BY ZERO
EAX=00000000 EBX=0326B368 ECX=00000000 EDX=00000000
ESI=00000000 EDI=00000000 EBP=0022F678 ESP=0022F660

Anyway, with set sf2049, I made a manual save a few seconds after booting just before the emulation crashes for me .. restarted and loaded the -STATE 1 successfully - crashing shortly thereafter with the crash above. So, in 32-bit, it seems to work here - the game doesn't though :)

I've never run this before - so I'm not sure if the crash always happens or not. It is labeled not working..
User avatar
Senior Tester
Jul 13, 2008, 00:03
The crash happens for me as well without loading/saving a save state at all and leaving it running for a while. I didn't report this, because I assumed that crash has been there for a long time and is not actually a bug as the set is flagged GAME_NOT_WORKING. The savestate issue on the other hand is a regression from 0.125u9, so I reported it.

Maybe test it with "-autosave -str 2" to create/load the savestate like my regtest run does.
User avatar
Jul 13, 2008, 00:14
I just tried that: "mame sf2049 -autosave -str 2" .. first time to create and the next time to load and I don't get any of the memory leak issues you show above on this 32-bit machine/build. Might be 64-bit specific?
User avatar
Senior Tester
Jul 13, 2008, 00:45
The important thing is the fatalerror. I pasted the memory leaks just for completion. They leaks usually happen when a fatalerror occurs, because MAME just exists and doesn't properly clean up and can be ignored.
User avatar
Senior Tester
Aug 9, 2008, 11:57
The fatalerror is gone in 0.126u3.