MuseScore crashes after moving to kneed beams in grace notes

• Oct 21, 2016 - 06:48
Reported version
S2 - Critical

When creating grace notes that spans two staves, the program shuts down and crashes unexpectedly. This can be duplicated with the attached file. If you move the beam to the center (creating a kneed beam) the program will crash.

This was first discovered in the 2.0.3 version and duplicated in MuseScoreNightly-2016-10-20-1515-master-073fcdc.

Attachment Size
unstable bug crash.mscz 7.71 KB


I can reproduce as well. Double click the beam, drag left hand downward, crashes when it reaches a point between the two staves. Reproducible in a score created from scratch as well.

Reproduced on Win7 (2.0.3) as well. (starting from file attached in report)
It only happens if you drag with the mouse, selecting the left handle and pressing the down arrow works fine here.

Just for info, I just tested this on Ubuntu 15.10 with MuseScore 2.0.3 officially released (repository) build; also crashes here.

Reproduced on 2.0.4 (0bec46b) with the following stacktrace:

1 ??                                               0xfeeefeee 
2 Ms::Element::pageBoundingRect element.h     389  0xc42529   
3 Ms::BspTree::items            bsp.cpp       144  0x904dae   
4 Ms::Page::items               page.cpp      146  0x7d34e3   
5 Ms::ScoreView::paint          scoreview.cpp 1907 0x40ac63   
6 Ms::ScoreView::paintEvent     scoreview.cpp 1692 0x40996c   

bbox() (and thus _bbox) is likely invalid

Extra clue: It seems to be related with the lower grace note having ledger lines. I could reproduce now from scratch with only 2 grace notes (started at treble staff) and a single main note in treble. Moving the first grace note to the bass staff.
All is well as long as the grace note in the bass staff is within the staff. As soon as it has a ledger line (both above as below staff behave the same), this error occurs.