builtin plugins don't work

• Jan 30, 2019 - 15:25
Reported version
3.0
Priority
P0 - Critical
Type
Functional
Frequency
Once
Severity
S1 - Blocker
Reproducibility
Always
Status
closed
Regression
Yes
Workaround
No
Project

came up in #283096: Plugins Not working, which was the wront project to track this in

The Notenames and Colornotes plugins, part of ther MuseScore package, don't work in the released MuseScore 3.0.2.5312 on Windows 10


Comments

Does this apply for ABC import plugin? If so, did it work in 3.0 and 3.0.1 (I mean installed versions, not portable ones)? And which kind of "don't work" is this issue about? Do they show up in Plugins menu and do nothing on clicking on them? Or are they hidden from that menu at all after activating them in Plugin Manager?

Not sure if it was replied to me ;-), but after a short check (and internet research for a file) also the ABC-plugin seems to work with OpenSuse. Not with a good result, but not sure if it caused by the plugin or caused by the file themselves.

I realized I have a copy of MuseScore on my Windows 8.1 system so here are the results of my tests.
This issue does not concern ABC import, and it works both in 3.0.1 and 3.0.2 versions.

The source of the issue seems to be incorrect enumerations values. Printing enumerators values (at least for ElementType enum) reveals that all values are shifted by 1 so all type comparisons are bound to go incorrectly. For example,
console.log(Element.INVALID);
prints 1 in my Windows installation of MuseScore while the correct value is 0. The same goes for other element types: the value of Element.CHORD is larger by 1 than the value of type property returned by Chord objects. Also running
Object.keys(Element) crashes MuseScore for that installation.

Linux builds seem not to have this problem, and enumerators values are correct for them. I don't know currently what may be the reason for this issue.

Status PR created fixed

Fixed in branch master, commit 1b445842fa

_fix #283105: delay enums QQmlPropertyMap initialization

Initializing QQmlPropertyMap directly at static variables creation
time seems to have negative side effects, such as shifting all
property keys by 1 which makes it impossible to use the values given
by such map for correct evaluations and comparisons. Perhaps
QQmlPropertyMap needs some other (Qt-specific?) static structures be
initialized properly before it can be correctly created itself._

Fix version
3.0.3