ardura / Subhoofer

Sub and Bass Enhancement plugin
28 stars 1 forks source link

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

Open maxxatgit opened 3 months ago

maxxatgit commented 3 months ago

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 commented 3 months ago

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 commented 3 months ago

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 commented 3 months ago

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 commented 3 months ago

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 commented 3 months ago

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

ardura commented 3 months ago

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 commented 3 months ago

@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 commented 3 months ago

Greetings, and thanks for creating a debug build. The crash happened on the third attempt to load the clap version. add: OK remove: OK add: OK remove: OK add: crash!

Here is the contents of subhoofer.log:

edited out, no useful info

On Mon, Jun 17, 2024 at 12:32 PM ardura @.***> wrote:

@maxxatgit https://github.com/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 https://github.com/user-attachments/files/15874149/Subhoofer_clap.zip Subhoofer.vst3.zip https://github.com/user-attachments/files/15874176/Subhoofer.vst3.zip

thanks for taking the time to check :)

— Reply to this email directly, view it on GitHub https://github.com/ardura/Subhoofer/issues/9#issuecomment-2173851407, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAMANE6OS3ZMD6ICDMFZNGDZH4FQPAVCNFSM6AAAAABJJWI36GVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNZTHA2TCNBQG4 . You are receiving this because you were mentioned.Message ID: @.***>

maxxatgit commented 3 months ago

Greetings. I have to do something different. That is just an emacs error. It has nothing to do with the plugin. More info soon...

maxxatgit commented 3 months ago

OK, the log file is empty. zero bytes long. Reaper crashes with no message in the terminal.

On Mon, Jun 17, 2024 at 12:32 PM ardura @.***> wrote:

@maxxatgit https://github.com/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 https://github.com/user-attachments/files/15874149/Subhoofer_clap.zip Subhoofer.vst3.zip https://github.com/user-attachments/files/15874176/Subhoofer.vst3.zip

thanks for taking the time to check :)

— Reply to this email directly, view it on GitHub https://github.com/ardura/Subhoofer/issues/9#issuecomment-2173851407, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAMANE6OS3ZMD6ICDMFZNGDZH4FQPAVCNFSM6AAAAABJJWI36GVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNZTHA2TCNBQG4 . You are receiving this because you were mentioned.Message ID: @.***>

ardura commented 3 months ago

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 https://github.com/robbert-vdh/nih-plug/issues/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 commented 3 months ago

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

maxxatgit commented 3 months ago

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 commented 2 months ago

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 commented 2 months ago

@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 commented 2 months ago

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 commented 2 months ago

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!