Crash when creating tuplet in empty voice in staff with linked staff

• Feb 1, 2014 - 23:18
Type
Functional
Severity
S2 - Critical
Status
closed
Project

Crash when creating second voice septuplet.
Nightly build: MuseScoreNightly-2014-01-24-1147-dfabf91
OS: Windows 7 Home Premium

When creating a second voice septuplet, select staff, press N, press Ctl+6 for septuplet, crash.
Voice 1 creates septuplet fine.


Comments

Status (old) active needs info

Hi

I'm not able to reproduce - possibly because there have been commits since the last generated Windows nightly (the 24th).

It maybe fixed within the next 1-2 weeks), so if others struggle to reproduce, could you try again then?

Using MuseScore 2.0 Nightly Build (77f7d29) - Mac 10.7.5.

Could be, but I don't seem to have any problems on my Windows system either. Maybe be more specific about the steps? Starting from a completely empty score for a single flute, here's what I am doing:

1) click first measure
2) N to enter Note Input mode
3) Ctrl+Alt+2 to switch to voice 2
4) Ctrl+6

When I do this, I get the tuplet full of rests just as I expect, and I can then type six notes and it fills normally. Since you didn't specifically mention when or how you are trying to switch to voice 2, I wonder if that was an oversight, or if perhaps you are starting from a non-empty score and clicking somewhere that automatically places you in voice 2 upon pressing N? If so, posting the specific score you are having problems with and more precise steps to reproduce would help.

I am not aware of any recent fixes to anything having to do with tuplets, but it's certainly possible something happened and I didn't notice.

It's the Moonlight Sonata 3rd Movement arranged for 2 7 string guitars with TAB. I added the extra TAB line, R-Click TAB staff, select staff properties, edit string data, add the 7th string (low B dropped down to A), and begin arranging.
At measure 30 the A sharp quarter note is supposed to be a trill. So I was going to mark it with TR, leave 1st voice as quarter notes and ghost a second voice as septuplets. So I select that measure (the traditional staff), press N, CTL+ALT+2, CTL+6, crash
Also on my computer which handles playback fine, for some reason the grace notes on the measure 30 half notes play very slow while the grace notes in measure 22 play fine. But that I will seek answers for in the support forums.

Attachment Size
Moon3rd duet.mscz 19.97 KB
Status (old) needs info active

Re: grace notes - be sure you understand the difference in this context between appoggiaturas and acciaccaturas. The former are *supposed* to play - they are actually in time. The latter are supposed to be fast - effectively zero duration, occurring or less simultaneously with the main note.

Anyhow, regarding the issue at hand: I am able to reproduce it given your sample score. Probably the issue has to do with either the presence of the grace notes or the linked tablature staff.

Ok that would explain the crash. But the crash occurred even before I put in the grace notes.
Could it be the addition of the seventh line to the TAB or the changes made in staff properties to accommodate a seven string 24 fret guitar be a contributing factor? I made 2 templates for seven string guitar TAB notation; one for solo guitar and on for duet.

The grace notes do not give the difference in the palette. Only says Grace 16th;Grace 32nd. The Grace notes I put in measure 22 I clicked on the note and double clicked the Grace note 32nd. I used the same technique when putting the grace notes in measure 30 except using the 16th note. If there is a way to input the difference I don't know it yet.
EDIT: I inputted the first which is the acciaccatura and changed the note value to 16th, my derp moment thank you.

Title Crash when creating second voice septuplet Crash when creating tuplet in empty voice in staff with linked staff

Definite room for improvement in the grace note palette.

Removing the grace notes from the measure doesn't fix the crash, so that's a red herring. Tracing a bit with the debugger, it is indeed the linked staves triggering the bug. It can be reproduced from scratch as follows:

1) create new score for guitar in standard notation with linked tab staff
2) click first measure (which is of course empty at this stage)
3) N for note input
4) Ctrl+Alt+2 for voice 2
5) Ctrl+3 for triplet

Result: crash

I can see that Element::findLinkedVoiceElement() is returning null, but the code is later trying to dereference this. I assume this is code to find the corresponding note in a linked staff to whatever is being modified, but since there is nothing there in voice 2, there is nothing to find. I guess a temporary rest was created in Score::expandVoice() but this was not propagated to the linked staff.

Well with what you said about nothing being there for the second voice I went in and reproduced the crash then after that tried:
1.) selecting measure
2.) press N
3.) press CTL+ALT+2
4.) press 5 then 0 for quarter rest
5.) select first rest
6.) press CTL+6 and got the septuplets.

So perhaps the crash is a result of nothing being there initially for the second voice.
Also when I input notes I do it in the traditional staff and edit the TAB later.

Yes, that's what I meant in saying "empty voice" when I updated the title of this issue. The code calls expandVoice() to fill the voice with rests, but does not copy these rests to the linked staff. Two possible fixes that come to mind are to change expandVoice to automatically to the work in inked staves, or to simply call expandVoice for each linked staff. This is an area I don't feel qualified to make the call on, but I'm trying to describe the issue as clearly as possible for whomever does end up looking at this.

Nice job figuring out and describing the workaround, BTW!

No problem!
If I knew how to code or something I would help there. But I don't know code at all.
I'm looking forward to the full release of 2.0 as many features for the guitar I been wanting are there. Where would I put the suggestion of removing the fingerings from the TAB staff at?

There are existing feature requests #22578: Possibility not to show palette items on linked staves and #23879: Don't duplicate chord symbols on linked staves. When looking at these, there was also a forum thread http://musescore.org/node/23463 I consulted. I think it may have been discussed elsewhere too? Perhaps just IRC.

The status of this is, we made it so MuseScore decides for itself which items to not duplicate - there is no user control over this. We erred on the side of duplicating too much rather than too little. It is, after all, very simply to right click a fingering on a tab staff, select / all similar items on same staff, "V" to mark invisible. Right now, everything is duplicated except staff text, chord symbols, figured bass, lyrics, and dynamics. I would imagine most people would want fingerings duplicated, so I am reluctant to add them to the list of items not duplicated.

Ultimately, I could image a set of staff type options to control which types of items get displayed, but that's a complicated enough dialog as it is. So for now at least, I expect it to remain as is unless a bunch of people weigh in to say fingering shouldn't be duplicated. I'd add comments to the first of the two other issues I listed above (since that one was left open).

All right I'll chime in there, I didn't know it was "V" to ghost the notes as too many numbers on a TAB staff can be confusing to the readers (and to me).