forked from musescore/MuseScore
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
Crash going from page to continuous view and then clicking on score element.... #145
Labels
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Issue type
Crash or freeze
Bug description
Oh gosh, this one took me a while to figure out (realize that there was a problem, let alone solve it). Since I'm still on 3.7 for now this was rare but important enough under certain circumstances
The crash actually doesn't happen often (but it did happen often on one particular score I was working on when switching into continuous view. Not sure what it's contingent upon. I think it has to do with the spacing of staves and the footer/header. Anyways...
Steps to reproduce
1.) Make a score
2.) Make sure to have header/footers on
3.) Make sure to have score be filled up to an entire page to some sort, spilling into page 2
4.) Click on score elements while in continuous view after switching from page view
Now open that score in page-view, then switch to continuous view
Then attempt to select an element on the score. Odds are a crash occurs, but not always couldn't figure out what it was... The reason has something to do with a text pointer being given a parent of type "page" instead of null... when from backporting musescore#9193
I figured I'd bring this up as one of those "Obscure" 3.7 bugs.
Author: Nick Mazuk Nick-Mazuk@users.noreply.github.com 2021-09-21 00:03:03
Committer: Joachim Schmitz jojo@schmitz-digital.de 2022-05-11 23:34:48
and i'm 99% sure the culprit is that "pseudo" valid text pointer which will trigger a "valid" parent but it isn't set up so that when handling the mouse press event handler to find the elements surrounding it... it picks up sometimes this "text" that doesn't have a full setup to it, but it passes the null pointer check and then hell breaks loose later
has this:
and the text->setParent((Page*)this) needs to become
since the text has no business being attached to the score like that, from what I can tell. After setting parent to nullptr, I can't replicate the crash. Apparently in the 4.0 code they had something like
text->moveToDummy();
... just in case I'm not the only one who cares about this shit..
Screenshots/Screen recordings
Here's a peculiar score demonstrating the crash
demonstration.mp4
MuseScore Version
3.7
Regression
Yes, this used to work in MuseScore 3.x and now is broken
Operating system
XFCE
Additional context
No response
The text was updated successfully, but these errors were encountered: