Skip to content
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

Add Carla support for Windows #5713

Merged
merged 4 commits into from Oct 29, 2020
Merged

Add Carla support for Windows #5713

merged 4 commits into from Oct 29, 2020

Conversation

tresf
Copy link
Member

@tresf tresf commented Oct 15, 2020

Closes #4654

This PR should be safe for backport to 1.2.x if needed.

What the PR does:

  • Renames libcarla_native-plugin.dll to carla.dll to match that of the Windows release
  • Fixes a PATH conflict preventing Carla from finding PyQt

Steps to use Carla with LMMS:

  • Install a version of LMMS with Carla support (click here if the download bot below doesn't have one)
  • Download Carla for windows
  • Extract Carla to a permanent location
  • Add Carla.lv2 to your PATH environment variable (e.g. C:\Carla_2.2.0-win64\Carla.lv2)
  • Start LMMS

Known issues:

  • Removing a Carla track may cause LMMS to segfault
  • On slow machines, Carla may not load the first time and "Show GUI" may need to be clicked again

Screen Shot 2020-10-15 at 4 31 52 PM

@tresf tresf added the windows label Oct 15, 2020
@LmmsBot
Copy link

LmmsBot commented Oct 15, 2020

🤖 Hey, I'm @LmmsBot from github.com/lmms/bot and I made downloads for this pull request, click me to make them magically appear! 🎩

Linux

Windows

macOS

🤖
{"platform_name_to_artifacts": {"Linux": [{"artifact": {"title": {"title": "(AppImage)", "platform_name": "Linux"}, "link": {"link": "https://9490-15778896-gh.circle-artifacts.com/0/lmms-1.2.3-734%2Bgcf4fd59-linux-x86_64.AppImage"}}, "build_link": "https://circleci.com/gh/LMMS/lmms/9490?utm_campaign=vcs-integration-link&utm_medium=referral&utm_source=github-build-link"}], "Windows": [{"artifact": {"title": {"title": "32-bit", "platform_name": "Windows"}, "link": {"link": "https://9492-15778896-gh.circle-artifacts.com/0/lmms-1.2.3-734%2Bgcf4fd599b-mingw-win32.exe"}}, "build_link": "https://circleci.com/gh/LMMS/lmms/9492?utm_campaign=vcs-integration-link&utm_medium=referral&utm_source=github-build-link"}, {"artifact": {"title": {"title": "64-bit", "platform_name": "Windows"}, "link": {"link": "https://9494-15778896-gh.circle-artifacts.com/0/lmms-1.2.3-734%2Bgcf4fd599b-mingw-win64.exe"}}, "build_link": "https://circleci.com/gh/LMMS/lmms/9494?utm_campaign=vcs-integration-link&utm_medium=referral&utm_source=github-build-link"}, {"artifact": {"title": {"title": "32-bit", "platform_name": "Windows"}, "link": {"link": "https://ci.appveyor.com/api/buildjobs/96ce805xn32h0stw/artifacts/build/lmms-1.2.2-msvc2017-win32.exe"}}, "build_link": "https://ci.appveyor.com/project/Lukas-W/lmms/builds/35779079"}, {"artifact": {"title": {"title": "64-bit", "platform_name": "Windows"}, "link": {"link": "https://ci.appveyor.com/api/buildjobs/k7a19v4o7a4bppov/artifacts/build/lmms-1.2.2-msvc2017-win64.exe"}}, "build_link": "https://ci.appveyor.com/project/Lukas-W/lmms/builds/35779079"}], "macOS": [{"artifact": {"title": {"title": "", "platform_name": "macOS"}, "link": {"link": "https://9493-15778896-gh.circle-artifacts.com/0/lmms-1.2.3-734%2Bgcf4fd599b-mac10.13.dmg"}}, "build_link": "https://circleci.com/gh/LMMS/lmms/9493?utm_campaign=vcs-integration-link&utm_medium=referral&utm_source=github-build-link"}]}, "commit_sha": "2f7b60806d4a0463ace04c2cddcf547ef35bd138"}

plugins/carlabase/carla.cpp Outdated Show resolved Hide resolved
@PhysSong
Copy link
Member

Removing a Carla track may cause LMMS to segfault

Reproduced with Carla 2.2 and MSVC build of LMMS. It seems like Carla crashed in CarlaEngine::ProtectedData::deletePluginsAsNeeded() which is indirectly called from CarlaInstrument::timerEvent(). Inspecting memory and registers suggests there might be some use after free conditions.
2.1.1 Also crashes in CarlaBackend::CarlaEngineNative::uiIdle(), but less frequently.

@PhysSong
Copy link
Member

I found that it's related to the (improperly implemented) InstrumentTrackWindow caching which causes a temporary CarlaInstrumentView to be instantiated after the existing one is deleted. That will be deleted after CarlaInstrument, and timer events may kick in between those two events. That results in CarlaInstrumentView::timerEvent() using a deleted handle.

@tresf
Copy link
Member Author

tresf commented Oct 20, 2020

I found that it's related to the (improperly implemented) InstrumentTrackWindow caching which causes a temporary CarlaInstrumentView to be instantiated after the existing one is deleted. That will be deleted after CarlaInstrument, and timer events may kick in between those two events. That results in CarlaInstrumentView::timerEvent() using a deleted handle.

@PhysSong would you like to wait to merge this PR until the bug is resolved, or merge and open a new issue?

@tresf
Copy link
Member Author

tresf commented Oct 29, 2020

@PhysSong would you like to wait to merge this PR until the bug is resolved, or merge and open a new issue?

Merging. I'll open a new issue for the crash.

@tresf tresf merged commit c23c1b7 into LMMS:master Oct 29, 2020
7 checks passed
@tresf tresf deleted the carla-win branch October 29, 2020 05:06
IanCaio pushed a commit to IanCaio/lmms that referenced this pull request Mar 28, 2021
sdasda7777 pushed a commit to sdasda7777/lmms that referenced this pull request Jun 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add Carla support for windows
4 participants