Skip to content

Fix EditStaff dialog crash on startup#32744

Closed
CubikingChill wants to merge 1 commit intomusescore:masterfrom
CubikingChill:fix/editstaff-crash
Closed

Fix EditStaff dialog crash on startup#32744
CubikingChill wants to merge 1 commit intomusescore:masterfrom
CubikingChill:fix/editstaff-crash

Conversation

@CubikingChill
Copy link
Contributor

The crash occurred because initStaff() was called in the constructor before the context injection system was fully initialized. After the MUSE_MULTICONTEXT_WIP removal, globalContext() returns null during construction, causing a segfault when notation() is called.

Fixed by moving initStaff() from the constructor to showEvent(), ensuring the context is ready before accessing it.

Resolves: #32743

  • I signed the CLA
  • The title of the PR describes the problem it addresses
  • Each commit's message describes its purpose and effects, and references the issue it resolves
  • If changes are extensive, there is a sequence of easily reviewable commits
  • The code in the PR follows the coding rules
  • There are no unnecessary changes
  • The code compiles and runs on my machine, preferably after each commit individually
  • I created a unit test or vtest to verify the changes I made (if applicable)

@CubikingChill CubikingChill force-pushed the fix/editstaff-crash branch 3 times, most recently from 1fba4f0 to b7e0491 Compare March 23, 2026 21:23
The crash occurred because initStaff() was called in the constructor
before the context injection system was fully initialized. After the
MUSE_MULTICONTEXT_WIP removal, globalContext() returns null during
construction, causing a segfault when notation() is called.

Fixed by moving initStaff() from the constructor to showEvent(),
ensuring the context is ready before accessing it.
@igorkorsukov
Copy link
Contributor

replaced by #32757

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.

Crash when opening Staff/Part Properties

2 participants