MuseScore 2.0 beta 1 crashes on startup (requires SSE2 instruction set)

• Aug 29, 2014 - 07:35
Type
Functional
Severity
S1 - Blocker
Status
closed
Regression
No
Workaround
No
Project
Tags

MuseScore 1.3 and earlier for 32-bit Windows work fine if you have a CPU that does not support the SSE2 instruction set and you are on 32-bit Windows XP. MuseScore 2.0 beta 1 for 32-bit Windows, however, crashes on startup if your CPU doesn't have the SSE2 instruction set and you are on 32-bit Windows XP... at least for me. I am not sure why this happens, perhaps it is my CPU, perhaps it is the operating system. But I thought I should let you know about this so you can try and get it fixed.

The specific error message is "mscore.exe - Application Error" in the titlebar and in the window it says "The application failed to initialize properly (0xc000001d). Click on OK to terminate the application." After I click on it once I get the same error message again. Then after I click a second time it goes away and the program terminates and there are no more error messages.

The program does install and uninstall correctly, though. Anyway I know that you don't claim this beta version should work on Windows XP, and say it's for Windows 7 & 8, and that Windows XP & Vista are unsupported but should work. Well I hope you'll figure out what the problem is here and fix it even though it's unsupported. Anyway I looked up the meaning of this error message I got and typically it happens with programs that require SSE2 CPUs running on computers whose CPUs don't support SSE2. So I hope you change the CPU dependency to something earlier than SSE2.

SSE2 was introduced in the Intel Pentium IV but it didn't catch on with AMD processors until half a decade later, when it was adopted at the same time as the AMD64 64-bit instruction set. So anyone with a 32-bit AMD CPU, such as me, cannot run programs that require SSE2 support. It seems that is the problem here. A lot of people still have computers with 32-bit AMD CPUs. SSE2 did not become a system requirement for Windows until Windows version 8.1, so anyone with a Windows version up to and including the original Windows 8 could be running it on a CPU that doesn't have SSE2. So I'd advise you not to require SSE2 either, and have your compilation and build setup for Windows instead target i686 (Pentium+MMX, first supported on the Pentium Pro). The default CPU target for the GCC compiler for x86 is a 386, and versions of Microsoft Visual C++ up thru 2010 target the i686 by default. Microsoft Visual C++ 2012 and later target SSE2 CPUs by default (Intel Pentium IV or later, or AMD Athlon 64 or later). This leaves those of us with 32-bit AMD chips high and dry. The i686 target is still the best one to use.... the option is "/arch:IA32" on Microsoft Visual C++, and "-march=i686" on GCC.


Comments

Title MuseScore 2.0 beta 1 crashes on startup for me (apparently your program requires SSE2 instruction set) MuseScore 2.0 beta 1 crashes on startup (apparently your program requires SSE2 instruction set)

I am experiencing the very same problem. But the difference is, for me it's crashing on the latest Nightly (Nightly-2014-08-30-1016-244f40d). I haven't actually tried the Beta-1.

I know my computer does not support SSE2 (my CPU is Intel P-3).

This doesn't confirm mcgrew's analysis, but maybe this lends more credence to his theory.

MuseScore 2.0 beta1 itself is compiled with GCC 4.8, I don't think we pass any -march option. So according to your investigation we should be safe here. Qt5 is also compiled with GCC 4.8 too but I don't know if they pass options. It will need further investigation.

Further investigation https://bugreports.qt-project.org/browse/QTBUG-35430
Qt requires SSE2 by default. Not enabling it would penalize all other users (especially for plugins and zita UI in MuseScore if I understand the qt issue correctly). It would also make the packing less easy since we would have to compile Qt ourself... we would compile Qt with -no-sse2 and ship a special version of MuseScore for those old CPUs which is also a complication in term of user support. I'm willing to make it happen only if there is a huge demand for it.

I tried to compile a version without SSE2 support.
I had to re-compile Qt (it took almost 8 hours!).
Here is MuseScore 2 beta 1 without SSE2:
https://drive.google.com/file/d/0BxjayMZiuupOS2RFT0pyVmZhV0U/edit?usp=s…
(in that page, go to upper ribbon menu and chose the download option; then just extract the folder from the zip file; the application is inside "bin" folder: mscore.exe; you probably should launch it from the command prompt with the -F option the first time to clear residual configurations from older Nightlies).

I am not 100% sure that I really managed to obtain the correct Qt build (for example, I was sure I disabled debug build during configuration, nonetheless it built both release and debug libraries).

@mcgrew and NAF Lover : can you please test if this works in your PCs?

Please remember that this (would-be) noSSE2 version is officially not supported, so if it works and you find bug in it, it would be better to check on an "officially" supported version before posting to the issue tracker (maybe asking in the forum and posting the steps so that one with the "official" release could reproduce).

#7, ABL:

Wow, what an effort! Hopefully ultimately this won't be for naught.

Short answer (all I've done is some spot checking): your version works here.

:-)

I have tested the version with Qt build without SSE2 and it works perfectly fine! Thanks! It looks like you have fixed this bug. I would say the market share of Intel Pentium 3's is pretty low right now but there are probably still plenty of people who have AMD Athlon XPs or AMD Semprons that were made prior to the AMD Athlon 64. My CPU is an AMD Sempron 2800+, which according to AMD is about as fast as a 2.8 GHz Pentium IV, and the only downside it has compared to a Pentium IV from Intel is no SSE2 instructions.

Looks like you put a lot of time and effort into fixing this, thank you very much, it works great! :-) Maybe we can report this upstream to the Qt project.

Also FYI when I look at brand new computers for sale most of them have slower clock rates than my computer even though its AMD Sempron 2800+ CPU dates back to early 2005 (it was one of the last non-SSE2 CPUs manufactured, if I had just waited a couple months then all of AMD's offerings would have supported SSE2 and I would not be having this problem now, I was very unlucky). My computer's CPU is equivalent to a 2.8 GHz Pentium 4, at least according to what AMD said at the time, and back then I had never heard of this SSE2 thing, and now the SSE2 thing is coming back to haunt me, because I was foolish enough to buy the one brand-new CPU that didn't have SSE2, a month or 2 right before all Intel and AMD CPUs had SSE2, quite bad timing on my part, but hindsight is 20/20. Mine was basically the last model before AMD upgraded the Sempron product line to support both SSE2 and 64-bit... I had bad luck. I am planning on upgrading to a new computer of course, just haven't gotten around to it yet, it'll require a lot of comparison shopping. I can't upgrade to an SSE2 CPU because my CPU is one of the last Socket A CPUs and none of the Socket A CPUs support SSE2. AMD was making chips that did support SSE2 as early as 2003 (the first Athlon 64s and Opterons) but it didn't reach their entire product line for 2 years, until 2005.

But yes the problem with MuseScore 2.0 beta 1 not working with my CPU is fixed now, and I am still regretting getting the wrong CPU for this computer because at the time I bought the CPU it was the only brand-new CPU on the market that didn't support SSE2 so I screwed up majorly. MuseScore from that download works just perfectly on my computer, just like MuseScore 1.3 works perfectly on my computer.

I'm assuming the official release of MujseScore 2.0 won't use these self-built Qt libraries if that means it runs slower for everyone else, but that a special version might be made available (officially or otherwise) for those who need it - and now that we have "good" Qt libraries, this process will go easier next time :-)

I'm very glad that this works!
I always like to overcome these sort of challenges: for example, I am also trying to build a 64bit Windows release of MuseScore - with SSE2 :-) but I am hitting this Qt bug: https://bugreports.qt-project.org/browse/QTBUG-38145 which crashes the program (only in release mode) each time MuseScore Connect starts.

Now that I have the Qt 5.3.1 without SSE2 fully compiled, building MuseScore takes the usual time required for its compilation, so I can from time to time unofficially provide an updated build (with the previous warnings about bug support, of course).

I am curious about which features will not work in this "noSSE2" version; I tried to very quickly play with plugins, but they seemed to work.

For Qt x64, you could check here http://www.tver-soft.org/qt64 so you don't have to recompile Qt yourself.

For ARM based linux, there is already a build on debian ARM for MuseScore 1.X. It's also working on Raspbian, the debian port for the Raspberry Pi.

Another interesting challenge is building MuseScore with Visual Studio :)

These topics are better discussed in other threads.

Regarding a noSSE2 "official" build, I see no problem listing it on the download page if it's done in a non obstructive way for the vast majority of Windows users.
I believe it would not be a good idea to deliver only a noSSE2 build for all Windows users. Qt seems to recommand against it too. See http://lists.qt-project.org/pipermail/development/2013-November/014085…

@Jojo-Schmitz: to me it seems that the people at Qt have already merged the patch, look here:
https://qt.gitorious.org/qt/qtbase/source/b2b9fdfda0f7838059d7e826d8174…
and following lines.
These lines are also present in Qt 5.3.1 source files.
I will continue the discussion in the other issue report, to avoid the "off-topic" here :-)

EDIT: On second thought, I think I was looking at the wrong lines. The proper ones are:
https://qt.gitorious.org/qt/qtbase/source/b2b9fdfda0f7838059d7e826d8174…
I will try to use the patch.

Hi, my computer is an AMD Athlon XP 2400 that supports MMX (+), 3DNow!(+) and SSE instructions so this version without SSE2 works fine. Thank you ABL for this work so useful for those who don't have SSE2, so far, only when I try to open the synthesizer on the View menu the program crashes and an Error message appears: Microsoft Visual C++ Runtime Library (and below) Program: ...\...\mscore.exe This Application has requested the Runtime to terminate it in an unusual way. Please contact the application's support team for more information.

Thank you ABL for the new build. I have tried it but seems to come up the same problem, it crashes right after opening the Synthesizer, doesn't even let me go beyond this point, the same Error message appears and it closes. I haven't done any factory reset yet. Should I do it now that I have already installed it, or should I uninstall and install the program before reset? And how can I do it? By just going to "Start" then "Run" and write: MuseScore.exe -F ?

Thank you Thomas, I've followed the directions on your link but seems ineffective nonetheless and the same error message shows once more, and the programme closes right after clicking on the accept button of the error message :(

Thank you robert, but it's a little bit beyond my head, I don't understand what you mean, I click on your link but I can't see what i should do.

I fear that the crash could be related to a possible requirements of SSE2 by the qml plugin architecture. Indeed, the master effects inside the synthesizer are actually qml scripts.
@javier muro: can you please try to see if you can use any of the plugins?

In the meantime, I am building a debug build without SSE2, so we can see the log and possibly understand where the crash originates.

I am sorry I am using you as some sort of "guinea pig" :-) but I am not able to reproduce the crash on my hardware. Thank you very much for your help.

If the crash is related to the qml infrastructure it is a bug in Qt and there is almost nothing we can do (except warn people using the "experimental" no_SSE2 version of not using the part of MuseScore written as qml scripts).

EDIT:
Here is the debug build (178 MB zipped archive, 573 MB after extraction):
https://drive.google.com/file/d/0BxjayMZiuupOQ3VSaEJYOElOcHc/view?usp=s…
I added also two batch scripts (debugMode.bat and revertToFactorySettings.bat) to make things easier :-)
Can you please do the following:
1- verify what I was saying above about the plugins;
2- launch the "revertToFactorySettings.bat", and try again the synthesizer and the plugins;
if the crash is still present:
3- launch "debugMode.bat", reproduce the crash, and then attach the "log_file.txt" which was generated to a comment in this thread.
Thank you very much.

In my case the bug disappeared when I deleted /usr/local/share/mscore-2.0/templates/ in which there was old templates and new ones.

This directory was created and populated anew durng the next compilation.

I had no advice about SSE.....that's why I wrote «perhaps»

Thanks to you abl, my pleasure if this can be of any help to all, the merit is yours for such good work. Tha fact is I can't go beyond the synthesizer, I mean, I click on the "View" menu, then, one of the options is "Synthesizer", right after clicking on it, the error message appears and the only choice is to click on the "accept" button at the end of the message. After clicking "accept" the program closes itself.

And what about the plugins?
> Plugin menu
then enable one/some plugin from the plugin manager.
Restart MuseScore.
> Plugin menu and try to use one of the plugin.

In any case, can you please try to do what I tried to describe in comment #23?
Feel free to ask if anything is not clear (English is not my first language, so I may have been not 100% linear in the text).

" the merit is yours for such good work."
Well, thanks, but the real merit goes to all the developers of MuseScore and in particular to Werner and Nicolas :-)

I suspect the Synthesizer issue (comment here #16 ff.) is not SSE2 related. I experience the same Synthesizer crash; but in my case the problem goes back at least to build MuseScoreNightly-2014-03-21-1908-5aa775f, which I'm pretty certain predates the SSE2 issue here.

This doesn't mean this isn't a QT5 issue. And in particular, I'm intrigued by ABL's speculation (comment #23) that plugin problems may be correlated with the Synthesizer crash - since I have plugin crashes with the same 5aa775f nightly (specifically, see issue #25122: Nightly 2014-03-21 crashes upon clicking menu "Plugin Manager" - if a plugin exists).

Sorry ABL but I don't know what you want me to do about the plugins. When I open the plugin folder, there's one folder inside named "helloqml" and ten .qml files. I can't open any of these because when I try to do so, a window appears saying: "windows cannot open this file. To open it, Windows needs to know the program that created it. Windows can connect to search automatically, or you can choose from a list of programs of your computer. What do you wish to do?

Use the service to find an appropiate program
Choose from a list

As you can see, I have very limited knowledge on computer science

Don't worry, the steps are very easy.
The plugins I am referring to can be accessed from inside MuseScore.
Open the "Plugins" menu and open the "Plugin manager"
NOT FOUND: 1
Inside the window of the Plugin manager, select some plugins by clicking on the box to the left of the plugin name. I would suggest that you check only "colornotes", "helloqml", "notenames" (do NOT check the panel or the random2 plugins, which are already known to crash for other reasons).
NOT FOUND: 2
Now click "Ok", close MuseScore and restart it. Inside the "Plugins" menu you will see some new items corresponding to the loaded plugins. Open a score, then open the "Plugins" menu and click on one of the plugin items (e.g. the colornotes).
I strongly suspect that MuseScore will crash at this point.
If this is the case, can you please do the following?
- Download the debug build (178 MB zipped archive, 573 MB after extraction) and unzip the folder:
https://drive.google.com/file/d/0BxjayMZiuupOQ3VSaEJYOElOcHc/view?pli=1
- double-click on the "debugMode.bat" script; MuseScore will launch (but it will be in debug mode, a little slower and you will see guide boxes and lines inside the score)
NOT FOUND: 3
- Reproduce the Synthesizer crash; close program;
- attach the "log_file.txt" which was generated to a comment in this thread.
NOT FOUND: 4

Thank you for your help.

Attachment Size
plugin_step1.png 29.65 KB
plugin_step2.png 19.89 KB
debug1.png 42.91 KB
debug2.png 42.17 KB

Hi ABL now I understand. This is what happens:

I go to the Plug-ins menu as you indicated, click on this button, then the two options appear: plugins manager and Plugin creator. I click on the manager button and right after doing this, the same kind of error message appears

" Microsoft Visual C++ Runtime Library (and below)
Program: ...\...\MuseScore_no_SSE2\bin\MuseScore.exe

This Application has requested the Runtime to terminate it in an unusual way. Please contact the application's support team for more information.

Accept button (end of message)

So I click on the access button and the program closes itself

So I can't even access the Plug-in manager (the second of the windows you just posted.

Fatal: This program requires an X86 processor that supports SSE2 extension, at least a Pentium 4 or newer (qml\v8\qv8engine.cpp:99, QV8Engine::QV8Engine(QJSEngine*))

So still something in the Qt libs needs SSE2, or believes to need it and aborts right there

@javier muro: Thank you for the test with the debug build. This definitely pins down the culprit of the crash.

As I was strongly fearing, the problem is in Qt itself.
Each time a qml-based portion of code is being loaded we have a crash in a system not support SSE2, even if Qt was compiled without SSE2 instructions.
This qFatal was introduced in November 2013, see:
https://qt.gitorious.org/qt/qtdeclarative/commit/4662e632e
and this explains also what is seen in bug report #25122: Nightly 2014-03-21 crashes upon clicking menu "Plugin Manager" - if a plugin exists.

Unfortunately, this bug about the Synthesizer and also #25122: Nightly 2014-03-21 crashes upon clicking menu "Plugin Manager" - if a plugin exists are therefore "won't fix", since the crash does not depend on us and the Qt team has decided to not support a QML2 environment for processors without SSE2 commands.

I think we could deliver a compiled version of MuseScore without SSE2, but with the whole qml infrastructure disabled. For what concerns the plugin this could be easy; how about the Synthesizer?

Werner recently changed the behavior of the Synthesizer to not use a qml script.
Here is a no-SSE2 version of the latest commit ( 68600ec6 ) and with plugin framework disabled:
https://drive.google.com/file/d/0BxjayMZiuupOV0VQcGIwRDBkTXc/view?usp=s…
Except for the plugin framework (which is disabled because not supported by Qt for hardwares not supporting SSE2), everything else should work as in the usual build of MuseScore. Similarly to the Nightly builds, I added a batch file to launch the program and the "special" folder for the script for factory reset.

Edit: I forgot to say that I applied the patch which will go into Qt 5.4.1 and that solves the pdf problem under Windows to this build.

Thank you all, from the first user/researcher that reported this to the devs for compiling this build. Now I can run MuseScore 2 on an old computer. I hope you will make a non-SSE2 publicly available and properly advertised version of MC2 when it reachs the stable phase.

@Maurinho could share exactly the specifics of your old computer where you run this non-SSE2 build on? So hardware + operating system. My goal is to come up with an exact idea which systems would need this build. Thanks.

From the 1st post:
SSE2 was introduced in the Intel Pentium IV
...
anyone with a 32-bit AMD CPU
...
SSE2 did not become a system requirement for Windows until Windows version 8.1, so anyone with a Windows version up to and including the original Windows 8 could be running it on a CPU that doesn't have SSE2

Summary:
Anyone with a 32-bit AMD CPU or an Intel CPI prior to Pentium IV, on any Windows before 8.1

Of course, @Thomas.

At my den I'm temporarily using a:

AMD Duron Turbo 1800+ (Flags: FPU VME DE PSE TSC MSR PAE MCE CX8 APIC SEP MTRR PGE MCA CMOV PAT PSE-36 MMX FXSR SSE SYSCALL MP MMXEXT 3DNOWEXT 3DNOW UP)
1200-1500MHz Speed

SiS-740 chipset

512 MB RAM - DDR

running GNU/Linux Debian 7 (stable).

The windows non-SSE2 build works fine under wine, but would it be too much to ask for a native GNU/Linux non-SSE2 build?

I'm at your disposal.

I think we don't provide Linux binaries at all, but leave that to the various MuseScore/Linux maintainers, so you'd need to twist their arms ;-)

I believe this is not a problem of musescore. If qt (or any library we use) does not support old hardware/operating system, then musesscore does not either. Usupported means that it might work or not or works partly or only under special conditions. It also means that we do not check (or cannot check) and if something that worked in a special mscore version might not work anymore in the next version.

Title MuseScore 2.0 beta 1 crashes on startup (apparently your program requires SSE2 instruction set) MuseScore 2.0 beta 1 crashes on startup (requires SSE2 instruction set)
Severity S1 - Blocker
Status active closed
Regression No
Workaround No

No further fixes for MuseScore 2 and SSE is needed in any case, by Qt.