musescore / musescore/MuseScore

Assert (debug-mode only) when changing measure properties

Open
#17,869 2 comments 0 reactions 1 assignee View on GitHub

@RomanPudashkin is already working on this.

Since Jun 12, 2023.

Dominant language
C++
Stars
15.1k
Forks
3.3k
Avg merge
2d 2h
Merged PRs (30d)
91

Description

Issue type

Crash or freeze

Bug description

No response

Steps to reproduce
  1. Open attached score (WIP.zip) or create a score from scratch
  2. Right-click into measure 8 of the above score or any measure
  3. Select Measure properties
  4. Change the play count (of the above score) or any other poperty
  5. Press OK or Apply

--> Crash!

Screenshots/Screen recordings

"Famous last words" in the logs:

2023-06-06T13:38:48.425 | INFO  | main_thread | ActionsDispatcher | dispatch: try call action: measure-properties
2023-06-06T13:38:48.471 | DEBUG | main_thread | UiActionsRegister | updateEnabledAll: currentCtx: UiCtxNotationFocused
2023-06-06T13:38:48.493 | DEBUG | main_thread | UiActionsRegister | updateEnabledAll: currentCtx: UiCtxNotationFocused
2023-06-06T13:38:48.549 | DEBUG | main_thread | UiActionsRegister | updateEnabledAll: currentCtx: UiCtxUnknown
2023-06-06T13:38:48.663 | DEBUG | main_thread | UiActionsRegister | updateEnabledAll: currentCtx: UiCtxUnknown
2023-06-06T13:38:52.651 | DEBUG | main_thread | Score      | endCmd: Undo stack current macro child count: 1
2023-06-06T13:38:52.656 | DEBUG | main_thread | UiActionsRegister | updateEnabledAll: currentCtx: UiCtxUnknown
2023-06-06T13:38:52.658 | DEBUG | main_thread | UiActionsRegister | updateEnabledAll: currentCtx: UiCtxUnknown
2023-06-06T13:38:52.661 | ERROR | main_thread | InteractiveProvider | topWindow: "ASSERT FAILED!": Window must have a parent!, file: C:/Users/Jojo/Documents/GitHub/MuseScore/src/framework/ui/view/interactiveprovider.cpp, line: 479

So it dies of a failed assertion...

    if (!last.window->parent()) {
        ASSERT_X("Window must have a parent!");
    }
MuseScore Version

OS: Windows 10 Version 2009 or later, Arch.: x86_64, MuseScore version (64-bit): 4.1.0) (Self built from latest master code, in Debug and in RelWithDebInfo mode)

Regression

Yes, this used to work in a previous version of MuseScore 4.x

Operating system

Windows 11

Additional context

Commenting out that ASSERT_X() prevents that crash (unsurprisingly) and (to my surprise) doesn't seem to have any ill effects.

Logs:

2023-06-06T13:50:19.727 | DEBUG | main_thread | Score      | endCmd: Undo stack current macro child count: 1
2023-06-06T13:50:19.731 | DEBUG | main_thread | UiActionsRegister | updateEnabledAll: currentCtx: UiCtxUnknown
2023-06-06T13:50:19.734 | DEBUG | main_thread | UiActionsRegister | updateEnabledAll: currentCtx: UiCtxUnknown
2023-06-06T13:50:19.748 | DEBUG | main_thread | UiActionsRegister | updateEnabledAll: currentCtx: UiCtxNotationFocused
2023-06-06T13:50:23.439 | DEBUG | main_thread | UiActionsRegister | updateEnabledAll: currentCtx: UiCtxNotationFocused
2023-06-06T13:50:23.963 | DEBUG | main_thread | UiActionsRegister | updateEnabledAll: currentCtx: UiCtxNotationFocused
2023-06-06T13:50:24.428 | WARN  | main_thread | Qt         | QQmlComponent: Created graphical object was not placed in the graphics scene.
2023-06-06T13:50:24.528 | DEBUG | main_thread | UiActionsRegister | updateEnabledAll: currentCtx: UiCtxNotationOpened
2023-06-06T13:50:26.364 | DEBUG | main_thread | UiActionsRegister | updateEnabledAll: currentCtx: UiCtxNotationFocused
2023-06-06T13:50:26.460 | DEBUG | main_thread | UiActionsRegister | updateEnabledAll: currentCtx: UiCtxNotationFocused
2023-06-06T13:52:36.681 | DEBUG | main_thread | UiActionsRegister | updateEnabledAll: currentCtx: UiCtxNotationOpened
2023-06-06T13:52:36.683 | DEBUG | main_thread | UiActionsRegister | updateEnabledAll: currentCtx: UiCtxNotationOpened
2023-06-06T13:52:36.686 | DEBUG | main_thread | UiActionsRegister | updateEnabledAll: currentCtx: UiCtxUnknown

That ASSERT_X() came in with #16132 to fix #15171

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.