Skip to content

Fix MuseScore crash when build in Debug mode - #336

Merged
igorkorsukov merged 1 commit into
musescore:mainfrom
Jojo-Schmitz:fix-crash-debug
Oct 5, 2026
Merged

igorkorsukov merged 1 commit into
musescore:mainfrom
Jojo-Schmitz:fix-crash-debug

Conversation

@Jojo-Schmitz

@Jojo-Schmitz Jojo-Schmitz commented Oct 4, 2026 •

Copy link
Copy Markdown
Contributor

With that change these logs are seen, several times:

19:18:52.921 | WARN  | main_thread     | CommandDispatcher::reg | command already registered: command://extension/extensions/dev/apitests/myform
19:18:52.921 | WARN  | main_thread     | CommandDispatcher::reg | command already registered: command://extension/extensions/dev/apitests/mymacros

Without: crash at (the first of) those places when build in debug mode.
Happens even after reverting M;useScire to factory settings

@coderabbitai

coderabbitai Bot commented Oct 4, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository: musescore/muse_framework/.coderabbit.yaml
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: fb06a288-04be-4250-ac53-c1608d413d42
📥 Commits

Reviewing files that changed from the base of the PR and between 404fb5c and c5a8914.

📒 Files selected for processing (1)
  • framework/rcommand/internal/commanddispatcher.cpp

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

CommandDispatcher::reg now checks for an existing command registration with a regular if condition instead of IF_ASSERT_FAILED. The duplicate-registration branch still logs a warning and returns.

Priority: ⬇️ Low

Merge Risk: ⚪ Minimal · up to c5a89

Duplicate command registrations now produce a warning instead of crashing Debug builds, while new registrations and cleanup remain intact. No identified issue blocks merging.

Architecture Summary

Architecture risk: 🔵 Low · up to c5a89

The change affects 1 system.

Changed systems: framework

Architecture concerns
No architecture-level concerns identified.

Review details

Systems and components

  • observed — framework (service) was modified; 1 changed file maps to changed impact.

Before / after behavior

  • observed — Modified behavior in framework/rcommand/internal/commanddispatcher.cpp: reg now uses a direct duplicate-registration condition instead of IF_ASSERT_FAILED; the warning and early return remain.
🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 1 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
Description check ⚠️ Warning The description explains the reported Debug-build crash and the warnings observed after the change. It omits the issue reference and all required checklist items from the repository template. Add the issue number or link after “Resolves:” and complete the required checklist items. Include the AI-assistance disclosure and tool names if applicable. Ensure the checklist accurately covers testing, coding rules, commits, and other li…
✅ Passed checks (3 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title clearly describes the main change: fixing a crash in Debug builds.
Full details: Description check

Resolution

Add the issue number or link after “Resolves:” and complete the required checklist items. Include the AI-assistance disclosure and tool names if applicable. Ensure the checklist accurately covers testing, coding rules, commits, and other listed requirements.

  • Fix all pre-merge checks with AI
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

@igorkorsukov
igorkorsukov merged commit 5427979 into musescore:main Oct 5, 2026
3 checks passed
@Jojo-Schmitz
Jojo-Schmitz deleted the fix-crash-debug branch October 5, 2026 08:30
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.

2 participants