Unwanted sized and/or lined staves on single instrument

• Apr 1, 2010 - 23:22
Type
Functional
Severity
S2 - Critical
Status
closed
Project

I'm using MuseScore 0.95 on Windows Vista.

1. Create new file
2. Add an instrument with at least 5 staves
3. Finish creating the file

Most of the time, the fifth and sixth staves are either small and single-lined small and no-lined, or just single-lined.
Occasionally, however, MuseScore freezes up.
I've reproduced this several times and ended up with several results. It could possibly be from different instruments.

(This does not occur when you select Instruments from the Create toolbar after creating the file.)


Comments

Do you still have problems with the latest prerelease or nightly build ?

Do you have a printer installed? Could you give exact steps for the freeze (Which instruments, how many)?

Is this a problem that only recently started happening to you or have you been experiencing this for a while?

1. It still happens in the latest revision.

2. Yes, i have a printer installed.

3. I added a piano and selected Add Above on the treble clef five times (see attachment). Then... I click a few times, and it says Untitled (Not Responding). (see second attachment)

4. I started to notice this a few months ago.

Attachment Size
Instruments.jpg 85.75 KB
Not Responding.jpg 37.21 KB
Status (old) needs info active

You need to add several staves to reproduce the crash

  1. Create a new score
  2. Add a picolo part
  3. Select the staff1 and click Add Below to have at least 5 staves (the more you put, the more you have a change to crash

In InstrumentTemplate, the number of staves (int staffLines[MAX_STAVES]) is limited by MAX_STAVES, and set to 4 in globals.h.
In a couple of functions the staffLines array is adressed with an index > MAX_STAVES - 1.
For example, in newwizard.cpp -> InstrumentWizard::createInstrument()

I don't know how to solve this. I guess the addBelow should be disabled when 4 staves are in ? and maybe a test when accessing the array?

Status (old) active fixed

Fixed in r2931. You can define the properties (clef, small, line) for a max of four staves per instrument in the instruments.xml file. If you add more staves they are now initialized with default values (G-clef, normal size, five lines).