Error loading my mscz file

• Apr 28, 2020 - 14:53

Hi! I deleted accidentally the file I was using but I used a software and I recovered it, but when I open the files, the program says that the file cannot be loaded because of an error. Any ideas for recovering it? I am going to attach the two files that my software recovered. Thanks a lot!


Comments

In reply to by Jojo-Schmitz

Just debugged this. Turns out the zip file is corrupted at the very end. Fortunately, the corruption affects only the thumbnail and not the all-important .mscx score file. Unfortunately, the tail end of a zip file is also where the end-of-central-directory record is stored, and MuseScore bails out if it can't find that — unlike many other zip apps that are more fault-tolerant because they recognize that the end-of-central-directory record is redundant. There's room for improvement here.

The error message displayed to the user is also far from helpful, in this case due to an empty case statement for Score::FileError::FILE_NO_ROOTFILE inside readScoreError().

In reply to by Spire42

The error message indeed isn't helpful:
error.png
What would be a helpful error message in that case?
Just appending "no root file" maybe be better than nothing, but still seems pretty cryptic. And in this case wrong too, as the root-file exists and can even get opened (even if not with MuseScore).
Actually in a Debug build it also prints "can't find container.xml" (which also doesn't make too much sense, as that too does exist and can get extracted)

In reply to by moviemaker5000

Okay, say you have a MuseScore 4 file: "BIG concert band piece.mscz" which has corruptions.
The ".mscz" file extension denotes a compressed file. Use a software like 7-Zip to decompress. (Depending on which software you use, you may need to re-name the ".mscz" file suffix to ".zip")

In the newly uncompressed folder look for "BIG concert band piece.mscx" - notice the .mscx file extension. Open this "BIG concert band piece.mscx" in MuseScore 4 and see if it is corruption free and usable.

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