Ubuntu Hardy - Save .msc Results in Corrupt File - has DOCTYPE tags

• Feb 3, 2010 - 05:29
Type
Functional
Severity
S2 - Critical
Status
closed
Project

Doing a Save is creating corrupt msc files.

There are many sections in the msc file which look something like this... (below). Notice that you have a bunch of values surrounded by html tags. But notice also that there has been added a !DOCTYPE line.

When the msc file is read, it always stops with a parse error on the line with the DOCTYPE. Looking at some older msc files that had been created without any problems I saw that they did not have a DOCTYPE line. So in the newly created file I deleted any line with DOCTYPE and then I could open the file successfully.

So the question is where are those DOCTYPE tags coming from? They should not be there.


{name}
{!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"}
{html}{head}{meta name="qrichtext" content="1" /}{meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /}{style type="text/css"}
p, li { white-space: pre-wrap; }
{/style}{/head}{body style=" font-family:'Times New Roman'; font-size:12pt; font-weight:400; font-style:normal;"}
{p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"}Piano{/p}{/body}{/html}
{/name}


============

Steps to Reproduce:  
os: Ubuntu Hardy 8.04 with current automatic updates
MusicScore 0.9.1  rev 646  (normal install from synaptic)
QT version 4.4.0

) Score / New
) Give Title etc...  no special chars, "This is a Test"
) [option:] Create New Score from Scratch  (also repros when create from template is selected)
) [NEXT]
) Choose: Vocals -> Voice  [Add]
) Choose: Keyboards -> Piano  [Add]
) [NEXT]
) Keep defaults, [FINISH]
) Select a stave
) type "n" to get into Note mode
) click one of the notes on the menubar such as 1/4 note.
) add some random notes to the score
) Click Score/Save  or Save As or the Floppy symbol, anything results the same
) give it a file name  "bug.msc"   and save it
) Close the score
) Open the score that you just created

result: parse error on line nnnn

Look in the file and you will see lots of DOCTYPE tags
delete any line with a DOCTYPE tag

now open the file and it works

================
I have repro'ed this on two different computers -- same os and updates. Music Score used to work on this computer, but the last time it was used was months ago. Apparently one of the auto updates broke something.

This also happened when an existing score was opened, modified and then saved using Save As.
This bug does not appear to be related to any of the other Save As bugs in your issue tracker.


Comments

MusicScore 0.9.1 is quite old. Have you tried opening the files using the latest 0.9.5? Could you attach some sample files to a comment below?

Hi thanks for the fast response, I'm impressed.

no, I have not tried 0.9.5 I am using what comes with Ubuntu.(LTS = Long Term Support) -- which used to work; it's the same version that a zillion other people are going to be using too. just as importantly the musician to whom I am providing the support is not going to be doing any manual installs either...

I just got off the phone with them (the musician). A couple of days ago they tried to open a score and when it didn't work they freaked. they then proceeded to open and save half a dozen scores and broke all of them in the process. And we just finished fixing all of them by hand editing them... hours of fiddly stuff, teaching them how to edit the file etc. thankfully we managed to recover all of their music.

The problem was observed first on their computer. I was able to reproduce the exact same problem on my computer.

I'm attaching two files, one that fails and one that works. I created the score using the repro steps above and then manually deleted the DOCTYPE in order to get it to work.

When I looked at some older scores I observed that they did not have the DOCTYPE tag in them. Only the newly created and NOT working scores have the DOCTYPE.

are you using a shared xml library??? that could be where the bug is...

Attachment Size
this_fails.msc 15.01 KB
fixedByHand.msc 14.27 KB
Status (old) active fixed

The DOCTYPE is generated by qt starting with a version number i cannot remember. This qt library was installed by the normal ubuntu maintenance procedures effectively destroying MuseScore. The newer MuseScore versions deal with the extra DOCTYPE line (by removing it).
So you have the option to install an old qt library or a newer MuseScore.

Thank You!!!!! I am amazed by the level of support that you are providing for this program, way above and beyond what I often encounter.

after extensive searching I finally found the bug in Ubuntu that is tracking this issue (I missed finding it the first time I looked).

Here it is: https://bugs.launchpad.net/ubuntu/+source/mscore/+bug/234681

I have updated that bug, it's been idle since 2008....

One further bit of information. About a month ago I was over at that musicians house. While I was there I installed all of the latest auto-updates for Ubuntu Hardy. About two weeks later they tried to use muse score and discovered that it was broken. I don't know when the previous time was that auto-updates where installed. But certainly it's been done since 2008. As far as I can tell, it was this last round of auto-updates which installed the broken qt 4.4 library. Strangely I didn't find any bug entries requesting that qt be fixed. I will make further inquiries.

Its not an qt bug, its only a change in behaviour which is incompatible with the old MuseScore version. Qt produces valid html output. Unfortunately the added DOCTYPE text line does not work when the qt generated html is embedded into an xml file. The current MuseScore removes the DOCTYPE line and all is well again.