realnc / dosbox-core

A DOSBox core for use in RetroArch and other libretro frontends.
GNU General Public License v2.0
42 stars 17 forks source link

Crash on Retroarch, when launching a dos game after another dos game #50

Open gabberhead opened 1 year ago

gabberhead commented 1 year ago

i have running dosbox-core since over 1 year on retroarch. but since day one, i always have the same problem. when i launch retroarch and start a dos game, it don't matter which one, the game is always starting without a problem. but when a dos game is running, or when i quit the runnign dos game, and start another dos game, retroarch always crashes. i have 17 cores running on retroarch, and this core is the only one, with that behavior. is this known? if yes, how can i fix it?

s-ac commented 1 year ago

I'm not able to reproduce this. Can you provide some more information about how you are launching games? Are you using a front end or batch files/shell scripts? Are you launching from directly inside RetroArch? When you launch games are you doing so via loading the DOSBox conf file for the game, or are you loading the DOS executables or batch files directly? What operating system and RetroArch version? Is this all DOS games or only some?

gabberhead commented 1 year ago

i am launching games direct in retroarch with a seperate *.conf file for each game. i am using win11. win10 was the same. retroarch is always the newest stable build. some other cores have the same problem, but with disabled retroachievement, no other core, which crashed before, is crashing anymore with that option disabled. but with dosbox-core this workaround doesnt work. for example, the snesx9x core or genesis plus gxand some others are not crashing with retroachivements enabled.

here is a log. frest start of retroarch, starting the game willy beamish and after that without quitting, but it also happens when i quit the game, starting battle isle retroarch.log

s-ac commented 1 year ago

I still can't reproduce this. I am trying to follow exactly how you are loading games, but I'm not seeing any crashes. I am loading the games' conf files in the RetroArch UI using the "load content" option and choosing the "DOSBOX-core core" option. Then to switch games I am using "close content" and loading a different game from a different conf file. No crashes. I can do this multiple times in succession without issue. I just ran tried this on both my Windows 10 PC and my Fedora Linux 36 system. Both saw no crashes.

Do you happen to have another machine you could test this on? Do you see this problem on only the one system?

One thought is that this might be some sort of pathing problem since I can get a reliable crash in RetroArch if I provide a non-existant (garbage) file path to load from a command line launch. I run all of my games using shell scripts and batch files I've set up, and I have noticed that I will get a segfault if I make a mistake in the path. This really shouldn't be happening if you are loading via the RetroArch UI though.

s-ac commented 1 year ago

Are you maybe using relative paths in the [autoexec] portion of your DOSBox conf files? I am always using absolute paths ("C:\Games\Willy Beamish" or whatever). Could that be the issue?

gabberhead commented 1 year ago

Are you maybe using relative paths in the [autoexec] portion of your DOSBox conf files? I am always using absolute paths ("C:\Games\Willy Beamish" or whatever). Could that be the issue?

iam also using absolute paths

s-ac commented 1 year ago

Could https://github.com/libretro/RetroArch/issues/14742 be your issue? Problem with RetroArch crashing when loading a second game with achievements enabled.

gabberhead commented 1 year ago

For the other Codes yes. When i disable achievements for certqin cores which are crashing, the the Work. But disabled achievments still crashes the dosbox core.