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

[BUG] LV2 version of BYOD can't be instantiated by Ardour6.9 #194

Open
doojonio opened this issue Sep 17, 2022 · 7 comments
Open

[BUG] LV2 version of BYOD can't be instantiated by Ardour6.9 #194

doojonio opened this issue Sep 17, 2022 · 7 comments
Assignees
Labels
bug Something isn't working

Comments

@doojonio
Copy link

doojonio commented Sep 17, 2022

Describe the bug
LV2 version of BYOD can't be instantiated by Ardour6.9 but VST3 could (with bug #193)

To Reproduce
Steps to reproduce the behavior:

  1. In Ardour6.9 apply BYOD LV2 on audio track
  2. Get an error The plugin "BYOD" could not be loaded. See the Log window for more details (maybe)

Expected behavior
BYOD plugin applies on track and interface of BYOD appears

Screenshots
Ardour6.9 error
image

Desktop (please complete the following information):

  • OS: Linux (Fedora 36)
  • DAW Ardour6.9
  • Version 1.02 (Night Build)

Additional context
In Ardour6.9 logs the following message appears:

2022-09-17T11:55:20 [ERROR]: LV2: Failed to instantiate plugin https://github.com/Chowdhury-DSP/BYOD

Standalone and VST3 versions successfully start. LV2 version doesn't create any log files. VST3 version create log file with the following content:

**********************************************************
This log file is currently being written to...
Log started: 17 Sep 2022 12:05:04pm

Version: BYOD 1.0.2
Commit: c5e9ec7 on main with JUCE version JUCE v7.0.1
Build: 26 Aug 2022 16:39 on SPB-8CC74614BY.kontur with GNU-12.1.1
System:  with Linux (64-bit) on 12 Core, AMD Ryzen 5 3600 6-Core Processor
Plugin Info: VST3 running in Ardour running at sample rate 0.0 kHz with block size 0

Loading preset: Default
Adding connection from Input, port #0 to Output port #0
Checking OpenGL availability...
OpenGL is available on this system: FALSE
Checking OpenGL availability...
OpenGL is available on this system: FALSE
Checking OpenGL availability...
OpenGL is available on this system: FALSE
Checking OpenGL availability...
OpenGL is available on this system: FALSE
Checking OpenGL availability...
OpenGL is available on this system: FALSE
Loading preset: Instant Metal
Removing connection from Input, port #0 to Output port #0
Creating processor: Metal Face
Creating processor: Amp IRs
Adding connection from Input, port #0 to Metal Face port #0
Adding connection from Amp IRs, port #0 to Output port #0
Adding connection from Metal Face, port #0 to Amp IRs port #0
Exiting gracefully...
@doojonio doojonio added the bug Something isn't working label Sep 17, 2022
@doojonio doojonio changed the title [BUG] LV2 version of BYOD can't be instantiated by Ardour6.9 [BUG] LV2 version of BYOD couldn't be instantiated by Ardour6.9 Sep 17, 2022
@jatinchowdhury18
Copy link
Contributor

Thanks for reporting this!

A few weeks ago, I updated the plugin to build from JUCE version 7 which has built-in LV2 support (previously the plugin was using a fork of JUCE). It seems that in the JUCE LV2 wrapper, there's some interop issue with Ardour.

Since we're still a ways away from the next official release of BYOD, I decided to upgrade to JUCE7 (since there were other features/fixes I wanted to use) and hope that the relevant parties can figure out a solution before then. In the meantime, if you or anyone else needs to be able to run the plugin in Ardour as an LV2, I would suggest going back to the last stable release (v1.0.1).

@doojonio
Copy link
Author

I've compiled Ardour7 pre-release version and in this version plugin can be successfully instantiated. File explorer also works. Now I'm about to compile Ardour6.9 with debug symbols to find out what's wrong with BYOD or with Ardour

@doojonio doojonio changed the title [BUG] LV2 version of BYOD couldn't be instantiated by Ardour6.9 [BUG] LV2 version of BYOD can't be instantiated by Ardour6.9 Sep 18, 2022
@doojonio
Copy link
Author

I have debugged BYOD on Ardour6.9. Fail happens because LV2 descriptor returns NULL in instanitate method here. Ardour compiled with 0.24.12 version of lilv library.

The arguments passing in instanitate method are:

76            result->lv2_handle     = ld->instantiate(
(gdb) print ld->URI
$24 = 0x7ffefb6d8998 "https://github.com/Chowdhury-DSP/BYOD"
(gdb) print sample_rate
$25 = 48000
(gdb) print bundle_path
$26 = 0x1aa0130 "/usr/local/lib64/lv2/BYOD.lv2/"
(gdb) print features
$27 = <optimized out>

For unknown reasons I can't step in instantiate method and find out what's wrong

@doojonio
Copy link
Author

If I instantiate ardour's stock compressor I can step in instantiate function. Maybe I need to compile BYOD with some debugging options.

Thread 1 "ArdourGUI" hit Breakpoint 8, lilv_plugin_instantiate (plugin=0x23c53e0, sample_rate=48000, features=<optimized out>) at ../src/instance.c:75
75            result->lv2_descriptor = ld;
(gdb) print ld->URI
$28 = 0x7fffe00080f3 "urn:ardour:a-comp#stereo"
(gdb) step
76            result->lv2_handle     = ld->instantiate(
(gdb) step
instantiate (descriptor=0x7fffe0009d80 <descriptor_stereo>, rate=48000, bundle_path=0x4784eb0 "/home/person/Documents/building/ardour/ardour/build/libs/LV2/a-comp.lv2/", features=0x175f300) at ../libs/plugins/a-comp.lv2/a-comp.c:132
132     {
(gdb) next
133             AComp* acomp = (AComp*)calloc(1, sizeof(AComp));

@jatinchowdhury18
Copy link
Contributor

Yeah, I would guess that some of the methods in both the plugin and host are being optimized away. If you're able to do a debug build for both that would probably make it a bit easier to step through everything.

That's great news that everything is working in Ardour version 7!

@38github
Copy link

38github commented Nov 5, 2022

With the nightly build I managed to at least use the lv2 version with Ardour 7 (I know, not 6.9).

@KottV
Copy link

KottV commented Nov 11, 2022

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

4 participants