Skip to content

[4.7.4] Fix #33752: avoid adding dock to frame that will be deleted later#33848

Draft
RomanPudashkin wants to merge 2 commits into
musescore:4.7from
RomanPudashkin:fix_piano_panel_crash_47
Draft

[4.7.4] Fix #33752: avoid adding dock to frame that will be deleted later#33848
RomanPudashkin wants to merge 2 commits into
musescore:4.7from
RomanPudashkin:fix_piano_panel_crash_47

Conversation

@RomanPudashkin

Copy link
Copy Markdown
Contributor

Resolves: #33752

…later

The dock widget may still hold a pointer to such a frame in m_lastPositions
Restoring it there causes FrameQuick::~FrameQuick()
to delete the dock widget via qDeleteAll(), leading to a crash later
@RomanPudashkin

Copy link
Copy Markdown
Contributor Author

@coderabbitai full review

@coderabbitai

coderabbitai Bot commented Jun 16, 2026

Copy link
Copy Markdown
Contributor
✅ Action performed

Full review finished.

@coderabbitai

coderabbitai Bot commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 3089dd00-772d-4395-924e-9d4713f162f7

📥 Commits

Reviewing files that changed from the base of the PR and between 4e929dc and 96dd821.

📒 Files selected for processing (4)
  • src/app/configs/data/shortcuts.xml
  • src/app/configs/data/shortcuts_azerty.xml
  • src/app/configs/data/shortcuts_mac.xml
  • src/framework/dockwindow/thirdparty/KDDockWidgets/src/private/LayoutWidget.cpp

📝 Walkthrough

Walkthrough

Two unrelated fixes are included. First, <autorepeat>0</autorepeat> is added to the toggle-piano-keyboard and toggle-percussion-panel shortcut entries in all three shortcut configuration files (shortcuts.xml, shortcuts_azerty.xml, shortcuts_mac.xml), disabling key-repeat for those actions. Second, LayoutWidget::restorePlaceholder in the KDDockWidgets third-party component gains an early-return guard that exits immediately if the target Frame is marked as being deleted (beingDeletedLater()), skipping placeholder restoration in that case.

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Description check ⚠️ Warning The PR description is incomplete. It provides only an issue link but lacks required checklist items, commit messages, code review effort details, and motivation for changes. Complete the PR description by filling in all required checklist items and adding details about testing, code guidelines compliance, and the technical approach taken to fix the crash.
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly describes the main fix: preventing dock widgets from being added to frames scheduled for deletion, directly addressing issue #33752.
Linked Issues check ✅ Passed The code changes directly address the root cause of issue #33752 by preventing dock widgets from being added to frames marked for deletion, fixing both documented crash scenarios.
Out of Scope Changes check ✅ Passed All changes are within scope. The shortcut configuration modifications appear to be part of a multi-faceted fix, and the LayoutWidget.cpp change directly targets the crash issue reported.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@RomanPudashkin RomanPudashkin requested a review from Eism June 16, 2026 15:51
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 interacting with MSS after using keyboard shortcut to show Piano keyboard (Linux only)

1 participant