If Play Panel is open closing the score causes crash

• Apr 4, 2018 - 17:50
Reported version
2.1
Type
Functional
Severity
S2 - Critical
Status
closed
Project
Priority (old)
critical
Status (old)
closed
Component (old)
Code
Category (old)
bug report

3.0.0, revision: b711622 (also on 2.2.1, revision: g51b8386/2.3.0, revision: 83b2f23)
Open a score;
Open the Play panel;
Move slightly the Tempo cursor;
Close the score with the 'X' in the tab:
Crash.


Comments

Reported version 3.0-dev 2.1

Stack trace (for master):
1 Ms::Seq::curTempo seq.cpp 1556 0x4f7c8f
2 Ms::PlayPanel::relTempoChanged playpanel.cpp 100 0x4e7783
3 Ms::PlayPanel::relTempoChanged playpanel.cpp 112 0x4e7806
4 Ms::PlayPanel::qt_static_metacall moc_playpanel.cpp 128 0x6e60de
5 ZN11QMetaObject8activateEP7QObjectiiPPv 0x68c72fb2
6 ZNK8QSpinBox5fixupER7QString 0x20753bc5
7 ?? 0x7f000003
8 ??

double Seq::curTempo() const
      {
      return cs->tempomap()->tempo(playPos->first);
      }

cs doesn't exist anymore after having closed all scores

Possible fix (tested, does fix the crash, and I don't see any bad side effects):

double Seq::curTempo() const
      {
      return cs? cs->tempomap()->tempo(playPos->first) : 0.0;
      }

I am experiencing this exact problem (OS: Windows , Arch.: x86_64, MuseScore version (32-bit): 2.2.1, revision: 51b8386). It only seems to crash if you change the tempo in the play panel (to something other than 100%) and then close the file.