MeasuringPolyphony / mp_editor

https://editor.measuringpolyphony.org
5 stars 2 forks source link

Score editor sometimes disappears #13

Closed JRegimbal closed 4 years ago

JRegimbal commented 4 years ago

The score editor SVG sometimes disappears after a few editing actions. It is unclear why this occurs at the time of writing.

JRegimbal commented 4 years ago

@martha-thomae Is there any extra info you could tell me about how to replicate this? I'm unable to figure out a small example on my computer.

martha-thomae commented 4 years ago

I can send you the -based file I was working on when this happened. In the last part of the "motetus" there is a group of semibreves (5 semibreves + a dot + 2 semibreves). What I did was:

  1. I added another dot between the third and fourth semibreve. 1A - Semibreve to modify (The alignment got fixed after this change.) 1B - re-alignment
  2. Then I moved into the breve (square note) preceding all these semibreves and tried to change it to a longa (pressing "9"). 2 Breve to modify to a longa
  3. Everything went blank afterward.

I did notice that if I tried another set of modifications, this doesn't happen. Let's substitute the breve to modify in step two by one of the semibreves. Everything is fine. I can even do a whole bunch of modifications and then try to modify the "problematic" breve, and everything will be fine.

But still, if I do the steps enumerated above, the result will always be the same (the blank page). No idea why.

ExamplePartsFile_Fauvel_folio9v.zip

martha-thomae commented 4 years ago

Also tried (after step 1 - adding the dot) to make the two breves into semibreves. 2A - breves to change

Everything was fine. 2B - Now they are Semibreves

But then I tried to add dots between this very-long sequence of semibreves, and the page turns blank again. Here is the place where I tried to add the dot. 2C - Add dot after this Semibreve

martha-thomae commented 4 years ago

@JRegimbal, you can replicate the error by only entering the notes shown in the first screenshot (no need to enter the entire piece). I tried it already.

JRegimbal commented 4 years ago

Hi @martha-thomae! I was able to replicate this. The issue is in the ArsAntiqua.js file with the issue being last_uncolored_note is undefined at line 100.

JRegimbal commented 4 years ago

I've edited the score editor to display an alert with a short description of the error in scoring up when one occurs. If you open the console, a more detailed message should be visible.

martha-thomae commented 4 years ago

Hi @martha-thomae! I was able to replicate this. The issue is in the ArsAntiqua.js file with the issue being last_uncolored_note is undefined at line 100.

Thanks! It seems that I didn't change that line when translating from Python to JavaScript. Thanks so much for taking the time to figure this out.

martha-thomae commented 4 years ago

I've edited the score editor to display an alert with a short description of the error in scoring up when one occurs. If you open the console, a more detailed message should be visible.

I wanted to try this. But for some reason, the page is not loading correctly. I am trying to do "Open Storage" and "load" the music on one of my "slots." After this, the bounding boxes of the staves appear and the voice's metadata (mensuration and label of the voice), but no music is rendered. And when I click on "Save to MEI file" or on "Move to Score Editor", nothing happens.

JRegimbal commented 4 years ago

Hmm this might have something to do with me changing the MusicItem object to keep track of a key signature. Could you share if an error appears in the console?

martha-thomae commented 4 years ago

Sure! This is what I see after loading a particular slot:

1 After load

And when I try to "move to score editor," I have this extra error:

2 After clicking on moving to score

JRegimbal commented 4 years ago

Okay I think this is something I can fix. I'll let you know when it should work for you.

JRegimbal commented 4 years ago

@martha-thomae it should be working now. Let me know if it isn't!

martha-thomae commented 4 years ago

It is working. Thanks!

martha-thomae commented 4 years ago

So, going back to:

I've edited the score editor to display an alert with a short description of the error in scoring up when one occurs. If you open the console, a more detailed message should be visible.

Is it possible to display in which line the error happens? Maybe I am just not understanding the message in the console. I would like to be able to know that this was the issue:

The issue is in the ArsAntiqua.js file with the issue being last_uncolored_note is undefined at line 100.

Here is my console, I don't see anything that would let me know that the issue "Cannot read property 'hasAttribute' of underfined" (indicated in the dialog box) happened on line 100. This would be really helpful for me to debug. Is it possible just to display the line of the error either in the dialog box or in the console? Thanks! It is really helpful to have everything else being displayed in the console (the note counters). Screen Shot 2020-03-30 at 7 03 02 PM

martha-thomae commented 4 years ago

Perfect! It works :) Very helpful for debugging

Screen Shot 2020-03-31 at 5 07 28 PM

karend27 commented 4 years ago

I think this has also been fixed, and so will close for now.