libretro / beetle-psx-libretro

Standalone port/fork of Mednafen PSX to the Libretro API.
GNU General Public License v2.0
311 stars 131 forks source link

Fast Forward freezes core when frontend frameskip is enabled #841

Open howard445 opened 2 years ago

howard445 commented 2 years ago

I don't know what changed but when I updated from 1.9.14 to 1.10.1 the fast forward function in this core just crashes everything I don't know if I have a setting wrong but its looks identical to my installation of 1.9.14 and that one's fast forward still runs fine with this core. ive tried and tried to get this working and nothing is working

howard445 commented 2 years ago

I would have gone asking for help on the forum page but I'm not going to wait to have to post so many times that ridiculous to just get some troubleshooting so I guess I'm not asking for help but this is a bug

ghost commented 2 years ago

Came here to report the same exact thing. Fast Forward is broken with this core.

I'm on Linux but I doubt it's platform-specific.

Ryunam commented 2 years ago

I've just tested this on a Windows system and it seems everything is working fine on my end. I can fast-forward anything without encountering any crash so far, using the software renderer with Vulkan video driver, dynarec options enabled and Runahead on.

Can you please clarify which video driver in RA and which core renderer (hardware or software) you are using?

ghost commented 2 years ago

@Ryunam I'm using the hardware vulkan renderer not software, on beetle PSX HW core, beetle interpreter not dynarec.

ds22x commented 2 years ago

FWIW, just tried with Beetle PSX HW with the Vulkan renderer on Windows 10, and it doesn't crash on my end.

jiraz01 commented 2 years ago

I also have this problem, so I went back to version 1.9.14. Premise: I update Retroarch not through installation but by downloading the build in folders and copying the files.

jibarofoss commented 2 years ago

I also have this issue. It seems to only happen on the Vulkan renderer, (I switched to OpenGL and it stopped happening). I tried generating a log, but since FF-ing just causes RetroArch to hang, no errors are recorded. I downgraded from Retroarch 1.10.3 to 10.10.0 and that seemed to solve the issue. The issue appears to have been introduced on 1.10.2, since I upgraded to that version and there's where it seems to have started. I'm on Linux btw.

jibarofoss commented 2 years ago

Here's my (not very useful) log: retroarch.log

bsdf commented 2 years ago

same issue here: HW on linux with vulkan renderer. though it's not much, here's what's logged when the issue occurs:

[libretro INFO] Creating render pass.
[libretro INFO] Creating render pass.

game is running, then fast forward enabled:

[libretro INFO] Creating render pass.
[libretro INFO] Creating render pass.
[libretro INFO] Creating graphics pipeline.
[libretro INFO] Creating compute pipeline.
[libretro INFO] Creating compute pipeline.
[libretro INFO] Creating render pass.
[libretro INFO] Creating render pass.
[libretro INFO] Creating graphics pipeline.

and retroarch is frozen.

full log here

edit and here's a backtrace when i ctrl+c in gdb:

#0  0x00007ffff3c3c397 in ioctl () at ../sysdeps/unix/syscall-template.S:120
#1  0x00007ffff766e5c8 in drmIoctl () at /usr/lib/x86_64-linux-gnu/libdrm.so.2
#2  0x00007ffff767265a in drmSyncobjTimelineWait () at /usr/lib/x86_64-linux-gnu/libdrm.so.2
#3  0x00007fffbba079f4 in  () at /usr/lib/x86_64-linux-gnu/libvulkan_intel.so
#4  0x00007fffbba058de in  () at /usr/lib/x86_64-linux-gnu/libvulkan_intel.so
#5  0x00007fffbba037b8 in  () at /usr/lib/x86_64-linux-gnu/libvulkan_intel.so
#6  0x00007fffbba040da in  () at /usr/lib/x86_64-linux-gnu/libvulkan_intel.so
#7  0x00007fffbba076fa in  () at /usr/lib/x86_64-linux-gnu/libvulkan_intel.so
#8  0x00007fffcacf52a9 in Vulkan::Device::submit_queue(Vulkan::CommandBuffer::Type, VkFence_T**, unsigned int, Util::IntrusivePtr<Vulkan::SemaphoreHolder>*) ()
    at /home/bsdf/.config/retroarch/cores/mednafen_psx_hw_libretro.so
#9  0x00007fffcacf7318 in Vulkan::Device::flush_frame_nolock() () at /home/bsdf/.config/retroarch/cores/mednafen_psx_hw_libretro.so
#10 0x00007fffcad43362 in rsx_vulkan_finalize_frame(void const*, unsigned int, unsigned int, unsigned int) ()
    at /home/bsdf/.config/retroarch/cores/mednafen_psx_hw_libretro.so
#11 0x00007fffcac95702 in rsx_intf_finalize_frame(void const*, unsigned int, unsigned int, unsigned int) (fb=0x0, width=280, height=0, pitch=2800)
    at rsx/rsx_intf.cpp:353
#12 0x00007fffcac8ae37 in retro_run() () at libretro.cpp:4832
#13 0x00005555555efa35 in core_run ()
#14 0x00005555555f1e75 in runloop_iterate ()
#15 0x00005555555e67bd in rarch_main ()
#16 0x00007ffff3b6f7fd in __libc_start_main (main=
    0x5555555d8de0 <main>, argc=4, argv=0x7fffffffdf48, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffdf38)
    at ../csu/libc-start.c:332
#17 0x00005555555d90ea in _start ()
Ryunam commented 2 years ago

This seems to be an issue not with the core itself, but rather with some update implemented in the RA frontend that is triggering the crash.

I don’t have a Linux system readily available right now that I could test this on, but I suggest to do a bisect on the RA repository between versions 1.10.0 and 1.10.3 and see if you can spot the commit that introduced this bug. It definitely appears to be Linux-specific so far, since it’s not happening on a Windows system as far as we can tell.

bsdf commented 2 years ago

bisected to https://github.com/libretro/RetroArch/commit/84f558db0b445845e4d5b16e4c1a6e7a160b84eb and indeed setting Settings > Frame Throttle > Fast-Forward Frameskip to false fixes the issue.

Sanaki commented 2 years ago

I recommend updating the issue title to reflect the above information, such as: Fast Forward freezes core when frontend frameskip is enabled