BYOD icon indicating copy to clipboard operation
BYOD copied to clipboard

[BUG] [Linux] Version 1.0.1 crashes Renoise/Bitwig

Open dcallea opened this issue 3 years ago • 15 comments

Describe the bug Loading BYOD 1.0.1 on a track crashes Renoise. Regression from 1.0.0 which didn't cause Renoise to crash.

To Reproduce Steps to reproduce the behavior:

  1. Open up Renoise
  2. Load the plugin on a track

Desktop (please complete the following information):

  • OS: Arch Linux
  • DAW: Renoise
  • Version: 3.3.2
  • 64bit

dcallea avatar Mar 17 '22 15:03 dcallea

Thanks for reporting the issue! I don't have access to Renoise on Linux at the moment, but from testing with the VST3 build on Windows I haven't been able to reproduce the crash.

I don't believe there were any Linux-specific changes from version 1.0.0 to version 1.0.1. Would it be possible to get a copy of a log file from one of the crashed instances?

jatinchowdhury18 avatar Mar 17 '22 22:03 jatinchowdhury18

Thanks for the quick reply. Here is the log: https://pastebin.com/vsWw57vA Might be of use to know that the plugin GUI doesn't even pop up, it immediately crashes upon loading.

I built a few different versions and the regression seems to have happened in commit a038f2f23299eb2f462db726a65bd8b0cedb6774

dcallea avatar Mar 18 '22 02:03 dcallea

Ah, thanks for the extra info. I wish the log had showed a little bit more useful info.

Regarding the OpenGL commit, would it be possible to try resetting the global plugin settings?

jatinchowdhury18 avatar Mar 18 '22 10:03 jatinchowdhury18

Resetting the global plugin settings doesn't help unfortunately. I also tested with Bitwig 4.1.6 - doesn't work either, causes the plugin sandbox to crash.

dcallea avatar Mar 18 '22 13:03 dcallea

Hmm, the plot thickens. Would it be possible to share the contents of the settings file after it has been regenerated?

jatinchowdhury18 avatar Mar 18 '22 16:03 jatinchowdhury18

Sure, it's just this one liner: {"plugin_settings":{"cable_viz_onoff":true}}

dcallea avatar Mar 18 '22 16:03 dcallea

Interesting... so it seems like the OpenGL setting never even gets set.

I've set up a branch here, which has added some extra logging around the behaviour of deciding whether or not to use OpenGL. If you're able to build the plugin from this branch, the log files should hopefully have some more information about what is going wrong.

I've also added a compiler flag to disable OpenGL altogether. So if you add CHOWDSP_ENABLE_OPEN_GL_CONTEXT=0 to the target compile definitions, then OpenGL should be excluded from the build altogether.

Also be sure to update the git submodules when checking out the testing branch, since some of the changes are in a submodule. Thanks!

jatinchowdhury18 avatar Mar 19 '22 10:03 jatinchowdhury18

This is the output of the opengl-debug branch: https://pastebin.com/QyYHfP94 And this is the output of the opengl-debug branch with OpenGL disabled, which works fine: https://pastebin.com/56YqrjeU Might be of use to know that when i enable OpenGL in 1.0.0 it works fine.

dcallea avatar Mar 19 '22 17:03 dcallea

Ah okay, that's very helpful to know! It looks like the crash is happening somewhere in the code that is checking which version of OpenGL is supported on the host machine (see here).

If you're up for it, running the plugin in a debugger environment like gdb, might point us to the source of the crash. If not, I can add some more logging statements to that section of the code which could help us pinpoint exactly where the crash is happening within that code. I'm a bit busy with some other things this week, but I could probably get to it within the next few days.

Thanks!

jatinchowdhury18 avatar Mar 21 '22 09:03 jatinchowdhury18

@jatinchowdhury18 what branch to use for debug? I build opengl-debug and it works though:

Creating BYOD Editor!
Created OpenGL Helper.
Checking OpenGL availability...
OpenGL is available on this system: FALSE
Checking OpenGL availability...
OpenGL is available on this system: FALSE
Creating BYOD Editor!
Checking OpenGL availability...
OpenGL is available on this system: FALSE
Checking OpenGL availability...
OpenGL is available on this system: FALSE

KottV avatar Mar 29 '22 12:03 KottV

@KottV, yes that branch would be good for debugging. The log you shared is interesting... there should be a line for "Attempting to check OpnGL stats...". You may need to update the submodules, and check whether CHOWDSP_ENABLE_OPEN_GL_CONTEXT is defined.

I've updated that branch with a few more checks and logs. @dcallea if you could give it a try on the new branch as well.

jatinchowdhury18 avatar Mar 29 '22 19:03 jatinchowdhury18

I probably can't help that well due to lack of expertise with debugging audio plugins on Linux, but am happy to help if you think I can.

I have the same problem with BYOD crashing immediately on the following setup: OS: Manjaro 21.2.5 Qonos Kernel: x86_64 Linux 5.16.14-1-MANJARO EN: GNOME 41.4 WM: Mother CPU: Intel Core i7-6700K @ 8x 4.2GHz [54.0°C] GPU: AMD Radeon Pro WX 7100 Graphics (POLARIS10, DRM 3.44.0, 5.16.14-1-MANJARO, LLVM 13.0.1) RAM: 8742MiB / 64193MiB DAW: Bitwig Studio 4.2.2 (running plugins in individual sandbox mode in conjunction with the JACK driver model) Audio Engine: PipeWire 1:0.3.48-1 Display Compositor: Wayland 1.20.0-1

amadeusp avatar Mar 30 '22 18:03 amadeusp

@jatinchowdhury18 Sadly not much time at the moment, i can try debugging it in a few days. I've done a quick build with the newest changes on the debug branch, this is the output of the log:

Loading preset: Default
Adding connection from Input, port #0 to Output port #0
Creating BYOD Editor!
Attempting to check OpenGL stats...

dcallea avatar Mar 31 '22 00:03 dcallea

Thanks all for the extra information. I've decided (for now) to remove OpenGL support on Linux. Building from the main branch now should provide a build with a build with OpenGL disabled, unless a specific OpenGL flag is provided. The future Linux nightly builds will also have OpenGL support disabled.

Hopefully this fixes everyone's crashing behaviour! Definitely let me know if you're continuing to experience crashes.

jatinchowdhury18 avatar Mar 31 '22 10:03 jatinchowdhury18

@jatinchowdhury18 I just build from main branch and am happy to report that the plugin is now loading properly for me. :) Many thanks!

amadeusp avatar Mar 31 '22 13:03 amadeusp