PPSSPP core freezes when closing content

Does anybody have the same problem? I would appreciate if an android user would test this for confirmation. I tried several video settings, and almost every iso from different sources. i posted my log but there is nothing suspicious weirdly.

[RCHEEVOS]: checking bf619eac0cdf3f68d496ea9344137e8b [RCHEEVOS]: got game id 0 [RCHEEVOS]: no method for file extension, trying core supported extensions: elf|iso|cso|prx|pbp [RCHEEVOS]: testing Generic (plain content) [RCHEEVOS]: hash did not change, returning 0 [RCHEEVOS]: this game doesn’t feature achievements [RCHEEVOS]: Load task finished [GL]: VSync => on [EGL]: eglSwapInterval(1) Content ran for a total of: 00 hours, 00 minutes, 03 seconds. Saving runtime log file: /storage/emulated/0/RetroArch/playlists/logs/PPSSPP/0017 - Need for Speed - Underground Rivals (USA).lrtl [Overrides] configuration overrides unloaded, original configuration restored. No content, starting dummy core. arg #0: retroarch arg #1: --menu arg #2: -s arg #3: /storage/emulated/0/RetroArch/saves arg #4: -S arg #5: /storage/emulated/0/RetroArch/states arg #6: -c arg #7: /storage/emulated/0/Android/data/com.retroarch/files/retroarch.cfg arg #8: -L arg #9: /data/data/com.retroarch/cores/ppsspp_libretro_android.so [Cheats]: Save game-specific cheatfile: /storage/emulated/0/RetroArch/cheats/PPSSPP/0017 - Need for Speed - Underground Rivals (USA).cht Content ran for a total of: 00 hours, 00 minutes, 00 seconds. Unloading game… [G3D] Context destroy Pause: 0x7936906200

I have the same problem, but in Linux:

Steps to reproduce:

  1. Start retroarch
  2. Run a PPSSPP ROM (happens when using playlist or otherwise …)
  3. Bring up the Retroarch menu when the ROM is running.
  4. Select “Close Content”
  5. Observe a freeze.

OS: Kubuntu 19.10

$ retroarch --version
RetroArch: Frontend for libretro -- v1.8.3 -- 16f25c2 --
Compiler: GCC (9.2.1) 64-bit Built: Jan 10 2020

Core: PPSSPP
ROM: Multiple ROMS (LittleBigPlanet for example ..)

$retroarch --verbose
...
[libretro INFO] [SCEIO] stdout: ========================================================
[libretro INFO] [SCEIO] stdout:  SCREAM PSP  (c)2006 Sony Computer Entertainment America
[libretro INFO] [SCEIO] stdout:  v2.7.0, built Oct  9 2009 at 16:40:26
[libretro INFO] [SCEIO] stdout: ========================================================
[libretro INFO] [SCEIO] stdout:     Sound Tick Thread Priority: 27
[libretro INFO] [SCEIO] stdout: ========================================================
[libretro INFO] [SCEIO] stdout: 
[libretro INFO] [SCEKERNEL] sceKernelPrintf: snd_stream v1.10.2
[libretro INFO] [SCEKERNEL] sceKernelPrintf: , built Oct  1 2009 at 10:37:20
[libretro INFO] [SCEKERNEL] sceKernelPrintf: Compiled against Scream v2.7.0
[libretro INFO] [SCEKERNEL] 381=sceKernelCreateThread(08C14120 ss_service_thread_0, 08acd4b8, 00000011, 32768, 00000000, 00000000)
[libretro INFO] [SCEKERNEL] 0=sceKernelStartThread(381, 12, 09fff490)
[libretro INFO] [FRAMEBUF] Creating FBO for 04000000 : 480 x 272 x 0
[libretro WARN] [G3D] Memcpy fbo upload 04400000 -> 04000000
[libretro INFO] [HLE] scePowerSetClockFrequency(333,333,166)
I: GLQueueRunner.cpp:496: Creating 480 x 272 FBO using DEPTH24_STENCIL8 texture
[libretro INFO] [FRAMEBUF] Creating FBO for 04088000 : 480 x 272 x 3
I: GLQueueRunner.cpp:496: Creating 480 x 272 FBO using DEPTH24_STENCIL8 texture
[libretro INFO] [SCEKERNEL] 402=sceKernelCreateThread(08C4F374 ThreadedRenderer, 08acd4b8, 0000001d, 32768, 00004000, 00000000)
[libretro INFO] [SCEKERNEL] 0=sceKernelStartThread(402, 12, 09fff460)
[libretro INFO] [FRAMEBUF] Resizing FBO for 04088000 : 480 x 274 x 3
I: GLQueueRunner.cpp:496: Creating 480 x 274 FBO using DEPTH24_STENCIL8 texture
[libretro INFO] [FRAMEBUF] Resizing FBO for 04000000 : 480 x 274 x 3
I: GLQueueRunner.cpp:496: Creating 480 x 274 FBO using DEPTH24_STENCIL8 texture
[libretro INFO] [HLE] scePowerSetClockFrequency(333,333,166)
[INFO] Paused.
[INFO] Unpaused.
[INFO] [GL]: VSync => on
[INFO] [GLX]: glXSwapIntervalEXT(1)
[INFO] [PulseAudio]: Pausing.
[INFO] Content ran for a total of: 00 hours, 00 minutes, 02 seconds.
[INFO] Saving runtime log file: /home/faisal/.config/retroarch/playlists/logs/PPSSPP/LittleBigPlanet (USA) (En,Fr,De,Es,It,Nl,Pt,Sv,No,Da,Fi,Pl).lrtl
[INFO] No content, starting dummy core.
[INFO] arg #0: retroarch
[INFO] arg #1: --menu
[INFO] arg #2: -c
[INFO] arg #3: /home/faisal/.config/retroarch/retroarch.cfg
[INFO] arg #4: -v
[INFO] [Cheats]: Save game-specific cheatfile: /home/faisal/.config/retroarch/cheats/PPSSPP/LittleBigPlanet (USA) (En,Fr,De,Es,It,Nl,Pt,Sv,No,Da,Fi,Pl).cht
[INFO] Content ran for a total of: 00 hours, 00 minutes, 00 seconds.
[INFO] Unloading game..
[libretro INFO] [G3D] Context destroy

GDB stack trace when it is frozen:
(gdb) bt
#0  futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x5593d324e8bc) at ../sysdeps/unix/sysv/linux/futex-internal.h:80
#1  __pthread_cond_wait_common (abstime=0x0, clockid=0, mutex=0x5593d324e868, cond=0x5593d324e890) at pthread_cond_wait.c:508
#2  __pthread_cond_wait (cond=0x5593d324e890, mutex=0x5593d324e868) at pthread_cond_wait.c:638
#3  0x00007fded9b592f0 in std::condition_variable::wait(std::unique_lock<std::mutex>&) () from /lib/x86_64-linux-gnu/libstdc++.so.6
#4  0x00007fdecd2be94a in GLRenderManager::ThreadFrame() () from /home/faisal/.config/retroarch/cores/ppsspp_libretro.so
#5  0x00007fdeccf5f442 in Libretro::EmuThreadStop() () from /home/faisal/.config/retroarch/cores/ppsspp_libretro.so
#6  0x00007fdeccf64535 in LibretroHWRenderContext::ContextDestroy() () from /home/faisal/.config/retroarch/cores/ppsspp_libretro.so
#7  0x00005593d0bd1034 in video_driver_free_hw_context () at retroarch.c:20338
#8  0x00005593d0be52fe in core_unload_game () at retroarch.c:29157
#9  0x00005593d0bb1f9a in command_event_deinit_core (reinit=true) at retroarch.c:5579
#10 0x00005593d0bb5000 in command_event (cmd=CMD_EVENT_CORE_DEINIT, data=0x0) at retroarch.c:7075
#11 0x00005593d0bdd4d6 in rarch_ctl (state=RARCH_CTL_MAIN_DEINIT, data=0x0) at retroarch.c:25888
#12 0x00005593d0bf9951 in content_load (info=0x7ffef33acff0) at tasks/task_content.c:613
#13 0x00005593d0bfb759 in task_push_start_dummy_core (content_info=0x7ffef33acff0) at tasks/task_content.c:1600
#14 0x00005593d0bb4666 in command_event (cmd=CMD_EVENT_UNLOAD_CORE, data=0x0) at retroarch.c:6778
#15 0x00005593d0ea7bc8 in generic_action_ok_command (cmd=CMD_EVENT_UNLOAD_CORE) at menu/cbs/menu_cbs_ok.c:1507
#16 0x00005593d0eaf742 in action_ok_close_content (path=0x7ffef33ad888 "Close Content", label=0x7ffef33ad987 "unload_core", type=142, idx=2, 
    entry_idx=0) at menu/cbs/menu_cbs_ok.c:4490
#17 0x00005593d0f0b143 in generic_menu_entry_action (userdata=0x5593d3c23f00, entry=0x7ffef33ad870, i=2, action=MENU_ACTION_OK)
    at menu/drivers/menu_generic.c:365
#18 0x00005593d0e4738a in xmb_menu_entry_action (userdata=0x5593d3c23f00, entry=0x7ffef33ad870, i=2, action=MENU_ACTION_OK) at menu/drivers/xmb.c:6588
#19 0x00005593d0e59d83 in menu_entry_action (entry=0x7ffef33ad870, i=2, action=MENU_ACTION_OK) at menu/menu_driver.c:826
#20 0x00005593d0f0ac7f in generic_menu_iterate (data=0x5593d3c1dac0, userdata=0x5593d3c23f00, action=MENU_ACTION_OK)
    at menu/drivers/menu_generic.c:268
#21 0x00005593d0e61852 in menu_driver_iterate (iterate=0x7ffef33ae380) at menu/menu_driver.c:3433
#22 0x00005593d0bdfb02 in runloop_check_state () at retroarch.c:27177
#23 0x00005593d0be129e in runloop_iterate () at retroarch.c:27741
#24 0x00005593d0bb6c03 in rarch_main (argc=2, argv=0x7ffef33ae728, data=0x0) at retroarch.c:8082
#25 0x00005593d0d2e091 in main (argc=2, argv=0x7ffef33ae728) at ui/drivers/qt/ui_qt_application.cpp:150

I can confirm this problem. Indeed this bug occurs for a long time without any fix. This bug is related to “Audio synchronization” issue. If you turn off audio sync in retroarch setting, you’ll face no issue when choosing “close content” to quit game. This method however would cause the game to become unplayable since the game will become fast forward.

1 Like

I had the same exact issue on Android, changing my audio driver to “rsound” fixed it.

I retract my previous statement. No improvement found, game runs fast forward.

You can try going into core settings and select load dummy core when closing content and see if that works.

I have exactly the same issues on Google TV (Chromecast 4) when running PPSSPP (latest version, assets are properly installed). Loading a game will work first without any issue. Once I return to the menu and try to “close” the entire app is freezing. If I wait for some time Retroarch will crash completely. The weird thing is that afterwards I cannot even load any game with PPSSPP, the only thing that helps is to uninstall/reinstall the core. If desired I can provide also some logs. I will try the hints from above tomorrow.