System text from 2.3.2 imported as staff text (preventing to hide otherwise empty staff)

• Sep 16, 2018 - 15:13
Reported version
3.0
Priority
P0 - Critical
Type
Functional
Severity
S3 - Major
Status
closed
Regression
Yes
Workaround
Yes
Project
  1. Open attached score (produced in 2.3.2).

See attached PNGs for expected (2.3.2) and actual results.

Using MuseScore 3.0 Nightly 9dac228 - Mac 10.11.6.


Comments

When clicking on system text, it says 'Stave Text: System Text;' - should it not just say 'System Text'?

Maybe this is the problem?

Title Empty stave with System Text appears if hidden empty staves enabled Empty stave with System Text appears if hide empty staves enabled
Severity S4 - Minor

Fixed the title and changed the priority to Normal.

Some observations: When you open the file in 2.3.2 the System text is properly identified as system text, but identified as staff text in 3.0.

If the staff is visible because of the presence of staff text and you select a note on the electric piano and add system text, it attaches it to the first visible staff and that staff does not become invisible after deleting the staff text. Saving, closing and reopening the score fixes this. If the staff is not visible, system text has no effect on it.

Title Empty stave with System Text appears if hide empty staves enabled Empty stave with System Text appears if hide empty staves enabled on imported score
Regression No
Workaround No

In 2.x, system text was just staff text with a different style applied. In 3.0, it's truly a different element type. Since this score was created in 2.3.2, that's really staff text, and this triggers the new code to make staff text force staves visible. I think it probably should be converted to system text on import, but this isn't happening. Seems I recall this being discussed not long ago, but I don't recall where.

Regression No Yes
Severity S5 - Suggestion S4 - Minor

Well, it it were "Empty stave with Staff Text appears if hide empty staves enabled on imported score" it'd be a suggestion, but as is it is clearly a bug

Agreed. I was under the impression we were supposed to be automatically converting 2.x-style system text (staff text with system flag set and text style of System) into new 3.0-style system text (new element type). I see the code in read206, but it isn't working here for whatever reason. Looking...

Wow. The code in question depends on being able to seek ahead in the file while reading (to check "style" tag before deciding what kind of text create), and this depends on gory details of QIODevices and whatnot. Not what I was expecting at all :-) But anyhow, while a clever hack I'm sure, it fails before it even begins, there is no QIODevice associated with the stream, and my naive attempt to add one failed even more miserably.

Title Empty stave with System Text appears if hide empty staves enabled on imported score System text from 2.3.2 imported as staff text
Priority P2 - Medium P0 - Critical
Severity S4 - Minor S3 - Major

OK, now that we understand the issue, and see that system text in 2.x is just not being imported correctly and this is just one side effect of that (another is that swing playback will now apply to top staff only - see #277698: Request ability to mute staff (as opposed to instrument, or voice) for how much hassle that can be to track down!), I'm changing the title and raising priority. Basically, system text in 2.x is just broken now. Maybe a different approach would allow us to solve this import issue?

Title System text from 2.3.2 imported as staff text, (preventing to hide otherwise empty staff) System text from 2.3.2 imported as staff text (preventing to hide otherwise empty staff)
Status PR created fixed

Fixed in branch master, commit 3a10013012

fix #276235: make it possible to enable readahead for XmlReader

Also actually use that possibility for correct importing of 2.X
system/staff text for both compressed and uncompressed files.