-
-
Notifications
You must be signed in to change notification settings - Fork 1
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
Fix GH#145: Crash going from page to continuous view and then clicking on score element #146
Conversation
Darn, the linux build, esp. the mtests, run out of disk space |
Oh that's too bad about disk-space. Wonder what changed to have that happen? Yes, that's right. To be a little "correct" also, you could change out since it's the same code from same situation
void Page::drawHeaderFooter(QPainter* p, int area, const QString& ss) const has the line: text->setParent(0); and the 0 could become The crash is rare, but when it happens, it's weird to solve. bool Element::contains(const QPointF& p) const
{
return shape().contains(p - pagePos());
} at the code that reads: else {
if (parent()->parent())
p += parent()->pagePos();
} where parent() would end up being this text pointer (from the headerfooter code of the mentioned PR) that had a parent (page pointer) passing the nullptr check but then has no actual member functions set up properly or something like that and crashes on the pagePos() call. Difficult to find imo. I couldn't even call parent()->name() to find out what kind of element it was that was having a problem.... since parent was this "half-fake" text pointer creation thing. |
…g on score element
Oh, hey by the way for example: https://musescore.com/user/2660886/scores/6026988 if you download that score and then load it up, select an element in page view, then switch to continuous view and click around the first systems' notes... it should be easier to reproduce the crash I'm getting as an example Looks like the damned mtests of Linux build is still having a problem |
Doesn't reproduce with that score for me either. But I'm not on Windows (11), so stuff like a dangling pointer may not crash at all or at a different place. |
@worldwideweary please check #150, I guess this change here cause that. |
Resolves: #145