[MusicXML import] replace assertions by proper error reporting
Reported version
3.6
Type
Functional
Severity
S5 - Suggestion
Reproducibility
Always
Status
closed
Regression
No
Workaround
No
Project
The MusicXML parser contains several assertions checking start and end elements to verify the parser is still in sync. For end users they have no effect (resulting in incomplete import without any error), for a debug build they crash MuseScore when triggered.
Suggestion is to properly report "parser out of sync" to the end user and provide meaningful information (e.g. expected element name and type versus actual) to the developer.
Fix version
4.0.0
Comments
Fix implemented, PR still to be created.
PR for master: https://github.com/musescore/MuseScore/pull/8833
Fixed in branch master, commit c1e06c3d46
_Fix #317099: [MusicXML import] replace assertions by proper error reporting
The MusicXML parser contains several assertions checking start and end elements to verify the parser is still in sync.
For end users they have no effect (resulting in incomplete import without any error), for a debug build they crash
MuseScore when triggered.
These assertions have been replaced by a dialog providing meaningful information (expected element name and type versus actual)
to the end user and the developer.
Other Q_ASSERTS have been replaced by ASSERT_IF_FAILED macros._
Automatically closed -- issue fixed for 2 weeks with no activity.