after spending quite some time on a score, I can't open it any more as
Canorus always crashes when opening it. Can anyone give me a hint how I can
recover its contents? I have attached the file to this email.
I could reproduce the crash with your file.
It crashes in the module canorusmlimport.cpp, line 439.
This is the member function called "endelement", which
according to the developer docs does:
This function is called automatically by Qt SAX parser while reading the CanorusML
source. This function is called when a node has been closed (\</nodeName\>).
for closed notes are usually not set in CanorusML format. That's why we need
local node attributes (set when the node is opened) each time.
The function returns true, if the node was successfully recognized and parsed;
So you can see the crash is at the end of an music element inside
the parser of the Canorus document. The parsing happens after having
extracted the zipped file content.
Actually for me it is an Assert by Qt which tells me
that canorusmlimport tries to access an invalid position.
QList<CAVoice*> voices = _curSheet->voiceList();
QList<CALyricsContext*> lcs = _lcMap.keys();
for (int i=0; i<lcs.size(); i++) // assign voices from voice indices
qDebug("Reading from list position %d, lcs = %ld", i, lcs.size());
lcs.at(i)->setAssociatedVoice( voices.at(_lcMap[lcs[i]]) );
QList<CASyllable*> syllables = _syllableMap.keys();
Reading from list position 0, lcs = 4
Reading from list position 1, lcs = 4
Reading from list position 2, lcs = 4
Reading from list position 3, lcs = 4
Reading from list position 0, lcs = 1
ASSERT failure in QList<T>::at: "index out of range", file
/usr/lib/qt4/include/QtCore/qlist.h, line 439
So at first some Lyrics Context was read successfully and later another Context
was not. Luckily the Qt code causing the Assert is in the header file:
Q_ASSERT_X(i >= 0 && i < p.size(), "QList<T>::at", "index out of range");
So I don't understand why the Assert happens as the variable i is '0' and not
'-1' as the Assert tells me (meaning an empty list).
As a temporary help you could try to unzip the can file and search for the
lyrics context containing one element and either eleminating it or adding one
more to it. I can't be more specific as I don't know much about the canorus
file format. Hopefully Matevz or some other developer ready has time to analyse
the problem and helps me fixing it.
Am 05.07.2010 23:09, schrieb Andreas Schneider:
> Hi all,
> after spending quite some time on a score, I can't open it any more as
> Canorus always crashes when opening it. Can anyone give me a hint how I can
> recover its contents? I have attached the file to this email.
> Thank you
> Andreas Schneider
> Canorus-user mailing list
Software-Engineer, Developer of User Interfaces
Project: Canorus - the next generation music score editor -
GnuPG Public Key available on request