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

Linux/Reaper crashed when adding the plugin a 2nd time #9

Open
maxxatgit opened this issue Jun 14, 2024 · 17 comments
Open

Linux/Reaper crashed when adding the plugin a 2nd time #9

maxxatgit opened this issue Jun 14, 2024 · 17 comments
Assignees
Labels
bug Something isn't working

Comments

@maxxatgit
Copy link

I'm running Ubuntu 22.04 and Reaper 7.16.
To reproduce the crash:

  1. I open Reaper
  2. add either the .clap or the .vst3 version to a project
  3. remove the plugin from the project
  4. Attempt to add it again

At this point, Reaper freezes and the popup "reaper not responding" comes up. I have to select "force close".
Just as an FYI, the NIH Spectral Compressor by Robert-VDH (another rust-based plugin) runs fine on my system.

If there is anything that I can do to help find this bug, please let me know.
Thanks for supporting Linux!

@ardura ardura self-assigned this Jun 14, 2024
@ardura
Copy link
Owner

ardura commented Jun 14, 2024

Hey maxxatgit! Hmm that does sound weird...I'll see if I can spin up a linux machine as well and try it out but otherwise I may have to finally make a debugging build for issues like this. I'll see what I can find then update you!

Edit: I tried doing this in Reaper on windows and didn't get an error...so still looking

@ardura ardura added the bug Something isn't working label Jun 14, 2024
@ardura
Copy link
Owner

ardura commented Jun 14, 2024

I'm unable to replicate this so far, I am able to load,unload,and reload CLAP and VST versions of Subhoofer on my linux (Crostini Debian) and Reaper 7.16. However I will note that the precompiled builds didn't work on my test system and I compiled it myself for them to work (otherwise they wouldn't even load). Are you compiling Subhoofer or using the precompiled binary?

@ardura
Copy link
Owner

ardura commented Jun 14, 2024

Here are updated instructions in case you are compiling, although the github runner builds the precompiled binary on Ubuntu 22.04 as well... so that would also be very strange. Is there anything in your Reaper logs or something like that? I couldn't really find much on debugging vsts in Reaper so far.

https://github.com/ardura/Subhoofer?tab=readme-ov-file#buildingcompiling-subhoofer-manually

@maxxatgit
Copy link
Author

I am using the precompiled binary. Unfortunately, there is nothing in the Reaper logs.
Sometimes opening Reaper from a terminal window will give pertinent info as it exits. With this issue, it just says "killed" (probably because I click the "force quit" button).
I don't want to start compiling plugins on my production machine. Maybe KXStudio or OpenSUSE will do it.

@maxxatgit
Copy link
Author

I would be happy to run a debug version and report back.

@ardura
Copy link
Owner

ardura commented Jun 14, 2024

Fair enough 👍 I'll work on making a debug build happen. I'll probably update this next week and then we can try to figure this out

@ardura
Copy link
Owner

ardura commented Jun 17, 2024

@maxxatgit Can you try using this build? I had to separate the clap and vst versions because of file size limitations in githubs attachments, but try running reaper on command line with:
env NIH_LOG=/tmp/subhoofer.log reaper
This should create a small log in /tmp/ that notes when plugin gets loaded, resets, or unloaded to get an idea of exactly where we are having issues. In addition, (hopefully) some info is printed in the console when you get a crash.

Subhoofer_clap.zip
Subhoofer.vst3.zip

thanks for taking the time to check :)

@maxxatgit
Copy link
Author

maxxatgit commented Jun 17, 2024 via email

@maxxatgit
Copy link
Author

maxxatgit commented Jun 18, 2024 via email

@maxxatgit
Copy link
Author

maxxatgit commented Jun 18, 2024 via email

@ardura
Copy link
Owner

ardura commented Jun 18, 2024

Was doing some more digging and it looks like something that has been happening for a year with Robbert's plugins too (like Spectral Compressor), although it is weird that it didn't occur for you since those share the same plugin framework. See robbert-vdh/nih-plug#98
I'll keep looking around but so far it looks like the culprit is one of the window gui libraries/dependencies that hold the window...So I can't guarantee a fix just yet.

@ardura
Copy link
Owner

ardura commented Jun 18, 2024

Can you try doing the same thing with this setting toggled and try the VST3?
image

@maxxatgit
Copy link
Author

Those are the normal (for me) settings for VST plugins...
I tried the VST3 version, and got the same results.

I also tried to make the NIH Spectral Compressor crash, and I had no problem with it.
I opened and closed it 4 or 5 times without issues.

One thing that may be a factor, I'm using an AMD Ryzen 9 7950X with an integrated GPU. I'm using the internal GPU, not a card. I've heard that the make and model of GPU can cause issues...
Also, I'm running the Liquorix kernal...

I can switch to the standard kernal to test sometime next week. I don't have time to get into all of that right now.

I appreciate your diligence, but don't stress about this.

As always, thank you for supporting Linux :)

@maxxatgit
Copy link
Author

maxxatgit commented Jul 6, 2024

So it seems @PolyVector found a bug in Rust Audio. It causes this issue. And their comment in the linked thread, "Because it's a race condition that also depends on driver quirks, every system I've tested behaves differently. Usually crashes occur upon reopening the window. Some systems crash on the first reopening, some can survive 100, it's all over the place." is the reason I didn't notice it in the NIH plugins...
:^)

@ardura
Copy link
Owner

ardura commented Jul 6, 2024

@maxxatgit dang, that makes sense why I couldn't figure it out either. At least they're aware of it in the Nih-Plug side. Once the fix is implemented there, I'll update the libs to fix it 👍

@ardura
Copy link
Owner

ardura commented Jul 16, 2024

Since that bug has been there since 2023...I took a look back at that linked issue and it seems like something I can try to implement in my baseview/egui-baseview (whichever one) fork that my plugins use. Will update you once I do that and we can test again :)

edit: looks like this dependency is nested into others. So baseview is part of egui-baseview and nih-plug. I maintain forks of those two for my changes but I am a little wary of forking baseview still. I'll think on it but hopefully that change can be merged in sooner - I'll check with baseview maintainers.

@maxxatgit
Copy link
Author

Yeah, checking with the baseview maintainers sounds like a good idea. @PolyVector did mention that their fix was temporary, that "A proper fix would be to synchronize with the event loop thread". It seems like that may take a while, so it would be good to know how the maintainers plan to respond to this.

Thanks for all you do!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants