musescore crashes on save-as
I'm attaching the score which I captured using musescore 3
museScore version="3.01">
3.2.3
d2d863f
When I open this score, and change two particular notes, then attempt to save-as (same file name with .mscx extension) Musescore crashes.
I'm also attaching the log file.
To reproduce,
1) open the score Geminiani-Sonata.mscx,
2) find measure 3, the piano base line, the last two notes are D D
3) change these notes to B B (down 1 staff line)
4) File -> Save As
5) Change file type from *.mscz to *.mscx
6) press Save
7) A dialog box will as to confirm, press Replace.
Musescore will think for a few seconds and then crash.
Attachment | Size |
---|---|
crashlog.txt | 97.69 KB |
Geminiani-Sonate.mscx | 433.85 KB |
Comments
I'm not at my computer, so can't check myself, does the score have parts? If so, try removing them, if save works then, regenerate them
In reply to I'm not at my computer, so… by Jojo-Schmitz
Sorry, no, it does not have parts in this one.
In reply to Sorry, no, it does not have… by jim.newton.562
It looks like all I have to do for the crash is just open and then do a save as .mscx, no modification is necessary. It can save as .mscz just fine.
No crash for me doing a save as / mscx, on Windows, current 3.3 build.
In reply to No crash for me doing a save… by Marc Sabatella
Thanks for testing it. Unfortunately, it seems Musescore crashes for me on any/every save-as mscx. It is not limited to the score I uploaded. I can save as normal mscz file without problem. I also have no problem exporting to musicxml.
In reply to Thanks for testing it. … by jim.newton.562
I changed to the GeneralUser sound font recently. Could it be related to that?
In reply to I changed to the GeneralUser… by jim.newton.562
I doubt it, but you'd know when you try without that...
In reply to I doubt it, but you'd know… by Jojo-Schmitz
I'm not 100% sure how the sound fonts work. I don't think I'm using GeneralUser, It is just available in my path.
In reply to I'm not 100% sure how the… by jim.newton.562
I'm going to try to compile musescore myself on my new laptop. In doing so I have a small installation problem, explained in this issue https://musescore.org/en/node/296524
Could someone give me a bit of advise?
In reply to I'm going to try to compile… by jim.newton.562
All Infos needed should be available in the developers' handbook. And then there's the developers' chat on Telegram
In reply to All Infos needed should be… by Jojo-Schmitz
What does "should" mean. Do you mean that you think it is there, or do you mean that if it's missing we should add it? If you mean the first, then can you give me a pointer of where to start looking?
In reply to What does "should" mean. Do… by jim.newton.562
It is there, but, being living documents and a moving target, may not be 100% correct and complete
No crash for me, Windows 7, MuseScore 3.2.3
In reply to No crash for me, Windows 7,… by Jojo-Schmitz
Is there anything screwy about the crashlog.txt I attached? Looks to me like it crashes in a qt handler, which seems strange. But perhaps the qt handler is the save-as callback?
In reply to Is there anything screwy… by jim.newton.562
yes it is probably that.
I see the following in the log file. Is that normal?
Logical CPU: 6
Error Code: 0x00000004 (no mapping for user data write)
Trap Number: 14
In reply to I see the following in the… by jim.newton.562
When I try to save-as, it asks me to confirm overwriting an existing file. But then it seems to crash without touching the file, the file is still intact.
In reply to I see the following in the… by jim.newton.562
This is macOS Catalina, right?
ISTR that there MuseScore needs to get give permissions to access certain folders
In reply to This is macOS Catalina,… by Jojo-Schmitz
Yes, Catalinia 10.15. Is that bad?
Sorry, what is ISTR?
In reply to Yes, Catalinia 10.15. Is… by jim.newton.562
No Catalina isn't bad, just (possibly) different
ISTR > I Seem To Remember
In reply to This is macOS Catalina,… by Jojo-Schmitz
Are different folders used for save as mscz vs mscx?
In reply to Are different folders used… by jim.newton.562
No
In reply to Are different folders used… by jim.newton.562
It is possible that you updated MuseScore and didn't give it permission to write in that folder with the new version and that is the issue. A previous version created the score and the new one can't replace it without permission.
In reply to It is possible that you… by mike320
I checked, and the permissions seems correct. The file is writable and the directory as well.
In reply to It is possible that you… by mike320
If that's the case, the issue is to crash instead of giving a clear error message
I have some new information. I just now downloaded the new version.
OS: macOS 10.15, Arch.: x86_64, MuseScore version (64-bit): 3.3.0.24090, revision: 4761df6
With this version, I can open a score (saved previously), and I CAN save-as the score as .mscx into a NEW file name. Then immediately try to re-save the same score as the same file as before, and musescore crashes.
I.e.,
1) open a score saved previously
2) make sure no file named "xyzzy.mscx" exists
3) save-as xyzzy.mscx
4) again save-as xyzzy.mscx
In reply to I have some new information… by jim.newton.562
@jim.newton.562 I just tested this on Windows 10 and it worked as expected. I say this to help in diagnosing the problem. It is clearly a Mac only problem.
BTW, the reason that I'm so interested in save-as .mscx is because I always save in this format. Why? Because I keep my scores in a local git repo, and text files only need to save the diffs in successive versions of the repo. I.e., I don't have to save 100s of binary zipped files, just 100s of diffs of successive versions.
I just tried save-as mscx on the newest download version and worked. No crash. Then I repeated exactly the same action and it crashed again.
OS: macOS 10.15, Arch.: x86_64, MuseScore version (64-bit): 3.3.2.24203, revision: 492d7ef
So I continued testing. After restarting I saved-as the score to /tmp/test.mscx, and it worked. Then I saved-as again as /tmp/test1.mscx, and it worked. Then I saved-as a 3rd time to /tmp/test1.mscx, it asked me if I wanted to overwrite the file; I answered yes, and it crashed.
In reply to I just tried save-as mscx on… by jim.newton.562
I've just tried this again on musescore version 3.4.2.25137 (3.4.2.25137) and it still crashes on save-as mscx.
Process: mscore [51566]
Path: /Applications/MuseScore 3.app/Contents/MacOS/mscore
Identifier: org.musescore.MuseScore
Version: 3.4.2.25137 (3.4.2.25137)
Code Type: X86-64 (Native)
Parent Process: ??? [1]
Responsible: mscore [51566]
User ID: 501
Date/Time: 2020-03-29 14:24:17.475 +0200
OS Version: Mac OS X 10.15.3 (19D76)
Report Version: 12
Bridge OS Version: 4.2 (17P3050)
Anonymous UUID: 71666555-47A2-B665-59F8-CFD83B7A508A
Sleep/Wake UUID: AD6C04D4-F8E1-453A-86E5-546C1EEEA7F5
Time Awake Since Boot: 1500000 seconds
Time Since Wake: 180000 seconds
System Integrity Protection: enabled
Crashed Thread: 0 CrBrowserMain Dispatch queue: com.apple.main-thread
Exception Type: EXC_BAD_INSTRUCTION (SIGILL)
Exception Codes: 0x0000000000000001, 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY
Termination Signal: Illegal instruction: 4
Termination Reason: Namespace SIGNAL, Code 0x4
Terminating Process: exc handler [51566]
Application Specific Information:
Crashing on exception: unexpected class type for sandbox extension string!
In reply to I've just tried this again… by jim.newton.562
any idea what this means?
Crashing on exception: unexpected class type for sandbox extension string!
In reply to I've just tried this again… by jim.newton.562
Please share the score
Or is it still the same as in the initial post?
Has this ever been reported in the issue tracker?
In reply to Please share the score by Jojo-Schmitz
no, as far as I can tell it happens with every score. Nevertheless, I'm happy to attach the current score.
In reply to no, as far as I can tell it… by jim.newton.562
OK, I (still) can't reproduce, MuseScore 3.4.2 on Windows 7
So if anything it seems specifc to macOS?
Google finds several: https://www.google.com/search?q=unexpected+class+type+for+sandbox+exten…
(BTW, Bach's 1st name is "Johann" and his 2nd name is "Sebastian")
In reply to OK, I (still) can't… by Jojo-Schmitz
Do we have anyone else using MacOS who can give it a try?
In reply to Do we have anyone else using… by jim.newton.562
There sure are. Not me though
In reply to OK, I (still) can't… by Jojo-Schmitz
I suspect it has something to do with the .msx file already existing. I can ?sometimes? save-as once, but never twice.
In reply to I suspect it has something… by jim.newton.562
I'm going to try to compile it myself. .... more to come
In reply to I suspect it has something… by jim.newton.562
I've tested this a few times, and it seems that if I always remove the .mscx file before a save-as, it can save without crashing, but if I try to save-as (.mscx) over an existing file it crashes.
In reply to I've tested this a few times… by jim.newton.562
Is it only with MSCX, not MSCZ, then? I can't reproduce in either case, but that would be useful info. My best guess though is that you have some corrupt MSCX file in the folder you are trying to save to, and the crash happens upon trying to generate thumbnails.
In reply to Is it only with MSCX, not… by Marc Sabatella
the thumbnails for the startcenter that would be, I guess
In reply to Is it only with MSCX, not… by Marc Sabatella
Well I've tried saving into my normal directory and also saving into /tmp.
I can save-as multiple times if the extension is .mscz.
And indeed I can save-as into /tmp once as .mscx, but then when the file already exists,
and I try to save-as .mscx a second time, it crashes.
In reply to Is it only with MSCX, not… by Marc Sabatella
Where are the thumb nails?
I created a new, empty directory, and tried to save-as to there, and the same thing happens.
I can save-as once a .mscx, but the second time it crashes.
If I remove the .mscx file, then I can save-as a second time.
In reply to where are the thumb nails? I… by jim.newton.562
Good question, somewhere inside MuseScore's cache I think
In reply to Good question, somewhere… by Jojo-Schmitz
ahhh, so not in the directory I'm saving to?
In reply to ahhh, so not in the… by jim.newton.562
May not even be on disk at all
In reply to OK, I (still) can't… by Jojo-Schmitz
About Bach's name. In English we use the German spelling, as you suggest. However, in French we use a different spelling: Jean Sebastien. Not sure why. But in my case I simply misspelled the name. Thanks for pointing it out for me.
Well, I found the cause of the problem, as well as a solution. See https://bugreports.qt.io/browse/QTBUG-83342 for details.
As a workaround, you can go to advanced preferences and uncheck ui/application/useNativeDialogs, since the problem is only with the native Cocoa save panel. Alternatively, if you would rather continue to use the native dialogs, you can prevent the crash by making any change to the name field, even if you then change it back to what it was originally. You must do this after changing the file type, if you are going to change the file type at all.
In reply to Well, I found the cause of… by mattmcclinch
I guess Qt 5.15.0 Beta 2 would be affected too, wouldn't it?
And as far as I can tell Qt 5.9 most probably won't receive a fix for that, with isn't end of life being in May
In reply to Well, I found the cause of… by mattmcclinch
Hi Matt, to be clear, are these workarounds the end user can apply? Is there action that can be made in the Musescore code, or do we have to wait for a new qt to be released and then a while for Musescore to adopt it?
In reply to Hi Matt, to be clear, are… by jim.newton.562
Every user can change that in the advanced preferences
In reply to Every user can change that… by Jojo-Schmitz
Hi Jojo, just so this thread explains what's necessary to know: if a user changes that in his preferences, and quits and restarts, does he need to change the preferences again? How about when the user is prompted to download an upgraded version, will that respect the preferences as well?
In reply to Hi Jojo, just so this thread… by jim.newton.562
If MuseScore is quit normally (not a crash) the preference will be persistent.
It'll also survive all minor updates (so all 3.x.y releases), major versions get their own set of preferences (4.x)
In reply to Hi Jojo, just so this thread… by jim.newton.562
It is a preference like any of the others, so persists until a factory reset
In reply to Well, I found the cause of… by mattmcclinch
First of all, thanks @mattmcclinch, for identifying this workaround.
I have run a test, and the advice seems to work.
It will take a while for me to grow accustomed to the new dialog forms.
In reply to I have run a test, and the… by jim.newton.562
Apparently you can also keep the other dialog form, but then you need to make sure that when you save to an existing file you "touch" the file name in the dialog before saving.
For example if the name of the file ends by the letter 'e', remove that letter, then type it again, then press save.