Skip to content

Fix guitar bend hold line assert during writeProperties - #34628

Open
ajuncosa wants to merge 1 commit into
musescore:mainfrom
ajuncosa:bend-hold-assert
Open

Fix guitar bend hold line assert during writeProperties#34628
ajuncosa wants to merge 1 commit into
musescore:mainfrom
ajuncosa:bend-hold-assert

Conversation

@ajuncosa

Copy link
Copy Markdown
Contributor

Inserting a GuitarBendHold line and saving was triggering the endElEID.isValid() assert in TWrite::writeProperties(const Spanner*...).

The GuitarBendHold is written nested inside its parent GuitarBend, while its end element lies after the bend, on a note that may or may not have been written yet and so may have no EID assigned.

Since the start and end elements of hold lines are recomputed during GuitarBend::updateHoldLine(), I have simply stopped writing these two values to the mscx - the read values weren't actually used anyway. Other properties of the hold line are still written.

@coderabbitai

coderabbitai Bot commented Aug 18, 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: CHILL

Plan: Pro Plus

Run ID: 69797c92-0547-4577-ae6d-c9aa284371b3

📥 Commits

Reviewing files that changed from the base of the PR and between 929d1e9 and 70ed4fe.

📒 Files selected for processing (1)
  • src/engraving/rw/write/twrite.cpp

Included review availability: Your plan includes up to 10 reviews per rolling hour; 9 remain after this review.


📝 Walkthrough

Walkthrough

writeProperties(const Spanner*, ...) now skips start and end element serialization for GuitarBendHold spanners. Other spanners retain the existing endpoint serialization behavior.

Merge Risk: ⚪ Minimal · up to 70ed4

This localized change stops invalid hold-line endpoints from being written while preserving other hold-line properties; no actionable merge-blocking risk remains after normal checks and review.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description explains the cause and solution but omits the required issue reference and all checklist items from the repository template. Add the required Resolves issue reference and complete every checklist item in the pull request template.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the guitar bend hold assertion fixed during property writing.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Warning

Review ran into problems

🔥 Problems

Linked repositories: Public OSS repositories can only analyze public repositories installed in this organization. No linked repositories were analyzed; skipped musescore/muse_framework.git.


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.

@ajuncosa
ajuncosa requested a review from miiizen August 18, 2026 16:24
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.

3 participants