MuseScore 3 Plugin Creator line number bug and breaking changes in qml code for v3 plugins. v3 plugin qml is not backwards compatible.

• Dec 29, 2018 - 21:57

Downloaded MuseScore 3 this morning and started looking at writing plugins. I'm new to qml but found the plugin source files at https://github.com/musescore/MuseScore/tree/v3.0/share/plugins. In attempting to run https://github.com/musescore/MuseScore/blob/v3.0/share/plugins/colornot… in the Plugin Creator for a score, I encountered errors in the code. So to validate that older versions worked and this code was not experimental, I repeated steps using v2.3.2 of MuseScore. Here are repro steps and my findings. It looks like plugins in v3.0 are currently not backwards compatible and there are still some bugs to fix.

Repro steps MuseScore v3.0.0.4785

  1. MuseScore v3.0.0.4785 on Windows 10
  2. Open a score
  3. Open Plugin Creator and paste in qml code from this source code version:
    https://github.com/musescore/MuseScore/blob/v3.0/share/plugins/colornot…
  4. CTRL + A in the score to select all measures
  5. Run the plugin code using Plugin Creator
  6. See the following errors:

    Warning: QMetaProperty::read: Unable to handle unregistered datatype 'Ms::Segment*' for property 'Ms::MasterScore::lastSegment'
    61:-1: TypeError: Cannot read property 'tick' of undefined
  7. Also note the Plugin Creator line numbers are not incremented correctly after line 99. They start back at 00.
  8. Repeat steps above but select all measure except the last measure.
  9. Find that the v3 code does not check for undefined on length property access for graceNotes or notes.
  10. Find that the v3 code plugin is not working, cannot find any notes.

Repro steps MuseScore v2.3.2

  1. MuseScore v2.3.2 on Windows 10
  2. Open a score
  3. Open Plugin Creator and paste in qml code from this older source code version:
    https://github.com/musescore/MuseScore/blob/v2.3.2/share/plugins/colorn…
  4. Run the code
  5. Note that notes are colored and no errors occurred

Comments

Do you still have an unanswered question? Please log in first to post your question.