Corrupted File

• Apr 4, 2023 - 14:12

Hello.

Attached I have a file I have been working on for the past week or so. It contains about 30 pages of music and it is by Beethoven. However, this morning the file corrupted on me when I was finishing engraving.

I don't want to lose that much work. Is their any way someone can help me?

Attachment Size
Opus 1 No. 1 (Full Score).mscz 0 bytes

Comments

In reply to by leeayres01

Sorry to hear you're having trouble, but almost certainly, there is a way to get your work back.

While the specific details in the article mentioned before are about MU3, the same basic principles apply to MU4. Things are just bit simpler now. The backup file is in a folder underneath the folder where the score itself lives. The autosave file is in the same folder as the score, with the word "autosave" appended. Turn on display hidden files & folder in your file browser and you should be able to find both.

Also, on many systems, there is automatic cloud sync and backup/versioning of your files you can use to restore to a previous point. E.g., on Windows, unless you disabled OneDrive, it probably made copies for you that you can restore easily.

In reply to by Jojo-Schmitz

Hi jojo i would really appreciate your help if you could please help me figure out how to restore this corrupted file I have as well from musescore 4. I have the same error as the original user and I was able to find the backup score but when I try to open the backup in musescore 4 it says it is corrupted as well so I was wondering if you can help me out. I tried converting it to an xml file but I cant do so unless I can open the file in muescore itself, no online converters work (i was thinking once in mxl I could open it in musescore 3 and that then it might work). I cant open it in musesocre 3 at all because it gives me an error. I am not sure if opening it in musescore 3 would even work but I was just trying anything. I will attacth the backup file and please let me know if you can help me out asap. I have lost over 15 hours worth of work probably if I cant recover this. PLease let me know if you want me to do anything else as well.

Attachment Size
Anime ed.mscz 65.26 KB

In reply to by leeayres01

> I tried to do that earlier, a message popped up saying that it was an unsupported file type
It is a backup file. Its name is ".Opus 1 No. 1 (Full Score).mscz~". You need to remove the dot at the beginning of the name and remove the tilde at the end of the extension - the convention for MuseScore backup files.
Unfortunately, Windows does not display the extension by default. You have to enable this in the options from Explorer.

The file can then be opened normally (if it is not corrupted) and also attached here.

In reply to by HildeK

omg thank you very much!! What do you mean backup file? I have a pdf but it doesn't have an accompaniment yet. The matcha that I sent have the accompaniment and I saved it before it got corrupted, but I don't have a copy for a matcha pdf that has accompaniment. Is there no other way to retrieve or locate the mscx file of matcha?

In reply to by nikkoplaza30

> What do you mean backup file?
Musescore creates hidden files and folders where backups are stored.
For Windows and MuS 3.6.2 there is a folder .mscbackup (it is hidden) and in this folder there is a file with the name ".NAME.mscz~". If you find such a file, remove the dot at the beginning and the '~' at the end and try it.

And here: C:\Users\USERNAME\AppData\Local\MuseScore\MuseScore3
are also files with random names. But AppData is also hidden.

Hidden files and folders can be made visible in the options of the file explorer.

Of course a PDF is not the backup I meant. But to make regular backup copies on e.g. an external disk is recommended anyway. Also for all other files you have created yourself.

In reply to by nikkoplaza30

As I work with MuS 3.6.2 it is sufficient to press save from time to time.
I don't know on which action MuS 4 corrupts files. There are a lot of different types of corruptions reported here in the forum.
Some are caused by the zip action (mscz is a zipped file), others leave empty files, or files with only zeros - there are different errors probably caused by different actions.
If the causes were well known, they would have been fixed long ago.

In reply to by HildeK

To be clear: the bug where occasionally files get corrupted by becoming empty or filled with zeroes or having an invalid header exist with 3.6.2 too and are indeed far more common in that version than MuseScore 4. Saving files often is good in any version, but it won't prevent this bug from occasionally striking. Seems to happen on average once every million saves or so, based on the number of users we are known to have, the numbers of scores posted on musescore.com, and the number of reports here. Clearly, it happens during the save, but the big unknown is, why does it happen on some saves but not the vast majority of others> So far no one has come up with precise steps to reproduce the problem.

I personally suspect it has to do with something else going on at the same time. Like if the save happens at the exact moment some other process - like a backup service - is attempting to access the file.

In reply to by nikkoplaza30

You should absolutely save often, not for any reasons related to this particular extremely rare bug, but just because it's common sense good practice with any computer program. Work not saved is work that can potentially be lost, and that happens far more often than an actual save operation going awry.

In reply to by Jojo-Schmitz

True, but only "regular" score corruptions, not these weird ZIP issues (empty archive, file filled with zeroes, bad header, etc). There is no reason to believe frequency of saving would have any impact on the likelihood of those kinds of errors presenting problems. Whatever one-in-a-million or so chance there is of a save going bad, it would apply equally to your most recent save whether the previous save was a minute earlier or an hour earlier.

Actually, though, the more frequently you save, the better the chance your backup will be useful, at least in MU4. In MU3, backups were only created once per session, but in MU4, they are created on each and every save. The chances of both the original file and the backup both being affected by one of these ZIP issues is extremely low, but with MU4, if you save often, the backup will be as recent as your second-to-last save. In Mu3 - or if you don't save often in MU4 your backup will likely be extremely old.

So again, saving often is just good common sense.

In reply to by rczerin

The MSCZ file only contains a lot of bytes of value 00. The zip file contains the title of the MSCZ file and a section of compressed data equivalent to 36k of 00's. This is a failure of the file to compress and save properly but whether it is the fault of MuseScore, the Qt library or Windows i can't tell. I have my suspicions, though, never having seen it in Linux.

In reply to by Jojo-Schmitz

Hello. First off just wanted to say how I'm grateful for all the work you do (repair plugin + helping others from what I've seen).

I've tried loading the backup (which still comes up corrupted), opening with 7zip, etc. Whenever I try to open the score normally, it gives me the XML_ERROR_EMPTY_DOCUMENT message seen above. If I open it from my fie explorer, the application opens but it's just a blank background with the palette on the side.

I've attached the original file below.

Attachment Size
The City Revision.mscz 64.3 KB

In reply to by Desertanu

Take advantage of the various automatic cloud backup services that are out there. On Windows, for instance, unless you go out of your way to disable it, OneDrive is always there making backup copies for you, so that might be an option for you. On macOS, Time Machine can be set up to do this (not sure if it happens by default). Various packages are available for Linux. You can also set up Google Drive or Dropbox to automatically sync to your computer, and then use a folder on one of those systems to save your scores.

In reply to by nguyenhenry22

As with many of these "corrupt files", they contain nothing but thousands of bytes set to 00.

The first thing I do with these queries is read the file using an editor (in this case, Bless in ubuntu, but there are similar programs for other platforms). If it's all 00 then Game Over.

Screenshot_20240118_003435.png

MuseScore .MSCZ files are .ZIP archive files, so If it contains data along the lines of "50 4B 03 04 14 00 / PK........." then try a ZIP repair program or extract the ,MSCX file or delete the Excerpts folder.

Next person to ask the same question, please try opening your file in the latest stable version of MuseScore and then try reading it with a file editing program and then look for backups if your file is empty or try an archive program if it might still contain data.

In reply to by underquark

Here's another example. I did Ctrl-s many times as I went. Both my last file and the autosaved version (renamed) are attached. Both have one corruption
Error=XML_ERROR_EMPTY_DOCUMENT ErrorID=13 (0xd) Line number=0
and neither will 'open anyway'. Must one not only keep saving but keep saving with new names, or check each saved file??

In reply to by jwpratt

@jwpratt
Attached is a recovered version of Mvt 4. This is what I did:
1. Using the free 7-Zip tool I opened the Zip archive of your .mscz file.
2. In 7-Zip I deleted the entire "Excerpts" folder - that deletes all the parts, leaving only the full score.
3. In 7-Zip I extracted the .mscx file of the full score.
4. With Mu4 I opened the .mscx file and saved it as a new .mscz file.

"Must one not only keep saving but keep saving with new names, or check each saved file??"
I can't answer that question, because I am still using Mu3 for all my serious work. Judging by the corruption reports, Mu4 still has some way to go before it can be regarded as "mature".

In reply to by HildeK

"Perhaps it is enough to delete the "Excerpts" folder in 7-zip."
Sorry, but that doesn't work on its own. Mu 4.2.1. wrongly reports ERROR_EMPTY_DOCUMENT:
Mu4_ERROR_EMPTY_DOCUMENT.png

But extracting the .mscx file shows that the file is certainly not empty - it has real content. When viewed in Notepadd++ the file has 122340 lines and size 3507KB, shows the expected structure and opens in Mu4.

In reply to by DanielR

Yes, it is clear that the document is not empty. Otherwise MuS 3.7 wouldn't open the mscz without an error.
This "XML_ERROR_EMPTY_DOCUMENT" message seems to be used for many different problems and has little significance. This is my impression from the many scores for which MuS 4 reports this error.

In reply to by Jojo-Schmitz

OK, it can happen.
However, I was confused by the posts by mercuree, who once wrote:
the file opens fine if you simply add a dot at the beginning of the file name
and then further down:
I fixed ... by removing the period at the beginning of the file name
???

In reply to by DanielR

Many thanks, but that file behaved the same way for me as my original file. Removing the . in front didn't help. I had already tried that with my file, btw. I am using 4.2, probably by now updated however the management urges. Marc S strongly recommended 4.2 over 3.6 long ago, for much better layout, and I thought by now it would be safe. The placement of slurs, for example, does indeed seem much better.

Hello.

I am posting this on behalf of my daughter who has also experienced a 0 bytes file corruption on saving her A Level composition this weekend.
Is there any chance of retrieving all her hard work - feeling devastated.
Apologies if this isn't the correct way to ask for help - never encountered this before.
Her usual iCloud backup has just saved the 0 bytes corrupt file in backup but I have this version attached below.
So grateful for any help at all..

Amanda

Attachment Size
Brief Composition Wind Quartet.mscz 95 bytes

In reply to by HildeK

Thank you. So the file she has been working on and saving to her desktop backed up in iCloud has corrupted on pressing 'save' this final time on Sunday?
Assuming now she has to go back to Nov 29th version and repeat all her hard work.
What advice to stop this happening again please?

In reply to by clementsa24

I don't remember having this problem in the past with MuS 3.6.2.
My advice, which applies to all important documents that you don't want to lose: Make regular backups! After every (major) change resp. some hours of work, save the score under a new name, preferably on a USB stick or an external hard disk, for example.

In reply to by underquark

I already have a dizzying number of files, so a new name every half-hour or so is not practical. Alternating between two is more practical, but then it seems one must check that the latest save is not corrupted before moving on, a considerable nuisance. That's what I had in mind when I asked, "Must one not only keep saving but keep saving with new names, or check each saved file??" Other suggestions are beyond my paygrade.

In reply to by jwpratt

If you're on Windows, then unless you went out of your way to disable OneDrive, you already have a version history kept automatically. If for some reason you did disable it, just re-enable it now. It's a life saver. On macOS, check out Time Machine. Or use a Google Drive or Dropbox folder to save your scores to, and these are also backed up with version history completely automatically.

But also, for perspective: I have been a heavy (to say the least!) user of MuseScore for over 10 years. I can't even begin to guess how many tens or even hundreds of thousands of saves I've done. Once I had a glitch saving that made a file unopenable; the backup was fine. And there are millions of users and probably millions of saves done every day, and we get but a small handful of reports of problems. It's not really something you need to worry that much about. Basic simple steps like making sure you have OneDrive / Time Machine / Google Drive / Dropbox enabled are simple peace of mind for the one-in-million chance of file becoming inaccessible for whatever reason - not just in MuseScore, but in any program. I've used those services to bail me out of all sorts of problems. If you're not using one or something like it, make that #1 priority and then there is nothing further to worry about.

In reply to by jwpratt

@jw pratt:
"I already have a dizzying number of files..."

Well, then, I fear that you will continue to face the problems that you have. I repeat, "saving" a file doesn't save it, it just overwrites the existing file and that is fine if everything goes well but not fine if it doesn't. Good luck with your own strategy.

Poor guy, but the file is... well...

I noticed that the musescoer can get a hide-mode backup file. You can scan dir /ah in the cmd to show the hide-mode file. it's name will be .xyz.mscz, or .xyz.mscz~. turn their name into .xyz.mscz and you can find your job.

Attachment Size
无标题.png 196.42 KB

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