Crash when adding instrument in a score for unpitched percussion and with start repeat barline

• Oct 26, 2016 - 14:22
Reported version
3.0
Type
Functional
Severity
S2 - Critical
Status
closed
Project

The attached file was created mainly using a nightly version from April.
I've recently upgraded to 3.0.0 (11892ff) on OS X Sierra.
It crashes when I try to add an instrument to this file
Open attached score
Open Instrument dialog
Select Alto sax
Click Add
Click Ok
Sad face

Attachment Size
Crash on add alto sax 2.mscz 20.02 KB

Comments

This seems to have been imported from MIDI?

It crashes with an assertion failure in some Qt library:

Fatal: ASSERT failure in QList::operator[]: "index out of range", file C:/Qt/5.6/mingw49_32/include/QtCore/qlist.h, line 535 (:0, )

Happens here on Windows 10, in DEBUG mode and with and without switching to "Page View" mode

Status (old) active needs info

Then again a file created with another and much older nightly is not guaranteed to work in any form or shape (and that is why it is strongly advised not to use nighliy builds for anything but testing), can you create it from scratch and still reproduce the error?
Can you share the MIDI it apparently stems from?

Yes it originated from two midi files, individually imported, heavily massaged and one pasted into the other. There have been so many edits over the last couple of years that I doubt the original midi files will shed any light on the problem. I also can't remember exactly which midi files they were!

Found.
A bit weird, but I can reproduce constantly, this is the most important!
I see two necessary conditions without which there is no issue.

1) a score for a no unpitched percussion instrument (drumset and so on), with 5 or 3 lines (no issue with 1 line, why?)
2) more weird: it is necessary to have a Start repeat Barline, or a Start / End repeat Barline into the score. No issue with eg a End repeat Barline.
barlines.jpg

So, to reproduce:

Load this test file after the step #4, then do step #5: repeat drumset.mscz

Or, from scratch:

1) Create a new score for drumset (5 lines default)
2) Add a Start repeat barline into the score
3) Save and close
4) Re-load.
5) "I" -> add an instrument, eg Flute -> Ok

Result: crash

- Sometimes (always weird, or unstable), the crash does not occurs the first time by adding the flute (or an instrument with an only staff). If is the case, the crash occurs by:

- Either by repeating the same action two times : ie: "I" -> Add Flute -> Ok -> Undo -> "I"-> again add flute

- Either by adding, in first intention, an instrument with two staves (eg piano)

- Either by toggle in another "View" (eg Page View to Continuous View, or the reverse, according to how the file was saved), and add an instrument.

Title Crash when adding instrument to attached file Crash when adding instrument in a score for unpitched percussion and with start repeat barline

Indeed dies with the same failed assertion:
Fatal: ASSERT failure in QList::operator[]: "index out of range", file C:/Qt/5.6/mingw49_32/include/QtCore/qlist.h, line 535 (:0, )

Hmm, 681a27f is highly unlikely the culprit.
79b7746 is indeed more likely