Skip to content

Use C++20 in RemoteVstPlugin #7916

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 12 commits into
base: master
Choose a base branch
from

Conversation

messmerd
Copy link
Member

@messmerd messmerd commented May 31, 2025

Reland C++20 mode compilation for RemoteVstPlugin

  • Fix a weird issue with std::wstring on wineg++ by using std::unique_ptr<wchar_t[]> instead. See my comment here. This fixed the RemoteVstPlugin crash in C++20 mode.
  • Minor RemoteVstPlugin cleanup
    • Fix a few memory leaks by using std::unique_ptr or stack-allocated objects
    • Add some missing pluginDispatch constants
    • Use std::int16_t instead of short
    • Better VstSyncData member names
    • Add a few TODO comments
  • Rename F_OPEN_UTF8 to fopenUtf8 since it's not a macro anymore
  • Use C++20 in our determine_version_from_source CMake function
  • Update the ZynAddSubFX submodule since it (unfortunately) depended on LMMS's IoHelper.h header to build

Known issues:

  • 64-bit OTT fails to load

Copy link
Contributor

@sakertooth sakertooth left a comment

Choose a reason for hiding this comment

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

Great, this seems to have fixed the crash in #7624, and the code changes look fine to me. Seems ready for merge 👍

@messmerd
Copy link
Member Author

messmerd commented Jun 2, 2025

@sakertooth Thanks! I noticed an issue when trying to open 64-bit OTT though, and it didn't seem to be happening on master, so I'd like to investigate that first

@sakertooth
Copy link
Contributor

@sakertooth Thanks! I noticed an issue when trying to open 64-bit OTT though, and it didn't seem to be happening on master, so I'd like to investigate that first

Did a quick test run and also noticed a strange deadlock that I usually don't get in the waitForMessage function. Not sure if this PR was in any way related though, but its a possibility.

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