Trying to diagnose a freeze of MuseScore 2.0.2 on ubuntu when opening any file

• Aug 27, 2015 - 21:10

background: I setup a friend with a Lubuntu about a year ago on his Core2duo labtop (EDIT: the computer harddrive should be good, as I put it in a year ago, and it should have at least 2 GB ram) for purposes of running musescore. He it not too technically savy, but he has been running musescore 1.3 on it for a while and I helped him upgrade lubuntu to latest version maybe a couple months ago and upgraded to 2.0.0, and he has generally been using musescore successfully. All of my help has been remote over phone and text messages.

Today he calls and said that MuseScore freezes the moment that he opens any file (i.e. the moment after selecting a file and pressing the Open button in the Load Score dialog). I went through standard procedure to diagnose. First I asked him to email me a file, which I'm able to open just fine on my computer. That determined that the file is not corrupted. So then I got him to do a factory reset. That didn't fix the issue. So then I got him to download the latest nightly musescore from the build page, and interestingly that nightly musescore was able to open files. However that nightly was an outdated commit 3543170 (although interestingly now in that last hour I see that the nighly build page now has builds of the latest commits...I'm might ask him to try a new nightly actually I was accidentally looking at windows nightlies which have latest release...linux nightlies are still out of date).

Anyway, then I thought to try musescore 2.0.2 release, so I got him to install the kxstudio .deb repo and install musescore and verified that he had 2.0.2, BUT the musescore still froze upon opening a file. I asked him to run musescore from terminal and report the output when loading file, but there was no new terminal output when trying to open the file (I suspect musescore froze before was able to even report any terminal output).

I'm going to meet up with him to diagnose on his comupter directly, but can anyone give me some advise as to what might be the problem or how I should diagnose this?

I asked him if he had done any new configuration to computer or sound settings, and he says he hadn't, other than download Ubuntu's auto updates.


I'm kind of surprised the factory reset didn't work, as everything else makes me think the issue is a corrupt file in the "recent files" list that MuseScore is hanging on while generating the thumbnail for. Hmm, maybe it's not just "recent files" but soemwhere else in the same folder. Have him move everything out of that folder for now except the file he wants to open.

If that doesn't work, have him try the reset again, and in so doing, launch from the terminal, and report any output he sees there.

In reply to by Marc Sabatella

I talked him through moving all files except one that I know is not corrupted and told him to open from terminal. Froze both time, before & after the factory reset. I forgot ask him what he saw in terminal output before actually opening...but when the crash occured upon opening, there was no new output being printed.

I'm going to grab his computer tomorrow and will try to figure out what is going on...but any further advise is welcome. I suppose I might try compiling the latest git build to see if bug is fixed. And I'll try running mscore in the qtcreator with debugger and will report what function and line the freeze happens.


In reply to by Marc Sabatella

I have his computer. I can experience the freeze whenever open scores via Load Score dialog.

Freeze doesn't only happen when I actually open a score, but also happens when I press *Cancel*.

I am able to open the "Getting Started" score via the *Start Center*, and displays and plays fine. I am able to save the Getting Started score fine, but if I try to reopen it via File->Open, it freezes.

I am able to open .mcsz files via the command line.

I don't see any new terminal output when the freeze happens. other than standard messages I've recognized before experienced before. Upon executing mscore -F, I get

initScoreFonts 0x470b140
init Help from: 
cannot setup data for help engine: Cannot open collection file: /usr/share/mscore-2.0/manual/doc_en.qhc

I don't see any new terminal output when I open Getting Started via the Start Center.

I'm able to see the preview all .mscz files he has, without producing any freezes...a few of them will produce terminal output when preview, but I really don't think any of these terminal outputs are indicative of the problem that is causing the freeze (a lot of these look like standard corruption warning messages). I'm copying all the unique terminal output that comes out here...just in case you reconginize something suspicious:

unknown symbol , falling back to no symbol
Articulation: unknown 
TDuration::setType(): unknown, assume "quarter"
setDynamicType: other <ff>
layoutX: empty segment(0x6c93b60)ChordRest: measure .............(some more stuff here)

On file that is happens to be 0 bytes big produces output

QZip: not a zip file!
QZip: not a zip file!
can't find container.xml

When I select a folder, output says

unknown file suffix <>, name 

When navigate to an empty folder and, output syas

unknown file suffix <>, name <>

At this point I'm going to install the qtcreator and run the debugger.

compiled "make debug" of latest git debug version, and it works fine without freezing. Could any dev enlighten me if they can think of some bug that was fixed since 2.0.2 that might explain this?

I'm trying a "sudo make install" now to see if it has to do something with being installed.

All folders in ~/Documents/MuseScore2/ are empty, and I don't see any funny permission settings.

Now I'm sortof suspecting this is some wired qt bug, not musescore, because when I start qtcreator and press open project, and either select the MuseScore git's CMakeLists.txt and press open (or if select nothing and press cancel), then a similar freeze happens. If I instead login to ubuntu with a new clean user account, then I don't experience this freeze when opening a project.

Any conclusions?

In reply to by ericfontainejazz

I tend to follow your conclusion, it's something due to the interface between this particular user file system and the (non native) Qt dialog. You might want to try something.

* Open the preference file and look for nativeDialogs
* It should be false, set it to true and try to reproduce the bug.

On linux, MuseScore uses the Qt FileDialog and add some folders to the left side column. On mac and windows, MuseScore uses Qt to open the native file dialog of the system. This behavior is governed by this flag in preferences.

In reply to by [DELETED] 5

I am able to switch nativeDialogs between true and false in ~/.config/MuseScore/MuseScore2.ini, I can see the different visaul in the load/save score dialogs. However, the freeze still occurs whether I'm using native dialog or not.

Interestingly, I've noticed that the mscore process never actually finishes after I closed musescore. I know this because I'm executing mscore from terminal, and I never see a return to bash script, and because when I look at top, I see the mscore process is still listed and using about 2% of CPU (so it must be stuck doing something, probably in some infinite loop).

action nativeDialogs = true nativeDialogs = false
Quit Musescore without doing anything freeze on quit freeze on quit
press "Cancel" in Load Score dialog freeze when press "Cancel" freeze when press "Cancel"
Press "X" to close Load Score dialog freeze when press "X" freeze when press "X"
open recent score in Start Center success success
open score in Load Score dialog freeze when press "Open" freeze when press "Open"
save unchanged score pressing the Save button in toolbar or via Ctrl->S success success
save unchanged score via FIle->Save As freezes when press save, but file is resaved successfully does not freeze when press save. I don't see the file modification time increase to current time. Musescore works. however, when quit musescore, mscore windows close, but mscore process is still persisting
save modified score in Save Score dialog freeze when press "Save"

So almost the same behavior behavior, except when saving an unchanged score via File->Save As. This got me thinking that maybe something has to do with the .ini file. I looked at permissions of the config is relevant parts of output of ls -latr .config/MuseScore/:

permissions size date filename
-rw------- 6181 Aug 21 14:22 MuseScore2.ini.WX1456
-rw-r--r-- 0 Aug 21 14:22 MuseScore2.ini.lock
-rw------- 6201 Aug 29 15:39 MuseScore2.ini

The .lock file is very suspicious, and is dated approximately the time that my friend said he first experience this problem. So out of curiosity, I removed all files from the .config/MuseScore/ directory, and executed mscore -F, and now I am able to open, edit, and save scores just fine. However, upon exiting musescore, the mscore process still hangs around without finishing (If im in the terminal, I have to press ctrl->C or I have to open another terminal and killall mscore. After doing that, then the output of ls -latr .config/MuseScore/ is:

permissions size date filename
-rw------- 3953 Aug 29 15:56 MuseScore2.ini

I don't see any .lock file. To determine whether the .lock was what was messing things up or not, I logged out of his user account and loged into my new fresh user account, first verified that musescore works correctly on the clean user account, and then executed:

touch .config/MuseScore/MuseScore2.ini.lock

and then started mscore -F. I first notice that the .lock is still in the config directory. Now when I try to open a file (or infact do any action that would cause musescore to try to modify the .ini file), musescore freezes on the spot. If I remove the .lock while while the freeze is happening, then musescore gets out of its freeze state and successfuly completes the action and updates the .ini file. Since I have replication steps, I'm going to file a bug report stating that mscore -F command does not delete a .lock file if present, and my suggested fix is that mscore -F delete any .lock file.

In reply to by ericfontainejazz

Here is my bug report #75071: mscore -F does not delete ~/.config/MuseScore/MuseScore2.ini.lock, causing musescore to freeze whenever try to modify the .ini. Please move discussion there, now that I have replication steps via touching the config .ini.lock file.

Note: even after deleting the .ini.lock file when logged into my friends user account, the mscore process still does not fully exit after I have quit musescore. I don't see any .lock file in the .config directory when it is the frozen exit state. However, just by suspicion, I went and did "rm -Rf ~/.local/share/data/MuseScore/" and then musescore would be able to successfully exit. However, the next time I run musescore, then musescore still hangs on exit. Doing "rm -Rf ~/.local/share/data/MuseScore/" again would then allow musescore to succesfully exit when quit. I don't know how to fix this hang on exit.

Do you still have an unanswered question? Please log in first to post your question.