melonDS-emu / melonDS

DS emulator, sorta
https://melonds.kuribo64.net
GNU General Public License v3.0
2.98k stars 493 forks source link

Windows log file #2042

Open trypodman opened 1 month ago

trypodman commented 1 month ago

Hi, I'm experiencing a crash on ROM boot and am trying to debug. However, it doesn't seem like 0.9.5 has any log output on windows when I run from command prompt. Is there a log file written anywhere on disk I can access, or any way to force log output? Thanks!

RSDuck commented 1 month ago

apparently you can run it from the console with melonDS > log (surprised that actually works).

nadiaholmquist commented 1 month ago

The log probably won't have much useful information though – you would need a debugger if it's actually crashing.

trypodman commented 1 month ago

Thank you both for the suggestions!

I tried redirecting the program's output to a file, but unfortunately this doesn't work. It appears that melonds executable launches a child process causing the initial process to exit early with no log output.

@nadiaholmquist I'll try this, thank you. Do you suggest any debugger in particular?

I just tried 0.8.3 since it has log output and surprisingly it's working. I notice that it ships required DLLs alongside the exe, so my best guess is that I'm missing a runtime dependency for 0.9.5.

RSDuck commented 1 month ago

melonDS 0.9.5 should be completely statically linked. From 0.8.3 to 0.9.5 the frontend was completely replaced. Redirection of the log output worked fine for me with the official Windows binary of 0.9.5. If the window doesn't even open, it probably crashes for you before there's a single log message made.

trypodman commented 1 month ago

Strange. The window opens, but the exe process seems to exit immediately (which is why I assumed that it spawns a child process or something). I'm able to use the application up until it crashes when I try to boot a ROM, but there's no console output.

Here's a screenshot to better visualize the behaviour I'm seeing:

image

(the resulting log file is empty)

I've confirmed that I'm using the 0.9.5 windows build from https://melonds.kuribo64.net/downloads.php. I've tried on both windows 10 and 11 and see the same behaviour.

Edit: I also just downloaded the build from the github releases section to verify that it's the same file, and the checksums match

RSDuck commented 1 month ago

looks like it only works when running from mingw shell.