melonDS icon indicating copy to clipboard operation
melonDS copied to clipboard

Windows log file

Open trypodman opened this issue 1 year ago • 6 comments

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!

trypodman avatar May 13 '24 17:05 trypodman

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

RSDuck avatar May 13 '24 17:05 RSDuck

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

nadiaholmquist avatar May 13 '24 17:05 nadiaholmquist

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.

trypodman avatar May 13 '24 18:05 trypodman

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.

RSDuck avatar May 13 '24 18:05 RSDuck

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

trypodman avatar May 13 '24 18:05 trypodman

looks like it only works when running from mingw shell.

RSDuck avatar May 13 '24 18:05 RSDuck