[GP6] Crash by opening a file containing a specific instrument

• Jan 29, 2017 - 12:58
Reported version
2.1
Type
Functional
Severity
S2 - Critical
Status
closed
Project

GIT commit d759ab0 (and 2.0.3, and current 2.1 dev. 75b66fd)

- Load this gpx. file: 1The Chainsmokers - Closer (guitar pro)(1).gpx
Result: crash

The same file in .gp5, it's ok: The Chainsmokers - Closer (guitar pro)(1).gp5

- After investigation, the culprit is this part: Finger snaps .gpx
Ok always with .gp5 format: Finger snaps .gp5

- I can reproduce from scratch with GP6 by choosing the instrument "2 Hand Maracas", so with two staves.

So: 2 hand minimal.gpx
Always good with .gp5: 2 hand minimal.gp5


Comments

for the record: master (d759ab0) crashes too,

famous last words:
Debug: Unknown instrument: "2Mrcs" (...\MuseScore\mscore\importgtp-gp6.cpp:424, void Ms::GuitarPro6::readTracks(QDomNode*))

Stack trace:
1 Ms::Segment::checkElement segment.cpp 424 0x7c373e
2 Ms::Segment::add segment.cpp 487 0x7c3aa6
3 Ms::GuitarPro6::readBars importgtp-gp6.cpp 1412 0x565d58
4 Ms::GuitarPro6::readMasterBars importgtp-gp6.cpp 1762 0x569992
5 Ms::GuitarPro6::readGpif importgtp-gp6.cpp 1826 0x56a4e9
6 Ms::GuitarPro6::parseFile importgtp-gp6.cpp 247 0x558940
7 Ms::GuitarPro6::readGPX importgtp-gp6.cpp 231 0x558868
8 Ms::GuitarPro6::readGPX importgtp-gp6.cpp 203 0x558626
9 Ms::GuitarPro6::read importgtp-gp6.cpp 1847 0x56a7b4
10 Ms::importGTP importgtp.cpp 2259 0x54f1e6
11 Ms::readScore file.cpp 2131 0x5a2cb2
12 Ms::MuseScore::readScore file.cpp 331 0x59309f
13 Ms::MuseScore::openScore file.cpp 310 0x592f3c
14 Ms::MuseScore::loadFiles file.cpp 291 0x592bfe
15 Ms::MuseScore::cmd musescore.cpp 4669 0x49e12a
16 Ms::MuseScore::cmd musescore.cpp 4524 0x49d7c0
17 Ms::MuseScore::qt_static_metacall moc_musescore_IKSZSQWDH4YDZS.cpp 733 0x693634
18 ZN11QMetaObject8activateEP7QObjectiiPPv 0x68a08942
19 ZN12QActionGroup7hoveredEP7QAction 0x1d385295
20 ?? 0x236fcce8
...

I tried to open "Finger snaps.gpx" in Guitar pro app and I see a single staff. Also, with the patch applied, there is a single staff in the part. So this needs a bit more work.

Famous last words for that file (Finger snaps.gpx) when opened in master:

Debug: Unknown instrument: "2Mrcs" (...\MuseScore\mscore\importgtp-gp6.cpp:424, void Ms::GuitarPro6::readTracks(QDomNode*))
Debug: GuitarPro6:findNumMeasures: bars 7 < numMeasures 192
(...\MuseScore\mscore\importgtp-gp6.cpp:544, int Ms::GuitarPro6::findNumMeasures(Ms::GuitarPro6::GPPartInfo*))

stack trace is the same

With the fix from that PR that file loads without a Crash.
it does look different though than when loading the gp5 file (2 instruments vs. grand staff)

@lasconic:
If you look at the xml of "Finger snaps.gpx" (for example, by uncommenting line 1780 of importgtp-gp6.cpp ), each MasterBar element contains two Bar elements, like other two-staves instrument (one Bar for the upper staff and one Bar for the lower staff). In these examples the second staff is empty, maybe that's why it does not show in the App.
In the original (full) file each MasterBar contains 9 Bar elements, corresponding to seven instruments (s-gtr6, s-gtr6, s-gtr6, drmkt, hclap, 2Mrcs, hrpch-gs), since two of them are using two staves.

Regarding the problem with the part see https://musescore.org/en/node/22805#comment-235381 : no work has been done to correct parts when importing two-staves instruments.
Parts of imported gp files do behave strangely also in other cases: for example there are tablature staves present only in the part but not in the main score when importing GuitarPro files with guitar instruments.

Parts of imported gp files do behave strangely also in other cases: for example there are tablature staves present only in the part but not in the main score when importing GuitarPro files with guitar instruments.

This is by design. But it's indeed strange because it cannot be done with the UI.