libretro / dosbox-libretro

Port of DOSBox (upstream) to the libretro API.
GNU General Public License v2.0
61 stars 40 forks source link

Can't exit dosbox (and RetroArch) with exit command; dosbox freezes #58

Closed Gagert closed 5 years ago

Gagert commented 7 years ago

Before using the dosbox libretro core, I used either the official DosBox client or an enhanced DosBox build. When setting up a launcher for DosBox, I found good use of inserting an exit command in the selected game's dosbox-config (autoexec), so that both the game and DosBox itself were closed down while quitting the actual game.

As of today, I can't replicate the same function as with the non-libretro DosBox builds. While either auto exiting a game in dosbox libretro, or typing in the actual exit command as the game closes down, nothing happens with dosbox libretro. The core itself freezes, and I have to press F1 to access the RetroArch interface and exit the app that way.

I could just configure an exit key like on the other systems I'm emulating in RetroArch (the escape-key), but as dos-games are designed to be closed down with a "go back to dos" function, it feels more authentic going that way (Quit/Exit button in the in-game menu).

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/43834722-can-t-exit-dosbox-and-retroarch-with-exit-command-dosbox-freezes?utm_campaign=plugin&utm_content=tracker%2F2175333&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F2175333&utm_medium=issues&utm_source=github).
marcoose777 commented 6 years ago

This is an upstream issue with dosbox, I'm getting the same issue with dosbox standalone on manjaro (read arch linux). When I interrupt the frozen state and back trace from gdb: bt

0 0x00007ffff76984cd in __pthread_timedjoin_ex ()

from /usr/lib/libpthread.so.0

1 0x00007ffff7409207 in SDL_WaitThread () from /usr/lib/libSDL-1.2.so.0

2 0x00007ffff740115b in SDL_AudioQuit () from /usr/lib/libSDL-1.2.so.0

3 0x00007ffff7400006 in SDL_QuitSubSystem () from /usr/lib/libSDL-1.2.so.0

4 0x00007ffff740008f in SDL_Quit () from /usr/lib/libSDL-1.2.so.0

5 0x0000000000408cb1 in main ()

Which indicates that for some reason dosbox is hanging on SDL_Quit(), why SDL1.2 when it's deprecated? Chances of a fix for SDL1.2 nil, probability bug is in dosbox 100%

Correction, I had jackd running for audio, turn off jack, and everything works as expected. Gagert do you use jack audio, if so then I'd recommend disabling it for ALSA fallback.

Gagert commented 5 years ago

I just tried the DosBox SVN build, and the exit command no longer crashes DosBox but returns to the RetroArch interface itself (as it should).