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!


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:
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)

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