Crash when adding/removing an instrument in Continuous view after autosave

• Oct 27, 2015 - 19:32
Reported version
3.2
Priority
P1 - High
Type
Functional
Severity
S2 - Critical
Reproducibility
Always
Status
closed
Regression
No
Workaround
No
Project
Tags

GIT commit: f51dc11

Bonjour
cela fait plusieurs fois sur différents fichiers que MS plante à l'ajout d'instrument. Ce n'est pas systématique.
je saisi "I"
la fenêtre "MuseScore : Instruments" s'ouvre
je choisi des instruments
je valide
et ça affiche une fenêtre Windows qui m'informe que MS a planté
MS 2.0.2
révision f51dc11


Comments

please attach here a score which creates problems, which operating system?
s'il vous plaît joindre ici un fichiers qui crée des problèmes. Lequel système d'exploitation?

Status (old) active needs info

Please give precise step by step instructions to reproduce the problem. I tried going to Instruments, double clicking "C Trumpet", then OK, and it did not crash. Perhaps it is something specific about what you are doing within the dialog that causes the problem, but we need to know what.

Again, in order to be of any assistance, we need the specific score and precise steps to reproduce the problem. We already know what a crash dialog looks like :-), we need to know how to make MuseScore crash on our systems as well.

I'm sorry, but I already send you the file
but of my point of view it don't depend of a particular file
I already send you my procedure step by step
I use only command of the menu, no shortcut,
But as I tell you before
the crash don't happened at each time I add instruments
I don't know what else to say

thanks for answers

If some new happened
I will tell you

a new crash . . .
I press the i button
contrary to what I said earlier I use that shortcut
drop-down menu "instruments d'orchestre"
cuivres
trombone ténor
I click on the "add"
and it crashes.
Attached in the file room

best regards
RV

Attachment Size
FOC-La_Panthère_rose-5.mscz 39.21 KB
Title plantage à l'ajout d'instruments Crash by adding instrument in the Instruments dialog box

Yeah, I got it!
Not in every detail for now, but for the essential, I think that I have catched the key to this issue, with a randomness really painful! :(
So, to reproduce (or to be in the circumstances to reproduce)

1) Load this file, created from scratch: test file.mscz
2) Select the treble clef of the Flute (it might be: select the 4/4 time sig, or a measure, no matter for now)
3) "I": add any instrument, let say Bassoon in Woodwind.
4) Ok
Result: the instrument is added as expected.
5) Undo
Result: the Flute treble clef is highlighted: this is the main start point of this issue in my opinion for now.
Undo flûte.jpg
6) "I" again
By this action, the Flute treble clef is deselected, as expected… BUT

7) Add a new instrument, eg always in Woodwind.

Now, really, the aim is to receive the highlighting of this treble clef (as on the previous image above) by a certain sequence of operations, various and random, while carefully monitoring the score and the Flute clef. At one point, for sure, it will revert highlighted. The problem is that we can not guess when, from what I understand now.

Sometimes it occurs:
- By selecting directly the staff of the flute (right column)… it works or not!
- By scrolling (slowly, very slowly?) the mouse upon the instruments name (right column), by going up from the added instrument, to the flute, or from the flute (or just the instrument higher?) to the added instrument.
- Or by scrolling slowly line by line upon the staves names, then by scrolling immediatly after the staff type of the instrument: so, the staff becomes highlighted.
- By selecting the staff (or the name) of the new added instrument… sometimes it works or not!
- Sometimes, only by selecting the flute staff, go to do other thing, and one or two minutes later, by coming back, the flute treble clef was highlighted!
- One time, only by double clicking on the "bagpipe" instrument!

If it fails, do Ok (the instrument is added) -> Undo, and re-begin the process. If it fails, re-begin...Yes, I know, very toilsome issue!

To summarize, I would like you to understand that the condition to get a crash every time is: when the selection (the original selection) of the clef (or measure or time signature, or other thing probably) re-becomes effective, ie highlighted. At this moment, the crash systematically occur by adding the instrument.
To follow, some images just before the critical moment. If you get this kind of scenario, and press Ok, you receive a crash.
As told, you may get a crash after the "initial" selection of the time sig, like on the last image.
1 clé flûte.jpg
2 troisième crash.jpg
4 bass clarinet.jpg
And the last one:
5 before ok.jpg

A new one: after adding an instrument (and before Ok), the treble clef suddenly reverts highlighted (why, it is this issue), in this case, when it arrives on the recorder staff, by scrolling the mouse upon the right column x times. And with a crash as result as usual after pressing OK
To be patient...
new one.jpg

Title Crash by adding instrument in the Instruments dialog box Crash when adding instrument after auto save

OK I believe I reproduce it.

MuseScore d45cc192e5

  1. Load this file
  2. Add a couple of notes so the file has some changes to save
  3. Select a clef (this is probably not necessary but it's a good indication that autosave is done)
  4. Press I
  5. Wait for AutoSave to kick in. When done, the clef will turn blue
  6. You should still have the instrument dialog, add an instrument
  7. OK
  8. Undo

--> Crash

Where is the file?!
And what means : Wait to "AutoSave to kick in"? (step #5)

EDIT: ah yes, with this file eg (it's a new file created today, more shorter)
flute hautbois piano.mscz
I always don't understand "auto save to kick in". But yes, you must wait, and quasi a long time (one minute and half or two minutes), and then the clef is turning blue.
This is the explanation of some of my scenarios: "go slowly/very slowly".. or, "select the staff, go to do other thing, come back, and be surprised (me!) to see the clef highlighted:"

This "autosave" was unknow to me... well, see EDIT 1! :) (so, I don't could make the connection in my mind), but indeed, this must be the "principle" of this bug.
And anyway, this is the condition to get the crash after adding the instrument.
Well, it was really a tricky one, if not much more...(euphemism).
Nice for understanding, and for fix a bug really annoying for the stability of the programm in a very "busy area" ie the Instruments dialog box
Thanks to have take a look for that, and provides steps more easily reproducibles :)
turn blue.jpg

EDIT1: ah sorry, of course, the Auto Save in Preferences/General ("save erery: "2 minutes" eg)
Indeed, the clef selection is not necessary:
1) Input two notes
2) Exit "N" (the second note remains highlighted)
3) "I" -> Wait! (the time for the Autosave function) -> the second note is turning blue again
4) Add an instrument -> Ok
Result: crash (not necessary here to make Undo, from what I see)

Indeed, it's seems related, because “Continuous View” is one condition of this issue (no issue in Page View). And I notice a change also on July 8. But here, a frame is not necessary.

So, for summarize this current issue and for suggest steps with a minimal score from scratch.

So:
1) Create a new score for flute -> Finish
2) Toggle to "Continuous View"
3) Input two notes, eg two quarter notes, C and D
4 Leave the Note input mode (so, the D remains highlighted)
5) Press "I" (so, the D is deselected)
6) Wait, patiently ... Better for you if you changed, before, the value of 2 to 1 minute in Preferences / General / Auto Save ! :)

First result: after one minute, the D reverts highlighted

7) Add any instrument, let's say Bassoon
8) Confirm (OK)

Result: crash

As said previously, I notice a change on July 8
But as for the other mentionned issue and possibly related: #84351: Crash when saving with instrument name selected and continuous view, I have difficulties for knowing where this change is located :(

- However, know that it works with this Nightly (no highlighted note after the pending of Auto Save): e5f3119
- It fails with this Nigthly on July 8 (which must to be the first one, from what I see according to the hourly data - I own four nightlies this day) : ef4429a

So, I see possibly this ? https://github.com/musescore/MuseScore/commit/883e38eb6b8eaef62d9f22ef5…
Or/and the next one (= the Nightly mentioned just above) ? https://github.com/musescore/MuseScore/commit/57deb726537c5673c00234bdf…

This same day, there is also seven other commits (by Marc and Werner.) But they do not seem to be involved? Check please! :)

I am pretty sure that first of the two commits you mention above - specifically, this following lines:

https://github.com/musescore/MuseScore/commit/883e38eb6b8eaef62d9f22ef5…

are what triggers this bug, at least in some cases. This is the code I had identified in the discussion at #84351: Crash when saving with instrument name selected and continuous view. We are forcing a change to page view before saving the file, and then restoring the original view afterwards by forcing an "undo". This mostly works, but if the selection includes an element that changes when switching views - like the instrument name or clef, which are attached to specific systems - then things go wrong when we try to re-establish the selection.

I am thinking the actual code in the above commit *should* be fine, but the real problem is elsewhere in the management of undo and/or selection. On the other hand, the easier fix might be to revisit how we force the score into page mode when saving the thumbnail - maybe make a *copy* of the score instead?

Title Crash when adding instrument after auto save Crash when adding/removing an instrument after auto save

Always active in current 2.1 dev.

See #15 for steps:
So, with this file: Continuous auto save.mscz, in Continuous View, when the note reverts highlighted - after the time of Auto save -, add another instrument or remove eg the Alto sax causes a crash.

With some recent changes to handling of selection, I think this can finally be closed. I followed the steps and patiently waited during step 6) - actualy, I did the dishes :-) - but the note never highlighted again, and no crash. I'm sure some sufficiently determined person will still be able to find a way to force a crash along these lines, but I think the worst of it is over.

Reported version 2.1 3.2

OS: Windows 10 (10.0), Arch.: x86_64, MuseScore version (64-bit): 3.3.0.8605, revision: c94866a (and in MS 3.2.3)

The crash happens without fail, even within seconds of adding another staff to a newly-created score:

  1. In the New Score wizard create a "Treble Clef" score, default time sig. and key sig.:
  2. Change to continuous view;
  3. In the Instruments dialogue, add a flute staff, say, and exit;
  4. Press Ctrl + Z to UNDO.
    Result: Crash!
Title Crash when adding/removing an instrument in Continuous view after auto save Crash when adding/removing an instrument in Continuous view (after auto save?)
Title Crash when adding/removing an instrument in Continuous view (after auto save?) Crash when adding/removing an instrument in Continuous view

It's an old thread (and for version 2), it would have been better to open a new thread since, clearly, auto save is not the issue here.

Title Crash when adding/removing an instrument in Continuous view Crash when adding/removing an instrument in Continuous view atfer autosave

I introduced again the term auto save for the title (of this old thread), and please open a new issue (with the steps mentioned above) for the current version 3