Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Try fix crash on get tabScoreView (from CrashReporter) #5846

Merged
merged 1 commit into from
Mar 24, 2020

Conversation

igorkorsukov
Copy link
Contributor

@igorkorsukov igorkorsukov commented Mar 20, 2020

Resolves: https://sentry.musescore.org/musescore/editor/issues/9171 (from CrashReporter)
evens: 508
dump:

Fatal Error: EXCEPTION_ACCESS_VIOLATION_READ
MuseScore3 0x000140363167 Ms::ScoreTab::tabScoreView(int) c:\musescore\mscore\scoretab.h:54
Qt5Core 0x7ffaacc93180 <unknown>
Qt5Core 0x7ffaac953993 <unknown>
MuseScore3 0x000140363602 Ms::ScoreTab::viewSplitter(int) c:\musescore\mscore\scoretab.cpp:107
MuseScore3 0x0001403635b9 Ms::ScoreTab::view(int) c:\musescore\mscore\scoretab.cpp:95
MuseScore3 0x000140362069 Ms::ScoreTab::initScoreView(int,double,Ms::MagIdx,double,double) c:\musescore\mscore\scoretab.cpp:464
Qt5Core 0x7ffaac7b5287 <unknown>
MuseScore3 0x00014028496a Ms::MuseScore::restoreSession(bool) c:\musescore\mscore\musescore.cpp:5216

The single-line methods in the .h files do not motivate us to do state checks and do not allow us to see exactly which action failed.
Rewrote the code, added assertions.

  • I signed CLA
  • I made sure the code in the PR follows the coding rules
  • I made sure the code compiles on my machine
  • I made sure there are no unnecessary changes in the code
  • I made sure the title of the PR reflects the core meaning of the issue you are solving
  • I made sure the commit message(s) contain a description and answer the question "Why do those changes fix that particular issue?" or "Why are those changes really necessary as improvements?"
  • I made sure the commit message title starts with "fix #424242:" if there is a related issue

Comment on lines +178 to +180
//---------------------------------------------------------
// tabScoreView const
//---------------------------------------------------------
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think these can be omitted...

@igorkorsukov igorkorsukov changed the title Try fixed crash on get tabScoreView (from CrashReporter) Try fix crash on get tabScoreView (from CrashReporter) Mar 20, 2020
@anatoly-os anatoly-os merged commit 03b2c1a into musescore:master Mar 24, 2020
@igorkorsukov igorkorsukov deleted the setry_8X6_tabscoreview branch March 27, 2020 12:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants