[CORRUPTED FILE] Error MSCX in line ... : unvalid bar length -2/8

• Feb 16, 2021 - 15:43


I can't open my file anymore, it is very embarassing because it took me hours to do it.

I got this error (French) :
- "Le fichier ... est corrumpu et ne peut pas être traité."
- "Montrer les détails : Erreur MSCX à la ligne 4453 : longueur de mesure non valide : -2/8"

The details specifies me that I have a negative bar. I got this error after deleting a 4/4 bar which i changed into 19/8.

Fortunately, i saved few minutes ago the score into a pdf : here is the moment where is the bug, in the last system of the page. With the -2/8 negative bar, there were the end of bar 18 and beginning of bar 19 playing at the same time

Attachment Size
Error 1.PNG 10.94 KB
Error 2.PNG 52.99 KB


I precise that i was editing individual piano part and then i went back to the main score, edited it (this passage specifically), it crashed.

In reply to by kwamena

I can see a path to recovery, but it will take work. First, open the MSCZ file in a ZIP program and extra the MSCX file. Now edit that MSCX file in a text editor and look for all occurs of -1/12. You'll need to fix them, and probably the least painful will be to remove everything within the Measure tags, including those tags themselves. There are quite a few of these, so you'll be at it a while And it will probably mess up the placement of lines in your score like voltas and hairpins. But it's better than nothing.

In reply to by Shirly Lyubomirsky

Assuming the score was at one point not corrupt (i.e., it didn’t start off life in MuseScore as the result of importing an already-corrupt MusicXML file), the root cause of any subsequent corruption is always, some bug in the program where a particular editing action produces unintended consequences. In other words, it’s never anything you are doing wrong, but it’s something MuseScore for whatever reason is not handling properly.

If you attach the score in its corrupt state and describe some of things you were doing before it became corrupt, maybe someone will be able to figure out more exactly what happened so you can avoid doing that exact
thing in the future, and meanwhile we can begin working in fixing the bug that causes the problem.

If after correcting missing notes and saving, you find the file is still corrupt, that generally means you didn’t fix the problem completely
to be with. See https://musescore.org/en/node/54721 for suggestions. And again, if you need further help, attaching the score will allow others to assist better.

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