musescore/MuseScore — pull request #133 by AntonioBL (2012-11-23 11:19:14+00:00)
Title: Issue #18124: Crash on import of capella file

Here is a possible fix for the crash of capella files containing placeholders and grace notes, i.e. elements with ticks=0, which was leading to a division by 0 problem.
Please check the conformity to MuseScore coding rules and let me know if changes are needed.
The code works for me both for Linux Mint and Windows XP, however I am not a C/C++ programmer and I am not sure if some pieces I added could be written in a more effective/efficient way.
Possible issues:
- this code completely deletes placeholder (as v1.2 was doing); if marks or texts are attached to them, they are deleted as well; the solution to this point needs discussion about implementation (link texts to the previous or next element? What if the placeholder is at the beginning/end of a measure or system?) and capella files examples;
- the grace notes should be imported correctly by the code (v1.2 was deleting grace notes), with attached text and symbols. There can be problem if grace notes are tuplets, since duration for tuplets is defined in "capella.cpp" related to ticks. Tuplets import for capella files is however still a work in progress. Capella files examples can be helpful.