MuseScore 2 only runs in debug mode
Hi all,
Bit of an odd one. I'm the ICT technician for a school that is looking to run MuseScore in the classroom, but I'm falling at the first hurdle - MuseScore simply won't run. When you double-click the shortcut or .exe, you see the Windows spinning circle for perhaps a few seconds, then nothing. I've trawled the event logs, but there's nothing at all about MuseScore there (and no corresponding events in the same timestamp as the execution). I've ensured the security is correct, and I've run as administrator, and tried both the 32-it and the 64-bit versions. I've also tried it on three different computers.
However... after much reading of the Handbook, I tried running in debug mode using the -d parameter to try and see if it would tell me what's going on - and the program works, exactly as I'd expect it to.
So, my questions are twofold. First, why won't it run without the debug switch, and second, is there any harm in running it in debug mode in a production environment? What's the actual difference between normal and debug (I don't see any actual debug messages anywhere)? If there's no real difference I'm happy to just modify the shortcut that users use and everyone use it!
System details:
OS: Windows 10 Education build 1703 64-bit
CPU: i5-6400
RAM: 4-8GB (depending on PC I tested it on).
Sound: Realtek High Def audio (I can find a specific chipset name if necessary).
MuseScore version: 2.3.1 (latest at time of typing).
Any other details, just ask. Primarily though, I just want to know if I'm going to hit any problems using it in Debug mode.
Thanks!
Andrew
Comments
You shouldn't hit any problem when running in debug mode, and in Windows MuseScore won't produce any output with it.
Have you tried reverting to factory settings?
Or with sound (-s) or network (-w) disabled? Esp. the latter might be an issue in your school network's environment, as there probably is some firewall involved.
In reply to You shouldn't hit any… by Jojo-Schmitz
Thanks for the reply. It's good to know that Debug mode can be used (although I wonder what the point of the mode is in Windows?).
I have indeed tried reverting to factory settings, but again, when I run the .exe with that switch then nothing happens still.
I tried -s and -w just now (thanks for that), but the exact same result each time - no activity or output at all.
In reply to Thanks for the reply. It's… by KingsmeadICT
For Windows you need to compile including console, this is not done for normal releases. The option just exists because it does on all platforms. Well, also it does trigger the corresponding code paths, only the debug output goes nowhere
In reply to For Windows you need to… by Jojo-Schmitz
Ah ok, thanks for the clarification. At least this means I do have a way forward with it for our Music department - I'm just somewhat fascinated by why on earth it won't run normally!
In reply to Thanks for the reply. It's… by KingsmeadICT
Debug mode works great on Windows - if you are running under a debugger that can display console messages. You can view the console using the free Microsoft tool https://docs.microsoft.com/en-us/sysinternals/downloads/debugview. Chances are good that something being output there explains why it isn't running otherwise.
There are two downsides to running in debug mode in normal use:
Lots of extra lines & symbols showing on your screen that are there for, well, debugging purposes. It's kind of distracting but not a deal breaker, I guess.
Things will likely run slower because of lack of optimization, extra code being executed, and the messages being output messages to the console. Not sure how much slowdown there will be due to the latter given you can't actually see the console, but it's a pretty significant slowdown if the console is visible.
In reply to Debug mode works great on… by Marc Sabatella
Optimization is using the same settings, don't confuse debug mode with RELEASE vs. DEBUG build
In reply to Optimization is using the… by Jojo-Schmitz
Doh! Of course you are right. Still, the other factors are real. The slowdown is quite noticeable to me even if it's hard to quantify. Not as much as a 2x slowdown, but maybw 1.5x? Which is to say, editing large scores is that much more painful.
In reply to Doh! Of course you are… by Marc Sabatella
Thanks for the input. That does bring me back to my other question - what on earth could be causing MuseScore to not do anything (visible) when ran in normal mode?
In reply to Thanks for the input. That… by KingsmeadICT
That's what we would hope to find out If you download the tool me tioned so we can see the console output :-)
In reply to That's what we would hope to… by Marc Sabatella
Hi,
Considering I wasn't at work at 11pm where the problematic machines were, I wasn't actually able to test your suggestion :)
I've just tried it now, and I think we have a winner. Here's the entire output:
[29864] *** CGDContextMenu::initialize ***
[29864]
[29864] *** CGDContextMenu::Initialize Num files selected: ***1
[29864]
[29864] onecoreuap\shell\onecoretdlhelpers\tiledatalayeritemwrappers.cpp(1183)\appresolver.dll!00007FFE01EF284D: (caller: 00007FFE01ED5F49) ReturnHr(25) tid(7e64) 80070057 The parameter is incorrect.
[10152] Qt: Untested Windows version 10.0 detected!
[29864] IsValidForAD from client = 0 for path ??????????????????????????
[29864]
[29864] *** CGDContextMenu::QueryContextMenu ***0
[29864]
[10152] Mscore: fatal error: cannot load internal font <:/fonts/MuseJazz.ttf>
[29864] onecoreuap\shell\shcore\libs\stream\managedcreatefile.cpp(1293)\shcore.dll!00007FFE1BBDB447: (caller: 00007FFE1BBA8EEF) ReturnHr(38) tid(e8) 80070057 The parameter is incorrect.
I'm guessing from the output that the internal font is the problem! I've downloaded it more than once to try it out so I don't think it's a corrupt download that's causing this. Any suggestions?
Thanks in advance.
Edit:
I may be quite wrong. I just tried running MuseScore in debug mode (with the -d switch), and I've attached the output to this post - it has a lot more fonts (including this one) that it fails to load, but it still loads the program).
Instead it's is perhaps the managedcreatefile.cpp line that's causing the issue? That isn't present in the debug switch output. I don't know, I'm guessing at this point :)
In reply to Hi,… by KingsmeadICT
That does ring a bell!
See #99886: MuseScore 2.0.2 won't start on Windows 10 if Windows Firewall was not running during install
Also supports my initial gut feeling that this related to firewall ;-)
And indeed the -d option allows MuseScore to ignore that font load error, see ...libmscore/mscore.cpp, lines 219-227
Maybe https://docs.microsoft.com/en-us/windows/threat-protection/block-untrus… helps here?
In reply to That does ring a bell!… by Jojo-Schmitz
Apologies for disappointing you, but firewall wasn't the issue - it was switched on when installed (and I tried a complete uninstall/reinstall after checking it was on just to be sure).
However, you struck gold with the link about blocking untrusted fonts! After disabling it via GP and rebooting, MuseScore started working without the -d switch (with no font errors in the debug console), so now I just need to either retarget that setting or put an exception in.
Many thanks for your help both, I'm pleased we got to the bottom of it!
Edit: On reading https://blogs.technet.microsoft.com/secguide/2017/06/15/dropping-the-un… I'm just going to drop the setting entirely. I didn't realise this was the cause of our missing images in webpages also! So you've accidentally helped me resolve two issues at once :)