Open CreeperPookie opened 3 months ago
I've also noticed this when double-clicking an NBS file too, (exact same stacktrace too), which probably passes the file argument in the same way (as if using a terminal)
Hi! Just so it's easier for us to reproduce the issue, do you mind attaching the affected .nbs file here? Does this happen with this specific file when you open it from inside the program?
I just tested opening a bunch of different NBS files, when feeding through command line it still always crashes on load; I even tested some original ones dated from 2011 (probably bundled in a very old version) and it still crashes.
One thing that's odd is that it also crashes when given no arguments whatsoever, as well as when passed a folder instead of a file (pressed enter too early :p); maybe this isn't related to file at all, but something about how it's instantiated; this still doesn't explain why the command line arguments are the exact same when viewed in task manager though
Either way though I'll upload a couple NBS files here that you're welcome to test with :D (legacy, midi imported, and custom NBS v5 songs that I remade) NBS Files.zip
I can reproduce the issue on my computer.
However, if I run the command from the folder containing the .exe file, it works normally.
Also, double-clicking a .nbs
file open the file normally in my computer.
I can reproduce the issue on my computer. However, if I run the command from the folder containing the .exe file, it works normally. Also, double-clicking a
.nbs
file open the file normally in my computer.
I can also confirm this, and when in the same folder as the executable it does open songs as expected too :O I think I know what it is! NBS probably requires several DLLs or libraries at runtime, and it tries to load them from the current directory instead of its installation location, which causes the crash. This also explains why it's the same arguments in task manager; it starts from its own installation directory and that allows it to start normally.
Describe the bug If you try and open an NBS song using a terminal, NBS instantly crashes. It does accept command-line arguments as if I click the file or open it from the taskbar recently opened view, it opens the file fine and shows the same syntax that I tried from a terminal (
"<installation location>\Minecraft Note Block Studio.exe" "C:\path\to\nbs\file.nbs"
) I've confirmed this with CMD, Powershell, and Bash via WSL, so terminal type doesn't seem to matter.To Reproduce Steps to reproduce the behavior:
C:\Users\$<username>\AppData\Local\Minecraft Note Block Studio\
)"<Note Block Studio install location>\Minecraft Note Block Studio.exe" "C:\path\to\nbs\file.nbs"
Screenshots