Crash after closing score if loading style that defines chord id

• Dec 17, 2013 - 06:37
Type
Functional
Severity
S2 - Critical
Status
closed
Project

I have a session with multiple scores in it. When I reopen the session, the app crashes after closing two files in a row.

STEPS:
1. launch app
2. open a few scores
3. preferences set to "Continue Last Session"
4. quit app
5. restart app
6. close a score tab by clicking the 'X'
7. close another score tab by clicking the 'X'

RESULTS:
Crash (see attached crash log)

EXPECTED RESULT:
Score is closed without a crash.

CONFIG:
c67a0ae
MacOS 10.8.5

Attachment Size
crash.txt 54.49 KB

Comments

I seem to be able to reproduce this on demand. The crash log says something about a chord symbol:

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 org.musescore.MuseScore 0x00000001019fee4d Ms::ChordDescription::~ChordDescription() + 61
1 org.musescore.MuseScore 0x00000001019fa9f5 Ms::ChordList::~ChordList() + 181
2 org.musescore.MuseScore 0x0000000101ad6fa8 Ms::StyleData::~StyleData() + 40

I'm using chord names over slashes in all these scores. I'll try to repro with a simple case and attach the scores.

Yes, it is easy to reproduce following these steps:

1. create two scores using the 'Jazz Lead Sheet' template
2. add chord names above a few measures in each score by selecting the rests and pressing CMD-K
3. close one of the tabs
4. close the other tab

It should crash at this point. I can't reproduce by just opening two scores. My workflow right now is adding lots of chord symbols so it appears you have to invoke the chord editor and then close the tab.

Can you reproduce it starting from scratch instead of using the template? The template aren't exactly trustworthy right now. In particular, I updated that template a few months ago, so it's in a several-months-old format and might well contain what are now invalid tags.

But FWIW, it doesn't crash for me even when using that template. So it could be Mac-specific, or else something else particular to what chords you are entering, the order in which you close the scores, whether you save them, etc. So try to be as specific as possible in listing steps to reproduce.

I get the same crash following the above steps but creating "from scratch" rather than "Jazz Lead Sheet".

However, I do have a custom stylesheet set in preferences and when I remove that, it does not crash.

I'm attaching the custom style sheet as well. Install that as the default score stylesheet and that will cause the crash.

I created the style file with Style > Save Style… after making a few customizations to the Jazz Lead Sheet template.

Attachment Size
jcs.mss 22.3 KB

Thanks, that enabled me to reproduce the crash. It may well turn out to be that the MSS file is invalid - anything created with an older nightly build is not guaranteed to work - but looking at its contents, I don't see anything obvious that should lead to a crash. I will continue to investigate; it definitely seems to be in the chord symbol handling code.

Title Crash when closing multiple scores Crash after closing score if loading style that defines chord id

I've figured out the cause of the crash and updated the issue title to something more meaningful, to me anyhow. Good job remembering you were using a custom style; that was definitely the trigger. Not any custom style, just one that loads a chord description file that defines custom rendering for specific chords rather than just rely on general rendering rules. The default chord symbol style does not define any custom rendering, but the "Jazz" style defines custom rendering for 6/9 chords.

FWIW, it won't just be closing the second score that will crash MuseScore. After closing one score, anything you do that causes MuseScore to think about chord symbols will crash.

I'll try to get a fix figured out soon; thanks for the report!

In the process of tracking this down, I've found two related issues:

#23956: Setting a default style affects loaded scores, not just new ones
#23957: Crash on chord symbol entry after load of style

The one about the default style overriding styles even in loaded (as opposed to new) scores might be the root cause of this one - the basic problem is that if you use a default style that defines a chord list (as the Jazz chord symbol does), that chord list ends up being shared by all scores. And closing one score destroys the chord list for the other scores too.

Status (old) fixed active

Never mind, still reproducible :-(

For future reference:

1) create new score (#1) from scratch
2) style / general / chord symbols
3) change style to "jazz" using radio buttons, OK
5) style / save
6) call it "JazzChordSymbols.mss", OK
7) edit / preferences / score, style
8) select "JazzChordSymbols.mss", OK

Those steps can be done ahead of time. Now, to actually reproduce the bug:

9) create new score (#2) from scratch
10) add chord symbol
11) create new score (#3) from scratch
12) add chord symbol
13) close score #3
14) close score #2

Result: crash, on destruction of chordList in style

Really, anything you do with score #2 after step 13 that causes the chordList to get looked at will likely crash. Entering a new chord symbol (different type of chord from the first), for example.