Viewing Issue Advanced Details
ID Category [?] Severity [?] Reproducibility Date Submitted Last Update
01462 Save/Restore Critical (emulator) Always Mar 7, 2008, 10:15 Mar 17, 2008, 16:23
Tester Firewave View Status Public Platform MAME (Self-compiled)
Assigned To aaron Resolution Fixed OS Windows XP/Vista 64-bit
Status [?] Resolved Driver
Version 0.123u4 Fixed in Version 0.123u6 Build Debug
Fixed in Git Commit Github Pull Request #
Summary 01462: atarimo_render-based drivers: [debug] Crash when loading an autosave save state
Description Affected are:
atarisy2.c
batman.c
eprom.c
rampart.c

Here is the crash information:

-----------------------------------------------------
Exception at EIP=00482A29 (atarimo_render+0x0404): ACCESS VIOLATION
While attempting to read memory at 00000000
-----------------------------------------------------
EAX=00000000 EBX=1D0B1FFF ECX=00000000 EDX=00000000
ESI=00000000 EDI=00000000 EBP=0022FAE8 ESP=0022FA60
-----------------------------------------------------
Stack crawl:
exception-> 00482A29 (atarimo_render+0x0404)
  0022FB4C: 004840D5 (video_update_atarisy2+0x00f0)
  0022FB9C: 00D30BBA (video_screen_update_partial+0x0120)
  0022FBDC: 00483F18 (atarisy2_videoram_w+0x00ab)
  0022FC1C: 00D47C10 (program_write_word_16le+0x013f)
  0022FC5C: 01261948 (s2650_get_info+0x0e2b)
  0022FCAC: 012A5ACA
  0022FCBC: 00D5A89F (cpunum_execute+0x007d)
  0022FCEC: 00D7CA95 (cpuexec_timeslice+0x0223)
  0022FE1C: 00D2B444 (mame_execute+0x0284)
  0022FE7C: 00F5F1D3 (cli_execute+0x01e3)
  0022FEEC: 00CDB3BB (utf8_main+0x00ea)
  0022FF1C: 015A4909 (main+0x00e9)
  0022FF6C: 0040124B (__image_base__+0x124b)
  0022FFB4: 00401298 (mainCRTStartup+0x0018)
 
Steps To Reproduce
Additional Information
Github Commit
Flags Debug build specific
Regression Version 0.123u4
Affected Sets / Systems atarimo_render-based drivers
Attached Files
 
Relationships
related to 01511Resolved  batman: Fails to load autosave state 
Notes
5
User avatar
No.00060
Tafoid
Administrator
Mar 7, 2008, 20:40
I tried a self-build debug (with debugger) of 0.123u4 and was unable to get any crashes using -autosave on any of the games you listed. This might be a 64-bit issue, but it doesn't happen for me on 32-bit mainline. Can anyone else duplicate? Are you using fresh save states (made iwth 0.123u4) or ones from a prior version?
User avatar
No.00080
XulChris
Tester
Mar 10, 2008, 00:24
I tested 0.123u4 sdlmame 64bit on linux using save states and debugger and I was unable to reproduce this.
User avatar
No.00117
aaron
Developer
Mar 13, 2008, 21:19
No repro here, either. Can you name a specific game and provide a backtrace?
User avatar
No.00137
Firewave
Senior Tester
Mar 14, 2008, 03:59
I can reproduce it in 0.123u5. Run this twice:

mameud -window -nodebug -autosave eprom

And I get this information:

-----------------------------------------------------
Exception at EIP=00450A74 (atarimo_render+0x02e6): ACCESS VIOLATION
While attempting to read memory at FFFFFFFC
-----------------------------------------------------
EAX=FFFFFFFC EBX=00000000 ECX=00000003 EDX=00000000
ESI=F0E9517D EDI=00007C7F EBP=0022FB88 ESP=0022FB30
-----------------------------------------------------
Stack crawl:
exception-> 00450A74 (atarimo_render+0x02e6)
  0022FB8C: 004619AB (video_update_eprom+0x0055)
  0022FBFC: 009CF35F (video_screen_update_partial+0x012d)
  0022FC3C: 0044F72F (video_update_atarisy1+0x0a00)
  0022FC7C: 00A13608 (timer_set_global_time+0x016e)
  0022FCEC: 00A1B925 (cpuexec_timeslice+0x09c3)
  0022FE1C: 009C9614 (mame_execute+0x0284)
  0022FE7C: 00C00463 (cli_execute+0x01e3)
  0022FEEC: 0097950B (utf8_main+0x00ea)
  0022FF1C: 01246189 (main+0x00e9)
  0022FF6C: 0040124B (__image_base__+0x124b)
  0022FFB4: 00401298 (mainCRTStartup+0x0018)

and this backtrace:

Program received signal SIGSEGV, Segmentation fault.
0x00450a74 in atarimo_render (machine=0xad01f38, map=0, cliprect=0x22fc20,
    rectlist=0x22fbb4) at src/mame/video/atarimo.c:732
732 mo_render_object(machine, mo, *current, &bandcli
p);
(gdb) bt full
#0 0x00450a74 in atarimo_render (machine=0xad01f38, map=0,
    cliprect=0x22fc20, rectlist=0x22fbb4) at src/mame/video/atarimo.c:732
        current = (struct atarimo_entry **) 0xfffffffc
        last = (struct atarimo_entry **) 0x22c59fc
        link = 0
        step = -1
        first = (struct atarimo_entry **) 0xfffffffc
        bandclip = {min_x = 0, max_x = 335, min_y = 0, max_y = 7}
        mo = (struct atarimo_data *) 0x22c2c30
        startband = 0
        stopband = 7
        band = 0
        i = 2292768
        rect = (rectangle *) 0x1bfd1f80
#1 0x00450a74 in atarimo_render (machine=0xad41f84, map=301342688,
    cliprect=0x22fc20, rectlist=0xffef) at src/mame/video/atarimo.c:732
        current = (struct atarimo_entry **) 0x2
        last = (struct atarimo_entry **) 0x74e0
        link = 1485053364
        step = 4519682
        first = (struct atarimo_entry **) 0x26d797e
        bandclip = {min_x = 0, max_x = 2292728, min_y = 10674857,
  max_y = 181673860}
        mo = (struct atarimo_data *) 0x0
        startband = 2292728
        stopband = 10643956
        band = 181673860
        i = 10288601
        rect = (rectangle *) 0xad41fb0
Backtrace stopped: frame did not save the PC

It seems like "current" is messed up after you loaded the savestate.
User avatar
No.00191
couriersud
Developer
Mar 17, 2008, 00:40
Save states worked back in 0121.
After some analysis, the bug is related to mo->last_link. The logic how this is set and saved has not changed. Therefore we should look at the timing. Back in 0121 mo->last_link must have been reset to -1 after the state got loaded so that mo->activelast != NULL. This does not happen in 0123u5. Is the new implementation of MDRV_CPU_VBLANK_INT behaving like the old did with MDRV_CPU_VBLANK_INT(callback,1)?