File Names & Corrupt Fie Error
Howdy --
I know that it's contrary to most modern practice, but my preference is to have capitalized filename extensions (e.g.: .TXT, .MSCZ, .WAV, etc.). I prefer it because I like to be able to distinguish file types at a glance.
I just started working on my first score with MuseScore, and I saved my work with a .MSCZ extension. MuseScore did not complain, and appeared to be saving my work. Next day, I attempted to open the file on which I had been working, and I got a dialog box informing me that the file had become corrupted. One option presented was to open it anyway. I chose that option, and got a big empty nothing.
I had a feeling. I've been an IT professional for decades. I had a suspicion. I renamed the file, just changing the extension to lower case and, voilà, the file opened without error.
This error is reproducible. I tried restoring the upper case extension and the error returned.
OS: Windows 8.1 (6.3), Arch.: x86_64, MuseScore version (64-bit): 3.6.2.548021803, revision: 3224f34
-- Herb
Comments
It would be great if you could report this on the Issue Tracker:
https://musescore.org/en/project/issues/musescore
In reply to It would be great if you… by DanielR
Done.
In reply to Done. by Herb Ray
Thanks for #324413: File Names & Corrupt File Error
MuseScore never by itself creates files with uppercase extensions though, not MuseScore 3.6.2 on Windows 10 anyhow.
If you try, it won't save at all.
So I guess you must be renaming them manually?
the fix seems an easy one-liner (for 3.x, seems more involved for master, AKA MuseScore 4?):
That at least allows opening them. Still won't allow for saving them with anything but an all lowercase extension.
Maybe similar changes are needed at some other places too, like all other import formats. That method is used already for .gtp, .gp and .gpx import (GuitarPro), but as far as I can tell those are the only ones.
Funny enough for .mscx vs. .MSCZ this is not an issue, neither for .XML, .MXL or .MUSICXML, so maybe only MSCZ is the problem here? In that case it really is just that one liner above (at least as far as opening such a score, not as far as creating it)
In reply to the fix seems an easy one… by Jojo-Schmitz
Jojo - -
I created the score in question from MuseScore directly with upper case extension. I did not rename the file outside of MuseScore.
The problem evidenced itself after having closed MuseScore, and then going back in to further edit the score. I was attempting to open the same filename that MuseScore had saved.
In reply to Jojo - - I created the score… by Herb Ray
I tried to save a file with uppercase extension and could not make it happen.
Please describe how exactly you did it.
In reply to I tried to save a file with… by Jojo-Schmitz
Jo --
Per DanielR's request, I posted this in Issue Tracker.
I'm finding that this 100% reproducible.
-- Herb
In reply to Jo -- Per DanielR's request,… by Herb Ray
I still can't reproduce it directly, still can't save a score with an uppercase extension. If I try, MuseScore doesn't save it at all.
In reply to I still can't reproduce it,… by Jojo-Schmitz
I just installed MuseScore on a different machine:
OS: Windows 10 (10.0), Arch.: x86_64, MuseScore version (64-bit): 3.6.2.548021803, revision: 3224f34
I tested again, saving with caps, and then re-opening the file. Here's the sequence, with a confirming view of the file system.
In reply to I just installed MuseScore… by Herb Ray
As said, I can't reproduce. Saving with an all caps extension just doesn't do anything, no error, but no saved file either.
Windows 10, MuseScore 3.6.2
In reply to As said, I can't reproduce… by Jojo-Schmitz
Perhaps related to the underlying file system format?
In reply to Perhaps related to the… by jeetee
I just tried with the regular NTFS, but indeed maybe this is different with FAT.
Edit: no, I tried, same (non-)issue
In reply to I just tried with the… by Jojo-Schmitz
I can reproduce this error on two different machines: one is Windows 8.1, and the other is Windows 10. Both are on NTFS, on all drives.
No FAT.
No FAT32.
No HPFS.
No NFS.
I'm currently at a different location. I can try on a third machine if you'd like.
Are you testing on the same build as mine?
In reply to I can reproduce this error… by Herb Ray
Yes, the latest official MuseScore 3.6.2 version (OS: Windows 10 (10.0), Arch.: x86_64, MuseScore version (64-bit): 3.6.2.548021803, revision: 3224f34) and Windows 10 2021H1, NTFS and FAT (the latter on a thumbdrive)
In reply to Yes, the official MuseScore… by Jojo-Schmitz
I can confirm the inability to save with uppercase extension using OS: Windows 10 (10.0), Arch.: x86_64, MuseScore version (64-bit): 3.6.2.548021803, revision: 3224f34
In reply to the fix seems an easy one… by Jojo-Schmitz
I've added the above fix to my (ratther large) PR #9000, if you have a GitHub account you can download a 3.x development build from there.
For master (which will become MuseScore 4) there's PR #9052
Both should fix the inability to open such scores, none deals with the (dis)ablity to save them as such.
This is exactly what I did:
1. Opened MuseScore.
2. Clicked New Score.
3. Set the title to test.
4. Selected the Grand Staff template
5. Used the default settings for everything else.
6. Hit Ctrl+S.
7. Saved as C:\Users\XXXXXX\Desktop\MuseScore\test.MSCZ
8. Closed MuseScore.
9. Double-clicked on the new test.MSCZ file.
10. Got the same result.
OS: Windows 10 (10.0), Arch.: x86_64, MuseScore version (64-bit): 3.6.2.548021803, revision: 3224f34
Also, the drive's file system was NTFS.
This is undeniably (well, you can deny it, but you would be wrong) a bug.
In reply to This is exactly what I did:… by ThePython10110
The fact that MuseScore reports a .MSCZ file corrupt indeed is a bug, and with a known fix.
The part with saving it that way is still to be determined, I still can't reproduce it not wuth any of the steps you mentioned so far, it just doesn't save the file at all in those cases (and without an error message, which certainly is a bug).
In reply to This is exactly what I did:… by ThePython10110
Step 7 simply doesn't work here; the file is not saved.
Changing
ui/application/useNativeDialogs
seems to not affect this. For me MuseScore simply does not save a file with an uppercase extension.What we indeed can confirm is that if you have a file with an uppercase extension, it wrongly can't be opened (so step 9 and 10).
Are you by any chance using a different file manager than the default Windows File Explorer?
In reply to Step 7 simply doesn't work… by jeetee
I can definitely confirm that it saves correctly, but won't open. And yes, I am using File Explorer.
In reply to I can definitely confirm… by ThePython10110
This is really and truly strange and a mystery to me.
So far 2 users can reproduce (Herb and you) and 2 other cannot (@jeetee and me).
In reply to This is really and truly… by Jojo-Schmitz
I tried it to and for me (Linux Mint, 3.6.2 AppImage) score in . MSCZ doesn't save at all.
In reply to I tried it to and for me … by Pentatonus
Makes it 3 users that can't reproduce
In reply to This is really and truly… by Jojo-Schmitz
I can reproduce saving as .MSCZ and showing the resultant blank score (upon opening and ignoring the load error).
Looks like Jojo is on Windows 10
Version 21H1
I am running Windows 10 Pro
Version 20H2
In reply to I can reproduce saving as … by Jm6stringer
I am indeed. Ok, makes it 3:3...
In reply to I am indeed. Ok, makes it 3… by Jojo-Schmitz
Wonder why it's only happening for some people...
In reply to Wonder why it's only… by ThePython10110
Could be a Windows thing, perhaps version related as Jojo and I have different Windows 10 versions.
In reply to Could be a Windows thing,… by Jm6stringer
I'm also W10Pro 21H1 and not working
Edition Windows 10 Pro
Version 21H1
OS build 19043.1165
Experience Windows Feature Experience Pack 120.2212.3530.0
Edition Windows 10 Pro
Version 21H1
OS build 19043.1165
Experience Windows Feature Experience Pack 120.2212.3530.0
It saves fine, and opens blank.
In reply to Edition Windows 10 Pro… by ThePython10110
Maybe a Windows update broke it?