schellingb / dosbox-pure

DOSBox Pure is a new fork of DOSBox built for RetroArch/Libretro aiming for simplicity and ease of use.
GNU General Public License v2.0
731 stars 61 forks source link

CLI yields instant crash, log has no useful info. #436

Open LupinePariah opened 7 months ago

LupinePariah commented 7 months ago

Here's what I did:

Ran this from the command-line: retroarch -v --log-file C:\Games\Emu\EmulationStation-DE\Emulators\RetroArch-Win64\logs\retroarch.log -L C:\Games\Emu\EmulationStation-DE\Emulators\RetroArch-Win64\cores\dosbox_pure_libretro.dll "C:\Games\Emu\EmulationStation-DE\ROMs\dos\1993\Ultima VII Part 1 - The Black Gate + Forge of Virtue (1992).zip"

RetroArch clearly starts, for a split-second, then just disappears. The log file yields no useful information that I can spot. DosBox Core/SVN cores seem to run fine.

I noticed this when I setup Emulation-Station. All other platforms I'd used ran without issue. I added a DOS game, and... instant crash. I investigated by looking at the log of Emulation Station to see what command it was running to launch the game. I then went to the RetroArch folder and replicated the command, only for it to yield the same result.

Here's where it gets strange. If I launch RetroArch regularly, then go through the rigmarole of loading content that way? DosBox Pure seems to work.

Is there something wrong with the CLI usage? If so, I can try to fix Emulation Station to use an altered command-line. But as my own attempts to load it from the CLI failed, I wouldn't know what to change it to.

If there's any other information I can provide? I will happily do so.

The log output: retroarch.log

Edited: I forgot to mention that I did test this with a smattering of other games, not just Ultima VII. They all yielded the same result (a crash at the CLI, yet running perfectly when using load content).

Edited II: So, here's the cause...

I deleted my config folder and started over so I could go step-by-step in rebuilding it to see if I could find a culprit. And I did. It was the Mega Bezel shader. It might actually be all slang shaders that cause this.

The reason I didn't figure this out? All of the following works.

So, initially, I hadn't put two-and-two together until I got down to brass tacks and really started investigating. It hadn't occurred to me when I made the initial report to delete the config folder and start over, I apologise for that. I hadn't expected any problems to arise with having Mega Bezel set globally, and up until this point there hadn't been, but at least now we know what the problem is!

So, here's the reproducible steps:

Removing the shader gets the core to work again.

schellingb commented 7 months ago

In general starting via the command line (with -L "<CORE-PATH>" "<CONTENT-PATH>") should work, it's how I always launch it during development. So here's some questions:

One thing you can try is starting the core via RetroArch regularly (you can just launch the core without content, too) and go into Core Options -> Emulation and set the Advanced > Start Menu option to "Always show menu on startup and after game exit, ignore auto start setting", then normally quitting with the "Quit RetroArch" button in the menu to make sure options are saved. Then see if the CLI startup ends up showing the menu.

LupinePariah commented 7 months ago

I finally figured it out! I'm going to add an addendum to my original post so that I can make it a proper bug report.

schellingb commented 7 months ago

I'm getting no crash with Vulkan and a core shader preset consisting of one of the Mega Bezel presets. I tried 1.16 release and the oldest nightly still available (from Oct 31). I tried in windowed mode and full screen without issues starting from the CLI. It looks like you are running a nightly build from Oct 12? Can you try another RetroArch build? Can you upload your retroarch.cfg?

Also, can you confirm if the problem also happens if starting with just:

retroarch -L C:\Games\Emu\EmulationStation-DE\Emulators\RetroArch-Win64\cores\dosbox_pure_libretro.dll

This should just bring up the start menu with "no content loaded".

LupinePariah commented 7 months ago

Okay, so...

So I did some more digging. It turns out it's only happening (for whatever reason) with the smooth-adv Mega Bezel shader. I tried using the Duimon shader pack (a whole bunch of different ones, but settled on DosBox Night) and that works perfectly.

It's specifically only the smooth-adv Mega Bezel shader this happens with, and only in this particular combination.

I think you can put this down to "Something bizarre is happening on the user's computer." and close it.

I'm really sorry about that. If this ever comes up again though, the user reporting can try different versions of Mega Bezel.