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 freeze on add title text #24816

Merged
merged 1 commit into from
Sep 24, 2024

Conversation

mike-spa
Copy link
Contributor

Resolves: #24795

The problem is two-fold. First: the program was getting stuck on a loop because, after adding a new VBox, it was trying to move the staff type changes by a given tick difference, but the VBox has zero tick so the loop was never progressing. Second: the VBox shouldn't be actually added because one is already there. The reason it was being added is that there is an empty part that doesn't have the title VBox, and adding it to the part was also creating it in the score.

@oktophonie oktophonie added the vtests This PR produces approved changes to vtest results label Sep 20, 2024
@DmitryArefiev DmitryArefiev self-assigned this Sep 20, 2024
@DmitryArefiev
Copy link
Contributor

@mike-spa Tested on Win/Mac. I still can crash with these steps (and that score):

  1. Add Title
  2. Add Subtitle
  3. Undo All
  4. Add Title
bandicam.2024-09-20.14-10-14-187.mp4

@mike-spa
Copy link
Contributor Author

@DmitryArefiev should be fixed!

@DmitryArefiev
Copy link
Contributor

@mike-spa Found another one.. Can you check it also?

  1. Open that score
  2. Open all parts
  3. Select 1st measure and activate Note input
  4. Add Title (with some letters)
  5. Undo all
  6. Add Title (with some letters)
  7. Click on empty space
bandicam.2024-09-20.18-40-01-231.mp4

@mike-spa
Copy link
Contributor Author

@DmitryArefiev I'm copying your steps but I really can't reproduce this last one. I've rebased the branch, could you check again with the new build?

@DmitryArefiev
Copy link
Contributor

@mike-spa I still can't reproduce with that score. But also, I found a score that crashes with the similar steps and the crash doesn't occur in master. Please try it:

  1. Open bends.zip
  2. Open all parts
  3. In score, Add Title (with some letters)
  4. Undo all
  5. Add Title (with some letters)
  6. Undo all
bandicam.2024-09-23.15-56-54-884.mp4

logs.zip

@mike-spa
Copy link
Contributor Author

Here's the situation. There is this piece of code from here which is clearly wrong (for example, it causes an unnecessary frame to be added to the main score in the file from the original issue). Moreover this line creates spurious duplicate links between the title frames. In debug builds, this causes an assertion failure which was preventing me to even get to the actual issue I was trying to fix, so I tried to fix this code as well. However, it turns out that creating those wrong duplicate links, by pure coincidence, prevents the crash that @DmitryArefiev found in the last video. That crash has a much deeper and much more complex cause which can't be fixed in a patch release.

So, long story short, I've given up on fixing that piece of code, and left in just the bare minimum solution which fixes the linked issue. This should avoid the crashes. And about that last crash, I'll log a separate issue.

@DmitryArefiev
Copy link
Contributor

@mike-spa Got it!

Tested #24795 on Win10, Mac13.6, LinuxUbuntu22.04 - FIXED

@DmitryArefiev DmitryArefiev merged commit f14d5ec into musescore:master Sep 24, 2024
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
vtests This PR produces approved changes to vtest results
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Freeze when using Add > Text > Title in certain score (score with Staff type change marks)
5 participants