[GP6] Crash when scores for keyboards contain chord symbols

• Jul 14, 2017 - 09:40
Reported version
2.1
Type
Functional
Severity
S2 - Critical
Status
closed
Project

Confirmed crashes when opening a GP6 file.
Under Windows 7 both versions of 2.0.3 and 2.1.

as discussed in the following URL:
https://musescore.org/en/node/232616
https://musescore.org/en/node/232771

Attachment Size
Sample, Variatio 9 Part1.xml 187.48 KB
Sample, Variatio 9 Part1.gpx 25.07 KB

Comments

Title Errors and crashes when opening a GP6 file directly Crash when opening this GP6 file

Title change before understand the problem

Title Crash when opening this GP6 file [GP6] Crash when scores for keyboards contain chord symbols

2.0.1 version 871c8ce (same issue with currents master 042d5b4 and branch 2.0.2 dc9e229)
And ditto with 2.0.3 3c7a69d

- Load this file created with Guitar Pro 6: a piano score (with an added chord symbol): 1 Piano, with a chord symbol.gpx

Result: crash

No crash if you delete this chord symbol: 1 Piano, without chords symbol.gpx
(we can observe, though, the unexpected treble and bass clefs 8vb: other issue)

And the same file after export in gp5 format (works too, the chord symbol is imported): 1 Piano, with a chord symbol.gp5

- From what I see by now, all "Keyboards and Synthesizers" (presented as such this in GP) are impacted.
And no matter if it's with grand staff or not.

Eg: one staff (synthe): 2Synthe single staff and chord.gpx
Result: crash

And no issue after removing the chord symbol: 2Synthe single staff no chord.gpx
Gp5 format: 2Synthe single staff and chord.gp5

I don't know anything about GP formats, but I can say from running under the debugger that the crash occurs trying to add a fret diagram as opposed to a chord symbol, and for whatever reason there is no fret diagram to add. It looks like the file is supposed to contain a list of fret diagrams (under the tag "DiagramCollection") an then when a score wants to use one, it is supposed to reference it by number. We are trying to access the first fret diagram in the list, but the list contains only an empty entry. It seems no DiagramCollection was ever encountered. I would guess either the file is corrupt, or our understanding of the GPX format is deficient in some way. Unfortunately, they don't document it, so all we can do is guess at how it supposed to work.

In a different way from MuseScore, in GP, fretboards diagrams and chord names are intimately linked (a good expected feature in the future for MuseScore!)
In other words, you can not display only a fretboard diagram (unlike MuseScore)

In GP, a shortcut opens a dialog where you choose the chord and its position on the fretboard)
Three possibilities let you not display all these fretboard diagrams, or show them by a list at the beginning of the score (image below) or onto the score.
But, as said, these options are not involved.

" I would guess either the file is corrupt"
I guess you are talking about the file attached in first message.
It is not corrupt. Only by deleting the chord symbols, the score opens normally (and xml file as expected too: note the difference regarding the clefs)
- Sample.gpx
- Sample.xml

accord.jpg

What I mean by "corrupt" is, for some reason, we are not seeing the fretboard diagrams that as you say are supposed to be there. Maybe they didn't get included in the file and GP6 is just filling them in based on its own internal defaults. Or maybe they are included but not in the correct form. Or, again, maybe the way this done is considered valid and its just something we don't yet understand because the format is undocumented. Hard to say.

Have you noted that all this works fine in GP5 format? (ie chord symbols and fretboards diagrams are shown both, and as expected)

Are you asking me if it works, or telling me that it does? I have no way of confirming this; can you provide a file?

Looking at the code, I don't see anything like this DiagramCollection construct for any previous version of Guitar Pro. It appears to be new for GP6.

I am not asking, I tell that it works.
I have attached some files already in comment #4 with the extension .gp5
So: with grand staff: 1 Piano, with a chord symbol.gp5
and single staff: 2Synthe single staff and chord.gp5

And the file which crashs in gpx, exported in this gp5 format: Sample, Variatio 9 Part1_2.gp5

So, no crash, and the chord symbols are here. And the fretboard diagrams too: there are drawn, but empty of course/as expected I guess, ie without dots, since it's impossible/ inappropriate, all simply, to play a fretboard diagram for guitar on a keyboard, piano or other :)

By going to the end of the reasoning, one may wonder why they are drawn in a keyboard score (but at least they are harmless, and easily removable - so: Sample, Variatio 9 Part1_2, without diagrams.mscz - , in the gp5 format)

- But of course there are both, and complete (with dots reflecting the chord) as expected in a score for guitar:
1 Steel Guitar.gp5
while in format gpx, the chord symbols are lacking, as explained in the other issue: #232851: [GP6] Fretboard diagrams are imported but not the corresponding chord symbols

OK, thanks for the clarification. But it does appear the formats are different enough that studying the code for GP5 is not helping me understanding how it the file is supposed to be structured for GP6.

I did some experiments.

I input a C major scale and opened it with MuseScore, notes were loaded fine, except the staccato is missing.

I added a text "This is a C Major scale" and save the file as "2.1 C Major Scale +text", and then opened it with MuseScore, it is fine as the above.

But, after I open the first file "1. C Major Scale" and added a chord symbol "C", saved the file as "2.2 C Major Scale +Chord" and then opened it with MuseScore, it did not load in. (but neither did it crash).

It appears to have something to do with the chords.

Note:
The staccato is not loaded in.

Best,

The staccatos should be imported. You can fill out an issue report for this.
There is some other outstanding issues, with GP6, such as importing grace notes (and chord symbols of course, the most annoying and prioritary issue in my opinion)

"In a different way from MuseScore, in GP, fretboards diagrams and chord names are intimately linked"

The problem is that this is not true for keyboards etc... in GP6. For these instruments, they have a ChordCollection and not a DiagramCollection. MuseScore didn't know about that. Fix incoming.

Fixed in master and 2.2 branch. Thank you for the test case " 1 Piano, with a chord symbol.gpx". It's exactly what was needed here. I added it to our test suite.