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

fix #163691: crash on undo with links to self #3159

Closed
wants to merge 1 commit into from

Conversation

MarcSabatella
Copy link
Contributor

When we remove a linked staff, the elements on the remaining staff still contain links to the corresponding elements on the removed staff. This is something that has bothered me for some time, and I'm pretty sure it leads to other problems as well. So ultimately, I still think we should address this.

However, that would undoubtedly have major ramifications, so I am not going there right now. The issue at hand - https://musescore.org/en/node/163691 - is triggered by the specific case of an element linked to itself that results from removal of a linked staff followed by save/reload. If you then remove the remaining staff and undo, you get an assertion failure. I elected to go with a "100% safe" solution. I simply removed the assert statement that led to the crash, and just return without doing anything in that case. No crash, and it has the added benefit of fixing the link to self thus hopefully reducing the likelihood of further problems.

Worst case, some series of steps that formerly crashed right away due the assertion failure will now crash later.

@anatoly-os
Copy link
Contributor

@MarcSabatella 2.1 branch is not viable anymore. Could you please verify whether we need it for master and if so reopen the PR?

@MarcSabatella
Copy link
Contributor Author

Well, no crash following those same steps, and indeed, code is totally different, there isn't an assert to cause a crash anywhere in undo.cpp :-)

The score attached to the original bug report is crazy slow to process, FWIW.

@MarcSabatella
Copy link
Contributor Author

But just in case there happens to be a 2.3.2...

@MarcSabatella MarcSabatella reopened this Jul 9, 2018
@anatoly-os
Copy link
Contributor

No chance :)

@anatoly-os anatoly-os closed this Jul 9, 2018
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.

None yet

2 participants