Empty xml element creates corrupt msc files

• Feb 2, 2010 - 15:19
Graphical (UI)
S2 - Critical

I have been creating a moderately-sized score using 0.9.6 Pre-Release (OS/X Leopard) with no difficulties at all. Then, quite suddenly, the file no longer opens: you get no page-display at all: the frame is completely empty until you click one of the 1/2/3/4 buttons, at which point you get a blank parchment-page.

Even more strangely... none of the Time Machine backups (which are made every few minutes...) will open, either!

A backup from yesterday also does not open. Same thing.

I have no difficulty with other scores, all of which open fine!

I've tried various "odd-ball" things, like removing everything in $TMPDIR, to no avail. Logging off/on didn't work either.

Here are a couple of copies of the current and prior files, neither one of which at this point will open; both of which exhibit the same behavior now. Yes, I have paper copies too, but this behavior is -so- peculiar that I think it's being caused by some (e.g. environmental) issue other than the files.


In the 'console log' I see occurrences of this message: (typical)

2/2/10 8:43:25 AM [0x0-0x4a34a3].net.sourceforge.mscore[6319] error: error occurred while parsing element
2/2/10 8:43:25 AM [0x0-0x4a34a3].net.sourceforge.mscore[6319] at line 12 column 6
2/2/10 8:43:25 AM [0x0-0x4a34a3].net.sourceforge.mscore[6319] write session file

You might also be interested to know about this rather large block of console-entries:
2/2/10 8:22:04 AM [0x0-0x37d37d].net.sourceforge.mscore[4591] Score::startEdit
2/2/10 8:22:04 AM [0x0-0x37d37d].net.sourceforge.mscore[4591] Inspector::Element not found Symbol 0x211d21e0
2/2/10 8:22:04 AM [0x0-0x37d37d].net.sourceforge.mscore[4591] Inspector::Element not found Symbol 0x211d21e0
2/2/10 8:22:04 AM [0x0-0x37d37d].net.sourceforge.mscore[4591] Cavnas::startEdit
2/2/10 8:22:04 AM [0x0-0x37d37d].net.sourceforge.mscore[4591] Score::startEdit
2/2/10 8:22:04 AM [0x0-0x37d37d].net.sourceforge.mscore[4591] Cavnas::startEdit
2/2/10 8:22:04 AM [0x0-0x37d37d].net.sourceforge.mscore[4591] Score::startEdit
2/2/10 8:22:04 AM [0x0-0x37d37d].net.sourceforge.mscore[4591] Inspector::Element not found Symbol 0x211d21e0
2/2/10 8:22:04 AM [0x0-0x37d37d].net.sourceforge.mscore[4591] List:
2/2/10 8:22:04 AM [0x0-0x37d37d].net.sourceforge.mscore[4591] 1/2
2/2/10 8:22:04 AM [0x0-0x37d37d].net.sourceforge.mscore[4591] makeGap 1/2 at 58080
2/2/10 8:22:04 AM [0x0-0x37d37d].net.sourceforge.mscore[4591] makeGap: remove 1/4 at 58080
2/2/10 8:22:04 AM [0x0-0x37d37d].net.sourceforge.mscore[4591] akkumulated 1/4
2/2/10 8:22:04 AM [0x0-0x37d37d].net.sourceforge.mscore[4591] makeGap: remove 1/2 at 58560
2/2/10 8:22:04 AM [0x0-0x37d37d].net.sourceforge.mscore[4591] makeGap: 1/4 removed 1/4 too much
2/2/10 8:22:04 AM [0x0-0x37d37d].net.sourceforge.mscore[4591] gap ticks 58560+480
2/2/10 8:22:04 AM [0x0-0x37d37d].net.sourceforge.mscore[4591] addClone 59040
2/2/10 8:22:04 AM [0x0-0x37d37d].net.sourceforge.mscore[4591] return 1/2
2/2/10 8:22:04 AM [0x0-0x37d37d].net.sourceforge.mscore[4591] sublist:
2/2/10 8:22:04 AM [0x0-0x37d37d].net.sourceforge.mscore[4591] 1/2
2/2/10 8:31:08 AM [0x0-0x37d37d].net.sourceforge.mscore[4591] makeGap: remove 1/4 at 69120
2/2/10 8:31:08 AM [0x0-0x37d37d].net.sourceforge.mscore[4591] akkumula

... much, much more of the same. However I also see copies of similar messages (like those in the lengthy second set...) from the day before, so I rather doubt what's in the second set is too relavant. "Error occurred while parsing element," though, is quite suspicious indeed, as is the fact that the message is invisible, not appearing at all on the display (only in the console log).

Still, it could also all be a red-herring because a file that worked yesterday (and in fact, this morning also) should still work now. Maybe the current file's busted, but not another copy "which worked this morning."

Title Neither a score nor any backup of it now opens; other scores do Empty xml element creates corrupt msc files

Unpackaged the mscz file, opened the mscx file in musescore which indicated line 12 has an xml issue. Indeed:

<?xml version="1.0" encoding="UTF-8"?>
<museScore version="1.12">

Removing the bad empty xml element fixed it. Find the result attached.

Attachment Size
Dear in the Headlights (brain dump).mscx 84.13 KB

Thank you very much for the almost-instantaneous resolution.

Suggestions three:

(1) I would like to know the simplest way to "unpackage the .mcsz file." (Is it, say, a Zip or GZip archive?) Is there a documented way to do this? (I'm a computer-geek by trade, I can figure it out, but ...)

(Edit: I now see, from the forum-link referenced in a previous reply, that one can do this by renaming it to a ".zip" extension, then unzipping. So, it's in Zip format.)

(2) If the file is unreadable, a dialog-box should appear. Given that XavierJazz reported seeing an error message, on Windows, the OS/X version obviously should have done the same.

(3) One "take-away" from this is that the body of the error-message could be improved, both for XavierJazz and for me. Xavier saw an error-box (I didn't), although it had the phrase "no error" in the text and no line/column number. Meanwhile, I had access to a more descriptive message, but it was to be found only in the Console Log (where nobody but a geek like me would have thought to look). Of course, this is a very "squirrely" corrupted-file (how in the heck could an XML-tag contain a $0001 byte?), and therefore it qualifies as "something that should never happen, ever." But it did, and I was suddenly in-the-dark.

Once more, thank you for an stunning piece of software, and for superlative support.

(1) Install 7zip, right click (win) on the file -> 7Zip -> Extract here ... Look for the mscx file and open it in musescore

(2-3) The error with the mscx file is much more descriptive, so I agree it should/could be the same for the mscz one. Didn't test it on Mac.

Be aware that you were using an unstable prerelease, so this could happen at any time. Fortunately, you reported it so it can be fixed for the 0.9.6 release.

BTW it's still not fixed bc Werner has to jump in to fix this issue.

Many thanks, once again. (For me, computer-hacker that I am,) it indeed proved to be a straightforward process to (rename and...) un-zip the files, edit the offending line from the XML file (e.g. with TextEdit) and be on my way.

(And: "thank heavens," I might add, "for Time Machine... or your friendly neighborhood Windows Backup equivalent... or even just Save As... after every step. In the end, I lost nothing.)