Adding ornament on tablature causes crash

• Jun 8, 2015 - 15:40
Type
Functional
Severity
S2 - Critical
Status
closed
Project

1. open attached score
2. open add instrument dialog ('I')
3. pick a guitar tablature instrument
4. add to existing staff as linked staff
5. without leaving the dialog, switch that added staff from Standard to Tablatur 6-string simple
6. hit OK

-> crash

'famous' last words:
Fatal: ASSERT: "line >= 0 && line < 75" in file ...\MuseScore\libmscore\key.cpp, line 179 (:0, )

If you do step 5 later, i.e. leave the dialog after 4 and re-enter to make that change, there is no immediate crash, instead it crashes when starting playback, same error message

fe21426, Windows 7 (Enterprise, 64bit)

Attachment Size
Tablatur-crash.mscz 7.58 KB

Comments

BTW, to clarify, step 3) is irrelevant, and step 4) does not make sense. There is no facility that allows you to add a specific instrument's staves to another instrument. The Add Linked Staff simply adds a staff to the instrument to which the currently-selected staff belongs. Whether or not an instrument is also selected in the list at left does not affect this operation.

Anyhow, the crash occurs in the new articulation playback code, but I'm not sure it is really the "fault" of that code. It looks like we are trying to generate playback events for the notes in the new staff because of a doLayout() call, but somehow the code to calculate the accidentals is getting confused between relative and absolute lines, it seems.

A lot easier to reproduce.

Create a score for guitar tablature
Add a note (a fret mark in fact)
Select it and double click a turn in the articulation palette

Crash.

Not sure how findAccidental should react for a tablature staff.

A trill, a mordent etc...
Btw, we know when the bug has been introduced already. It's when we added playback for this notation.