Crash on changing time signature in part

• Feb 19, 2014 - 03:17
Type
Functional
Severity
S2 - Critical
Status
closed
Project
Tags

Windows 7, GIT commit: 1b1f704

1) open attached score (nothing special, just two staves with some notes)
2) file / parts
3) new all
4) OK
5) view first part
6) drag 3/4 time signature to score

Result: crash

Attachment Size
part-meter-crash.mscz 1.4 KB

Comments

This is probably related to #24073: Insert measure in score with part and without title fails.
Indeed, if you add a title before step 2) with:
- Add > Text > Title and type something
after the final step the score does not crash.

Windows 8.1, commit 151ce0c

Note:
The time signature is updated in both parts, but when switching to the root score tab, it still displays 4/4. By forcing a refresh, for example by double-clicking an element, the root score is updated to 3/4.

@Marc: can you try with the latest commit?
I can't reproduce the crash with "style-override.mscx" both under Windows 8.1 and under Linux Mint 13 with commit 151ce0c38 (both self-compiled, both debug release).

Notes: in this case, the root score is updated to 3/4 without forcing a refresh as for the other file.

Edit: Ok. I managed to reproduce the crash. It happens when the new time signature is dropped onto a measure different from the first.

Attached the log of address sanitizer for the crash when dropping the time signature change onto the second measure (no crash if the score has a title and the time sig is dropped onto the first measure in the part).

The crash in this case happens at line 325 of libmscore/staff.cpp
timesigs[timesig->segment()->tick()] = timesig;

Attachment Size
crash_time_sig_parts.txt 4.33 KB

Great, thanks for the clarification & investigation. Sorry my initial instructions were less specific, but in that case, I *did* check that it didn't matter which measure you dropped onto.

One other thing I should have made clear: the problem only occurs if you are viewing a part, as opposed to the score, when you make the change.

I know this is a bit of a cop-out, but FWIW, I wouldn't be opposed to simply disallowing any change of time signature (including actual duration, or split/join) while viewing a part as opposed to while viewing the score. My rationale is the same as when I proposed we disallow deleting / inserting measures: I think it's too easy to forget any change made to the basic time structure of a part will also affect the score and all other parts.

Fixing the bug would be fine too of course :-).