libretro / beetle-ngp-libretro

Standalone port of Mednafen NGP to the libretro API, itself a fork of Neopop.
GNU General Public License v2.0
11 stars 44 forks source link

core crashes; reproducible; stack trace included #23

Closed AlexFolland closed 4 years ago

AlexFolland commented 7 years ago

To cause this crash, I played the story mode of The Last Blade - Beyond the Destiny (Europe) until I defeated Shinnosuke Kagami using Yuki. After I defeat him, the game crashes. @fr500 told me to reproduce it with Dr. MinGW installed so I could get a stack trace easily. I did so. Here it is.

http://lex.clansfx.co.uk/dump/9c0db489f237f1e4fb2bd7ed3022dc6d/000001D2.txt

retroarch_debug-lex.exe caused an Unknown [0xC0000374] Exception at location 00000000771EF3E2 in module ntdll.dll.

AddrPC           Params
00000000771EF3E2 0000000000000002 FFFFFFFE00000023 FFFFFFFDFFFFFFFF  ntdll.dll!RtlReportCriticalFailure
00000000771EF9C6 000000000022F888 000000000DF29D70 000000000022FB30  ntdll.dll!RtlpReportHeapFailure
00000000771F0592 0000000005CF0000 0000000000000000 0000000000000000  ntdll.dll!RtlpHeapHandleError
00000000771F2204 0000000012786AF0 0000000005CF0000 0000000012786AE0  ntdll.dll!RtlpLogHeapFailure
00000000771C1246 000000000022FB30 0000000012786AF0 000000000DFEBE00  ntdll.dll! ?? ::FNODOBFM::`string'
000007FEFD224362 0000000000008000 000000000022FB30 000000000022F640  msvcrt.dll!realloc
000000000DF29DB0 0000000000000018 0000000000000018 0000000005CF0298  mednafen_ngp_libretro.dll!smem_write  [C://msys64//home//buildbot//buildbot//windows_x64//libretro-beetle_ngp/mednafen/state.cpp @ 50]
000000000DF2A13C 000000000DFEBF86 0000000000000000 0000000000000100  mednafen_ngp_libretro.dll!MDFNSS_StateAction  [C://msys64//home//buildbot//buildbot//windows_x64//libretro-beetle_ngp/mednafen/state.cpp @ 216]
000000000DF2A6E6 000000000DFEB6F5 000000000E01F945 8000000000000001  mednafen_ngp_libretro.dll!MDFNSS_StateAction  [C://msys64//home//buildbot//buildbot//windows_x64//libretro-beetle_ngp/mednafen/state.cpp @ 452]
000000000DF22C97 000000001139E560 00000098000000A0 000001010000001D  mednafen_ngp_libretro.dll!FLASH_StateAction  [C://msys64//home//buildbot//buildbot//windows_x64//libretro-beetle_ngp/mednafen/ngp/flash.cpp @ 311]
000000000DF2BB04 0000000000000000 0000000000000254 00000000008824A0  mednafen_ngp_libretro.dll!StateAction  [C://msys64//home//buildbot//buildbot//windows_x64//libretro-beetle_ngp/libretro.cpp @ 233]
000000000DF2A5D9 0000030000000000 0000030000000000 0000000000000000  mednafen_ngp_libretro.dll!MDFNSS_SaveSM  [C://msys64//home//buildbot//buildbot//windows_x64//libretro-beetle_ngp/mednafen/state.cpp @ 470]
000000000DF2CA96 0000000000000000 0000000000000000 000000000022FC33  mednafen_ngp_libretro.dll!retro_serialize  [C://msys64//home//buildbot//buildbot//windows_x64//libretro-beetle_ngp/libretro.cpp @ 789]
000000000043BE47 000000000022FC00 0000000000000780 0000000000000000  retroarch_debug-lex.exe!state_manager_check_rewind  [G:/tools/retroarch/source/managers/state_manager.c @ 763]
   761:          serial_info.size = rewind_state.size;
   762: 
>  763:          core_serialize(&serial_info);
   764: 
   765:          state_manager_push_do(rewind_state.state);
00000000004128EA 0000000000000000 00000000008675A8 000000000022FD48  retroarch_debug-lex.exe! ??   [G:/tools/retroarch/source/runloop.c @ 983]
   981:    {
   982:       char s[128];
>  983:       unsigned t = 0;
   984: 
   985:       s[0] = '\0';
00000000004135C6 0000000000000001 0000000000000000 0000000000000000  retroarch_debug-lex.exe!runloop_iterate  [G:/tools/retroarch/source/runloop.c @ 1102]
  1100:       if (is_locked_fps)
  1101:          runloop_frame_time_last = 0;
> 1102: 
  1103:       runloop_frame_time.callback(delta);
  1104:    }
00000000004016C0 0000000005CF6720 000000000000000B 0000000005484184  retroarch_debug-lex.exe! ??   [G:/tools/retroarch/source/frontend/frontend.c @ 130]
   128:    {
   129:       unsigned sleep_ms = 0;
>  130:       int           ret = runloop_iterate(&sleep_ms);
   131: 
   132:       if (ret == 1 && sleep_ms > 0)
00000000006A7AA8 0000000000000003 000000000000000B 00000000011483D0  retroarch_debug-lex.exe!main_getcmdline
00000000004013F8 0000000000000000 0000000000000000 0000000000000000  retroarch_debug-lex.exe!__tmainCRTStartup  [C:/repo/mingw-w64-crt-git/src/mingw-w64/mingw-w64-crt/crt/crtexe.c @ 334]
00000000004014EB 0000000000000000 0000000000000000 0000000000000000  retroarch_debug-lex.exe!WinMainCRTStartup  [C:/repo/mingw-w64-crt-git/src/mingw-w64/mingw-w64-crt/crt/crtexe.c @ 184]
0000000076F259CD 0000000000000000 0000000000000000 0000000000000000  kernel32.dll!BaseThreadInitThunk
000000007715A561 0000000000000000 0000000000000000 0000000000000000  ntdll.dll!RtlUserThreadStart
cmcginty commented 6 years ago

I have hunch this was the same bug as #22.

core_serialize calls retro_serialize, which is where the other bug was.

https://github.com/libretro/RetroArch/blob/709c7de40fdcab0d968d454e6aa2c2614bd5799e/core_impl.c#L318-L323

stellarporter commented 5 years ago

This is a runahead bug fixed in the frontend? Or the core still has this crash problem?

inactive123 commented 4 years ago

Since this issue is over three years old, closing this. If somebody can confirm it happens again, they can either reopen this or open a new issue.