Creation of tuplets causing MScore to hang and crash (and other odd behavior)

• Jul 16, 2009 - 09:10
Type
Functional
Severity
S2 - Critical
Status
closed
Project

Creation of tuplets causing MScore to hang and crash.

Steps:

  • Create piano score from template with 5/4 time signature
  • Select measure rest.
  • Ctl/Cmd+6 for sextuplet
  • Without any intervening steps (such as setting note length to quarter), begin adding notes (ex: c,d,e,f). On fourth note MScore hangs. I have to force-quit on my mac.

Odd behavior:
If you do select quarter before entering notes, no notes will be entered until you exit the tuplet and arrive in the next measure.

Hang report attached.

Attachment Size
tuplet_hang.zip 14.44 KB

Comments

I not able to reproduce the crash on Windows using r. 1938 (self-built) or r. 1926 prerelease.

I am not able add notes to the tuplet though.

I'm using the latest prerelease for Ubuntu 9.04, r1898, and I've got quite a similar problem. When creating tuplets other than those predefined, if I'm entering the notes using the keyboard, MuseScore crashes when I enter the latest note of the tuplet, but not if I enter that note using the mouse.

Title Creation of tuplets causing MScore to hang and crash r1934 (and other odd behavior) Creation of tuplets causing MScore to hang and crash r1944 (and other odd behavior)
Title Creation of tuplets causing MScore to hang and crash r1944 (and other odd behavior) Creation of tuplets causing MScore to hang and crash (and other odd behavior)

I was able to reproduce the hang once today using RC1 (r.1944). Since that time I have been unable to reproduce it.

(By the way there is no need to include the revision number in the title. It is assumed that it applies to the most recent revision--otherwise it would be marked as fixed.)

I would like to postpone a fix to rev. 0.9.6 as i am working on a new implementation which allow for nested tuplets. This required a lot of changes to the code and is not ready for current release candidate.

Another way to cause a crash in Windows is to:

1. Create a new score (I used the piano.mscz template).
2. Press "n" to enter note entry mode.
3. Don't enter any notes yet. Instead, click on the icon for a voice other than voice 1.
4. Press Ctrl+3 for a triplet.
5. CRASH

In the top case MuseScore runs into a situation it cannot handle and for debugging purposes aborts (instead of silently ignoring the request). Problem is the whole measure rest which is divided up in a tuplet as measure rests can have arbitrary durations.
Does make dividing 5/4 into 6 any sense and if yes how should mscore interpret this?

Expected behavior is 6 tuplet quarter notes in the space of five regular quarter notes.

In the next few days I'll see if I can write up some general guidelines if you want.

As I said in another comment somewhere, using Ctrl + "X" is a good way for inputing common tuplets with a default settings. (You select a quarter, you press Ctrl +3 you have a 3 eight notes tuplet for a quarter duration)

For more advanced users/ tuplets, a dialog where you can choose

  • the total length of your tuplet ( 13x16th notes)
  • the number of equal element in it (3)
  • the single element "graphic" (8th notes)

could be helpful. (I want to put 3 8th notes in the time of 13 16th notes)

@david An exhaustive study like the one you did for transpose can be very valuable for sure.

The latest revision tries a new formula to automatically determine the tuplet properties. This also fixes the original bug.
Input to the algorithm is a fraction which has to be divided into n equal pieces. We need to calculate the tuplet ratio and the duration type of one tuplet element. Example for 1/4 divided into 3 (triplet): ratio is 3/2 and element duration 1/8. Real duration of the 1/8 tuplet element is 1/8 / ratio = 1/12. If we choose 1/4 notes for our triplet, we have a ratio of 3/1 (1/4 / 3/1 = 1/12).
The algorithm tries to minimize the difference between numerator and denominator to calculate a suitable ratio.

.