Viewing Issue Advanced Details
ID Category [?] Severity [?] Reproducibility Date Submitted Last Update
02043 Crash/Freeze Critical (emulator) Always Jul 25, 2008, 05:40 Jul 31, 2008, 08:57
Tester FrizzleFried View Status Public Platform MAME (Official Binary)
Assigned To Resolution Fixed OS Windows XP/Vista 32-bit
Status [?] Resolved Driver
Version 0.126u2 Fixed in Version 0.126u3 Build Athlon
Fixed in Git Commit Github Pull Request #
Summary 02043: All games in cps2.c: All Parent Sets for CPS2 Games Abort
Description Every CPS2 game I've tried loads with black screen for a couple seconds then aborts to the front end/command prompt. Clones don't appear to be affected.

Games I've tried:

Xmen vs SF
Xmen: Children of the Atom
Both Dungeons & Dragons games
1944
Street Fighter Alpha (all of them)
Marvel vs Capcom
Steps To Reproduce Simply attempt to run a parent CPS2 ROM.
Additional Information Here are a few backtraces - they all seem to indicate sound problem causing the crash (as Mamesick mentions). I was able to crash a clone of SFA (sfar1) as well, so it might not be specifically a parent issue.

- 1944
Program received signal SIGSEGV, Segmentation fault.
0x77f87eeb in ?? ()
(gdb) bt full
#0 0x77f87eeb in ?? ()
No symbol table info available.
#1 0x7800efdf in fcloseall () from C:\WINNT\system32\msvcrt.dll
No symbol table info available.
#2 0x0120fe57 in qsound_update (param=0xa03a720, inputs=0x0,
    buffer=0x7bdce00, length=481) at src/emu/sound/qsound.c:365
        chip = (struct qsound_info *) 0xa03a720
        i = 16
        j = 4656612
        rvol = 445948416
        lvol = 29
        count = 2292600
        pC = (struct QSOUND_CHANNEL *) 0xa03aaa8
        datap = {0x7bddce0, 0x7be02a8}
Backtrace stopped: frame did not save the PC

- sfa
Program received signal SIGSEGV, Segmentation fault.
0x77f87eeb in ?? ()
(gdb) bt full
#0 0x77f87eeb in ?? ()
No symbol table info available.
#1 0x7800efdf in fcloseall () from C:\WINNT\system32\msvcrt.dll
No symbol table info available.
#2 0x0120fe57 in qsound_update (param=0x983a838, inputs=0x0,
    buffer=0x983adf8, length=481) at src/emu/sound/qsound.c:365
        chip = (struct qsound_info *) 0x983a838
        i = 16
        j = 4656612
        rvol = -1965839360
        lvol = 7159
        count = 2292600
        pC = (struct QSOUND_CHANNEL *) 0x983abc0
        datap = {0x7bdb828, 0x7bdddf0}
Backtrace stopped: frame did not save the PC

- sfar1
Program received signal SIGSEGV, Segmentation fault.
0x77f87eeb in ?? ()
(gdb) bt full
#0 0x77f87eeb in ?? ()
No symbol table info available.
#1 0x7800efdf in fcloseall () from C:\WINNT\system32\msvcrt.dll
No symbol table info available.
#2 0x0120fe57 in qsound_update (param=0x7bddc00, inputs=0x0,
    buffer=0x983a948, length=481) at src/emu/sound/qsound.c:365
        chip = (struct qsound_info *) 0x7bddc00
        i = 16
        j = 4656612
        rvol = -1965839360
        lvol = 7159
        count = 2292600
        pC = (struct QSOUND_CHANNEL *) 0x7bddf88
        datap = {0x7bdedf8, 0x7be13c0}
Backtrace stopped: frame did not save the PC
Github Commit
Flags
Regression Version 0.126u1
Affected Sets / Systems All games in cps2.c
Attached Files
? file icon fix.diff (1,282 bytes) Jul 25, 2008, 06:27
[Show Content]
? file icon qsound.diff (350 bytes) Jul 27, 2008, 20:49
[Show Content]
Relationships
There are no relationship linked to this issue.
Notes
14
User avatar
No.01783
Mamesick
Senior Tester
Jul 25, 2008, 06:28
Confirmed. Something has been broken in qsound.c
I attached a temporary fix, maybe who broke it has a better one.
User avatar
No.01787
Fujix
Administrator
Jul 25, 2008, 07:50
My 0.126u2 doesn't have the problem. hmm.
User avatar
No.01789
john_iv
Senior Tester
Jul 25, 2008, 08:22
Non-repro also in MameUI64 .126.2.
User avatar
No.01790
etabeta
Developer
Jul 25, 2008, 09:00
edited on: Jul 25, 2008, 09:03
not confirmed on my SDLMAME 126u2 (with u1 OSD layer), but it seems Tafoid was able to reproduce it

http://www.mameworld.info/ubbthreads/showthreaded.php?Cat=&Number=158687
User avatar
No.01792
Mamesick
Senior Tester
Jul 25, 2008, 13:44
Yes, it looks like it's a random thing... I tested SFA and sometimes it crashes after the game info screen, sometimes it boots perfectly.
User avatar
No.01794
FrizzleFried
Tester
Jul 25, 2008, 14:28
To be 100% clear, NONE of the titles I have tried the parent roms of have made it to the title screen. They all start to load (black screen) then they abort back to either the front end or the command line. When I try their clones, they work fine.
User avatar
No.01795
Tafoid
Administrator
Jul 25, 2008, 14:36
edited on: Jul 25, 2008, 15:00
I'm building a symbols build in hopes of getting some backtraces for these crashes. Mamesick listed a DIFF that you could try, FrizzleFried - but that might not be the official fix.

EDIT: Set to acknowledged. This is a straight/normal build (not Athlon optimized as I've used before) - but I'm still on an Athlon. I noted OP has Athlon as well - is there a possible relation? Does Mamesick have an Athlon? I'd assume the majority of testers have pentium....
User avatar
No.01796
Mamesick
Senior Tester
Jul 25, 2008, 15:23
I'm on a P4 3.00 GHz and I experienced the crashes.
User avatar
No.01804
mahlemiut
Developer
Jul 25, 2008, 22:19
ddsom and sfar1 crash for me, but the others mentioned work fine. CPU is an AthlonXP 3000+.
User avatar
No.01824
Tafoid
Administrator
Jul 27, 2008, 16:42
There is enough evidence here to label this a confirmed bug.
As to why or why not people are experiencing it and some are not - It will be sorted out soon enough :)
User avatar
No.01827
Firewave
Senior Tester
Jul 27, 2008, 19:40
edited on: Jul 27, 2008, 20:49
This is an issue with uninitialized memory (my first guess - but I found the memset...). It's an not so obvious issue. Look at this in qsound_start():

memset(chip, 0, sizeof(chip));

It does initialized the whole structure with the size of a pointer. It should be the same argument as the auto_malloc() call, which is actually the structure itself -> "sizeof(*chip)".

I attached another diff to this report.
User avatar
No.01836
aaron
Developer
Jul 29, 2008, 01:39
Good catch. I checked this in. Can someone confirm this is the real fix?
User avatar
No.01837
FrizzleFried
Tester
Jul 29, 2008, 05:50
edited on: Jul 29, 2008, 05:50
I can confirm that gsound.diff above fixes the issue I reported. I tested 1944 and both Dungeons & Dragons games with success. Thank you!
User avatar
No.01856
aaron
Developer
Jul 31, 2008, 08:57
Fixed by Firewave