Skip to content

Fix MacOS VST Window Closing Crash#33078

Closed
CubikingChill wants to merge 1 commit into
musescore:masterfrom
CubikingChill:soundtoys-vst
Closed

Fix MacOS VST Window Closing Crash#33078
CubikingChill wants to merge 1 commit into
musescore:masterfrom
CubikingChill:soundtoys-vst

Conversation

@CubikingChill
Copy link
Copy Markdown
Contributor

Resolves: #33019

The current fix takes inspiration from Ardour:
libs/ardour/vst3_plugin.cc
gtk2_ardour/vst3_nsview_plugin_ui.mm

  • 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)

Copy link
Copy Markdown

@claude claude Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Claude Code Review

This pull request is from a fork — automated review is disabled. A repository maintainer can comment @claude review to run a one-time review.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 20, 2026

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: 0683ae7c-f16f-4410-85eb-79560fad65de

📥 Commits

Reviewing files that changed from the base of the PR and between 6de7359 and c8d93d6.

📒 Files selected for processing (2)
  • src/framework/vst/qml/Muse/Vst/vstview.cpp
  • src/framework/vst/widgets/vstviewdialog_qwidget.cpp

📝 Walkthrough

Walkthrough

The pull request removes platform-specific preprocessor guards that previously prevented the removed() method from being called on macOS during VST view deinitialization. Both the VstView and VstViewDialog classes now execute the same cleanup sequence on all platforms: calling setFrame(nullptr) followed by removed() on the view object before nulling it. This change ensures consistent deinitialization behavior across Windows, macOS, and Linux without altering other control flow or error handling logic.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
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 (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly describes the problem being fixed—a macOS VST window closing crash—making it directly relevant to the changeset.
Description check ✅ Passed The PR description includes the issue reference (#33019), motivation, Ardour source references, and all checklist items completed except unit testing, meeting template requirements.
Linked Issues check ✅ Passed The changes directly address issue #33019 by removing the macOS-specific guard around m_view->removed() in both VstView and VstViewDialog, applying the Ardour-inspired fix to resolve the VST window closing crash.
Out of Scope Changes check ✅ Passed All changes are focused on fixing the macOS VST window closing crash; no unrelated modifications detected in the modified files.

✏️ 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.

@DmitryArefiev
Copy link
Copy Markdown
Contributor

There is regression with ARIA crash on macOS (#32742)

@CubikingChill CubikingChill marked this pull request as draft April 21, 2026 13:55
@CubikingChill
Copy link
Copy Markdown
Contributor Author

OK. I will look into it furthur. Meanwhile I am happy to close this if better PRs exist.

@CubikingChill
Copy link
Copy Markdown
Contributor Author

CubikingChill commented Apr 21, 2026

There is regression with ARIA crash on macOS (#32742)

@DmitryArefiev I would like to know if newview is tested?

@DmitryArefiev
Copy link
Copy Markdown
Contributor

There is regression with ARIA crash on macOS (#32742)

@DmitryArefiev I would like to know if newview is tested?

Do you mean Diagnostic>VST settings? Yeah, 'Use new view' is selected

@RomanPudashkin
Copy link
Copy Markdown
Contributor

Replaced by #33173

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 closing any Soundtoys VST FX plugin

5 participants