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] Segfault in Ardour7, AnalogTapeModel LV2 v2.11.1 #307

Closed
florijanstamenkovic opened this issue Jun 16, 2023 · 3 comments
Closed

[BUG] Segfault in Ardour7, AnalogTapeModel LV2 v2.11.1 #307

florijanstamenkovic opened this issue Jun 16, 2023 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@florijanstamenkovic
Copy link

Describe the bug
A segfault occurs immediately when inserting the plugin into a channel in Ardour.

To Reproduce

  1. Start Ardour
  2. Add TapeModel
  3. Ardour crashes

Desktop (please complete the following information):

  • Ubuntu 22.04
  • Ardour 7.4.0

Additional context
Stack trace for the thread that had a segfault. Note there is no std::vector access like in #283 (comment)

Thread 1 (Thread 0x7ffff7a4c900 (LWP 9634) "ArdourGUI"):
#0  0x00007fff408d2813 in ToneStage::processBlock(juce::AudioBuffer<float>&) () from /usr/lib/lv2/CHOWTapeModel.lv2/CHOWTapeModel.so
#1  0x00007fff40934e10 in ChowtapeModelAudioProcessor::processAudioBlock(juce::AudioBuffer<float>&) () from /usr/lib/lv2/CHOWTapeModel.lv2/CHOWTapeModel.so
#2  0x00007fff40902f33 in chowdsp::PluginBase<ChowtapeModelAudioProcessor>::processBlock(juce::AudioBuffer<float>&, juce::MidiBuffer&) () from /usr/lib/lv2/CHOWTapeModel.lv2/CHOWTapeModel.so
#3  0x00007fff409499ac in JuceLv2Wrapper::lv2Run(unsigned int) () from /usr/lib/lv2/CHOWTapeModel.lv2/CHOWTapeModel.so
#4  0x00007ffff6fcee77 in ARDOUR::LV2Plugin::run(unsigned int, bool) () from /opt/Ardour-7.4.0/lib/libardour.so.3
#5  0x00007ffff6fd398e in ARDOUR::LV2Plugin::latency_compute_run() () from /opt/Ardour-7.4.0/lib/libardour.so.3
#6  0x00007ffff6fd8244 in ARDOUR::LV2Plugin::LV2Plugin(ARDOUR::AudioEngine&, ARDOUR::Session&, void const*, long) () from /opt/Ardour-7.4.0/lib/libardour.so.3
#7  0x00007ffff6fd8408 in ARDOUR::LV2PluginInfo::load(ARDOUR::Session&) () from /opt/Ardour-7.4.0/lib/libardour.so.3
#8  0x0000555555f1c795 in ?? ()
#9  0x00007ffff325e868 in Glib::SignalProxyNormal::slot0_void_callback(_GObject*, void*) () from /opt/Ardour-7.4.0/lib/libglibmm-2.4.so.1
#10 0x00007ffff2e0f6b5 in g_closure_invoke () from /opt/Ardour-7.4.0/lib/libgobject-2.0.so.0
#11 0x00007ffff2e22593 in ?? () from /opt/Ardour-7.4.0/lib/libgobject-2.0.so.0
#12 0x00007ffff2e2c364 in g_signal_emit_valist () from /opt/Ardour-7.4.0/lib/libgobject-2.0.so.0
#13 0x00007ffff2e2c7e2 in g_signal_emit () from /opt/Ardour-7.4.0/lib/libgobject-2.0.so.0
#14 0x00007ffff1d0935e in gtk_widget_activate () from /opt/Ardour-7.4.0/lib/libgtk-x11-2.0.so.0
#15 0x00007ffff1b9f882 in gtk_menu_shell_activate_item () from /opt/Ardour-7.4.0/lib/libgtk-x11-2.0.so.0
#16 0x00007ffff1b9fcd6 in ?? () from /opt/Ardour-7.4.0/lib/libgtk-x11-2.0.so.0
#17 0x00007ffff1b918d6 in ?? () from /opt/Ardour-7.4.0/lib/libgtk-x11-2.0.so.0
#18 0x00007ffff1b85d8c in ?? () from /opt/Ardour-7.4.0/lib/libgtk-x11-2.0.so.0
#19 0x00007ffff2e0f6b5 in g_closure_invoke () from /opt/Ardour-7.4.0/lib/libgobject-2.0.so.0
#20 0x00007ffff2e228bd in ?? () from /opt/Ardour-7.4.0/lib/libgobject-2.0.so.0
#21 0x00007ffff2e2bdc8 in g_signal_emit_valist () from /opt/Ardour-7.4.0/lib/libgobject-2.0.so.0
#22 0x00007ffff2e2c7e2 in g_signal_emit () from /opt/Ardour-7.4.0/lib/libgobject-2.0.so.0
#23 0x00007ffff1d0a7ac in ?? () from /opt/Ardour-7.4.0/lib/libgtk-x11-2.0.so.0
#24 0x00007ffff1b8437d in gtk_propagate_event () from /opt/Ardour-7.4.0/lib/libgtk-x11-2.0.so.0
--Type <RET> for more, q to quit, c to continue without paging--
#25 0x00007ffff1b84803 in gtk_main_do_event () from /opt/Ardour-7.4.0/lib/libgtk-x11-2.0.so.0
#26 0x00007ffff166fbbc in ?? () from /opt/Ardour-7.4.0/lib/libgdk-x11-2.0.so.0
#27 0x00007ffff2a56a87 in g_main_context_dispatch () from /opt/Ardour-7.4.0/lib/libglib-2.0.so.0
#28 0x00007ffff2a56ce8 in ?? () from /opt/Ardour-7.4.0/lib/libglib-2.0.so.0
#29 0x00007ffff2a57002 in g_main_loop_run () from /opt/Ardour-7.4.0/lib/libglib-2.0.so.0
#30 0x00007ffff1b834c7 in gtk_main () from /opt/Ardour-7.4.0/lib/libgtk-x11-2.0.so.0
#31 0x00007ffff4665215 in Gtkmm2ext::UI::run(Receiver&) () from /opt/Ardour-7.4.0/lib/libgtkmm2ext.so.0
#32 0x000055555589e9de in ?? ()
#33 0x00007fffe8e29d90 in __libc_start_call_main (main=main@entry=0x55555589e560, argc=argc@entry=1, argv=argv@entry=0x7fffffffd138) at ../sysdeps/nptl/libc_start_call_main.h:58
#34 0x00007fffe8e29e40 in __libc_start_main_impl (main=0x55555589e560, argc=1, argv=0x7fffffffd138, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffd128) at ../csu/libc-start.c:392
#35 0x00005555558a679a in ?? ()
@jatinchowdhury18
Copy link
Owner

Thanks for the crash report! Even though the stack trace is slightly different, I would guess that the root cause is the same as what we're seeing in #283. If you're building from source, you should be able to confirm this by modifying the ChowtapeModelAudioProcessor::isBusesLayoutSupported() implementation as in this comment.

More generally, the issue is that ChowTape is intended to support pretty much any channel configuration (so long as the input and output channel configurations are equivalent). Since the LV2 spec requires a "static" channel configuration, that kind of puts us in a tough spot: either we restrict the LV2 version to only support one channel configuration (probably stereo), or we ship like 6 instances of the LV2 plugin (mono, stereo, 5.1, 7.1, first-order ambisonic, second-order ambisonic, ...). Personally, I'd prefer to ship only one instance, just to help minimize the support burden.

Frankly, this is kind of issue is also a reason why I typically direct Linux users to prefer the CLAP format for our plugins (if their host supports it), or VST3, rather than LV2.

@florijanstamenkovic
Copy link
Author

florijanstamenkovic commented Jun 19, 2023 via email

@florijanstamenkovic
Copy link
Author

(closing the issue as it's most likely a duplicate)

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