Cursor not working properly

• Mar 22, 2018 - 14:15
Version
2.1
Priority
normal
Status
active
Component
Plugin framework
Category
bug report
Project

I found that basic Cursor.time functionality does not work on some specific scores.

Let’s say we have a very basic plugin snippet:

var cursor = curScore.newCursor()
cursor.rewind(0)
var measure = cursor.measure
while (measure) {
    console.log(cursor.time)
    cursor.nextMeasure()
    measure = cursor.measure
}

For scores like https://musescore.com/user/5646711/scores/5024133 it works properly, displaying measures’ time in milliseconds.

But it’s not working on the scores like https://musescore.com/casualantisocial/miniature-thing producing all-zero output.

Cursor.ticks are working properly in both cases though.

I tried to determine which circumstances affect incorrect behaviour but I have failed.


Comments

According to my investigations it works well on Windows, but fails on Linux producing all-zero output.

Tested on:
Ubuntu 17.10 x64
Musescore version 2.1.0
Revision: 871c8ce