Fix VST crashes on Linux - #7987
Conversation
I'm perfectly fine creating the winebuild fork over at lmms/winebuild. This is small enough that it shouldn't significantly impact the build times of platforms that don't need it (Windows, macOS). Since this change may be needed upstream, I've started the conversation with the winehq devel community here: https://list.winehq.org/mailman3/hyperkitty/list/wine-devel@winehq.org/thread/AAPOGZN3H732GXNKB4ZV7TRNCRIBM5AG/. I think @Fastigium's instinct to keep this as a draft until we have more direction from upstream is a good idea. With regards to using a small cloned portion of the wine project for this, this is a bit non-standard as it prevents our mirror from being synced with upstream (but the alternative is to mirror a huge repo, which we also don't want 😅), so we'll have to weigh the two options. Even if winehq adds this feature, it won't be immediately added to the I did look into other git strategies (such as |
|
Linking #7976 |
|
Upstream bug report filed (per advice of winehq mailing list) https://bugs.winehq.org/show_bug.cgi?id=58480 |
|
We could fetch the Git repo in the |
|
I'm going to push some experimental changes in an attempt to move @Fastigium's patch to a dedicated wine fork. I expect it to temporarily break builds (sorry) but it should be rather trivial to fix. My fork is temporary... once we have this working, we should move it from my own personal fork to a lmms-managed gitlab fork that can be used for create a merge request into upstream wine. @messmerd I'll try to fix any issues by reviewing the CI logs but I'd appreciate any assistance fixing the |
|
The custom version of Before this is merged, I would like to have an upstream MR against winehq official and I'd like the |
I've been approved to create a fork over at winehq (thanks Alexandre Julliard), so this new fork is arguably a more contextual home, albeit less organizational (since other LMMS maintainers won't have access to my fork). This is because winehq hosts their own Gitlab instance. This is a lot of words to say, if upstream is receptive, we can point to upstream once merged. If not, we'll have to determine a permanent home for our patches (which -- for simplicity and organization reasons -- probably would remain in github). Upstream PR: https://gitlab.winehq.org/wine/wine/-/merge_requests/8786 |
|
After scratching my head a bit on Discord and second-guessing the above patch, I came up with the following question... @tresf wrote:
@messmerd wrote:
Link to convo: https://discord.com/channels/203559236729438208/1383830615429877851/1407401026847506502 ... this suggests that we may be safe leaving |
|
Changes:
Despite the name of this PR to indicate "Linux", recent tests suggest that the Windows PR #7976 may have been overly ambitious in its compiler flags, so I've turned that back off via 4c1f989 so we'll have binaries to test against once the CI finishes. |
After some conversations with winehq claiming to NOT support granularity between lmms/plugins/VstBase/RemoteVstPlugin/CMakeLists.txt Lines 74 to 76 in 26f1da6 |
|
I tested a4b1ea2 on Linux Mint 22 (x86_64) with Wine 10.11. No issues were encountered when using the 64-bit and 32-bit Synth1 VST. |
a4b1ea2 to
567dbb1
Compare
|
Ok, we're in the home stretch here... I rebased on After some back and forth, winehq -- specifically, Alexandre Julliard -- has been very receptive to our patch and I believe the patch will be merged upstream very soon since now we're working on updating the manpage for lmms/.github/workflows/build.yml Line 48 in dec6a04 To reiterate why we don't just point at upstream... It's mainly to avoid building the entirety of wine in our toolchain. Instead, we're only building In addition to the recent commits consolidation, I've also cleaned up my fork to match what I believe will be merged to upstream. This PR can probably be merged before https://gitlab.winehq.org/wine/wine/-/merge_requests/8786 is accepted if it gets stalled for any reason. Retesting the 64-bit VSTs on Windows and Linux should be done one more time before final merge. |
|
Upstream PR https://gitlab.winehq.org/wine/wine/-/merge_requests/8786 has been merged!
Switch to Intel to do this now, then will merge. |
|
Bare metal results added... Hmm...
When 32-bit fails on bare metal, it says "The application was unable to start correctly (0xc000007b). Click OK to close the application.". This error did not show in the VM. The results are identical both this this PR as well as with #7976, so I do not suspect any regression as a result of this PR specifically, but I think MSVC stills needs much investigation before claiming that VST plugins will work there... There's something still causing stability issues in our MSVC builds. I would request that we open a dedicated bug report for this when the others are closed. |
|
I'm stumped on the MSVC regressions, but I've opened a dedicated bug report here: I'll merge this PR so that Linux VSTs can immediately benefit from the upstream fixes here. Huge thanks to @Fastigium for finding and fixing this ASLR-related issue with winegcc as well as it's sister-issue for mingw and MSVC in #7976. |
|
The upstream fix was released in Wine 10.14 and can now be installed through the |
This is great news! This won't fix local builds, so I'm curious what the timeline should be on removing the no-longer-needed parts... At a glance: Remove this entire section:
Remove ... but this code will continue to work for local copies with other wine versions, so I'm unsure how soon we should do this. Thoughts welcome. Opened a dedicated issue here: #8076 |
Disables ASLR when building
RemoteVstPluginfor Windows VSTs on Linux. See #7830.If we end up going for this method for real, the patched winebuild repo (https://github.com/Fastigium/winebuild) should probably be moved to the LMMS organization 🙂