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

Oversampling Crashes the DAW #234

Open
tintofchaos opened this issue Nov 8, 2022 · 5 comments
Open

Oversampling Crashes the DAW #234

tintofchaos opened this issue Nov 8, 2022 · 5 comments
Labels
bug Something isn't working dsp Related to the plugin signal processing

Comments

@tintofchaos
Copy link

tintofchaos commented Nov 8, 2022

Changing Oversampling Filter to Linear phase or changing oversampling rate crashes the DAW (in linux ardour 6 and ardour 7)
version BYOD: 1.02
Commit: 2af063a
JUCE: version 7.0.1v
build: october 23 2022 7:43
plugin format: VST3
samplerate: 44.1Khz
block size: 1024
GNU version : 9.4.0
processor cores: 6
processor: ryzen 5 3600
bits: 64

@jatinchowdhury18 jatinchowdhury18 added bug Something isn't working dsp Related to the plugin signal processing labels Nov 15, 2022
@jatinchowdhury18
Copy link
Contributor

Thanks for the detailed report!

Unfortunately this is a bit tough for me to debug at the moment since I don't have a non-headless Linux setup at the moment. If possible, would you be able to share a the log file from an instance of the plugin that crashes in this way? The log file location is discussed here.

By the way, sorry it's taken me so long to get to this... usually I get email notifications for GitHub Issues, but for some reason I never got an email for this one?

@tintofchaos
Copy link
Author

@jatinchowdhury18
Copy link
Contributor

Hmm, it seems like I'm unable to open the log file. Are you able to open it locally? If so, it would be great if you could paste the contents into this issue (either directly, or using something like pastebin)

@tintofchaos
Copy link
Author


This log file is currently being written to...
Log started: 18 Nov 2022 9:07:14pm

Version: BYOD 1.0.9
Commit: 2005f5d on HEAD with JUCE version JUCE v7.0.2
Build: 11 Nov 2022 8:44 on fv-az207-839.1ztp0ef1jgbebjcpob1ohcpowa.jx.internal.cloudapp.net with GNU-9.4.0
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

State contains processor: Trumble Drive, which is currently locked!
State contains processor: Waterfall Trem., which is currently locked!
State contains processor: Boutique Bass, which is currently locked!
State contains processor: Kiwi Bass Tone, which is currently locked!
State contains processor: JK Amp, which is currently locked!
State contains processor: Trainer Tone, which is currently locked!
State contains processor: Bachman, which is currently locked!
Loading preset: Default
Adding connection from Input, port #0 to Output port #0
Checking OpenGL availability...
OpenGL is available on this system: FALSE
Using OpenGL: TRUE
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
Interrupt signal received!
Stack Trace:
/usr/lib/vst3/BYOD.vst3/Contents/x86_64-linux/BYOD.so(+0x387cec) [0x7f013e987cec]
/usr/lib/vst3/BYOD.vst3/Contents/x86_64-linux/BYOD.so(+0x2cd2f2) [0x7f013e8cd2f2]
/usr/lib/vst3/BYOD.vst3/Contents/x86_64-linux/BYOD.so(+0x380d7d) [0x7f013e980d7d]
/lib64/libc.so.6(+0x3ea30) [0x7f01f916ba30]
/usr/lib/vst3/BYOD.vst3/Contents/x86_64-linux/BYOD.so(+0x2f6738) [0x7f013e8f6738]
/usr/lib/vst3/BYOD.vst3/Contents/x86_64-linux/BYOD.so(+0x503c35) [0x7f013eb03c35]
/usr/lib/vst3/BYOD.vst3/Contents/x86_64-linux/BYOD.so(+0x687e9b) [0x7f013ec87e9b]
/usr/lib/vst3/BYOD.vst3/Contents/x86_64-linux/BYOD.so(+0x68083f) [0x7f013ec8083f]
/usr/lib/vst3/BYOD.vst3/Contents/x86_64-linux/BYOD.so(+0x27b8c9) [0x7f013e87b8c9]
/usr/lib/vst3/BYOD.vst3/Contents/x86_64-linux/BYOD.so(+0x27cc2b) [0x7f013e87cc2b]
/home/notroot/ardour/build/libs/ardour/libardour.so.3(_ZN9Steinberg6VST3PI7processEPPfS2_j+0x47d) [0x7f01fdccc1ff]
/home/notroot/ardour/build/libs/ardour/libardour.so.3(_ZN6ARDOUR10VST3Plugin15connect_and_runERNS_9BufferSetElldRKNS_11ChanMappingES5_jl+0xca3) [0x7f01fdcc2579]
/home/notroot/ardour/build/libs/ardour/libardour.so.3(_ZN6ARDOUR12PluginInsert15connect_and_runERNS_9BufferSetElldjlb+0x1992) [0x7f01fd963c54]
/home/notroot/ardour/build/libs/ardour/libardour.so.3(_ZN6ARDOUR12PluginInsert3runERNS_9BufferSetElldjb+0x296) [0x7f01fd9653ba]
/home/notroot/ardour/build/libs/ardour/libardour.so.3(_ZN6ARDOUR5Route22process_output_buffersERNS_9BufferSetElljbb+0xa29) [0x7f01fda47961]
/home/notroot/ardour/build/libs/ardour/libardour.so.3(_ZN6ARDOUR5Route9run_routeElljbb+0x1bc) [0x7f01fda48afc]
/home/notroot/ardour/build/libs/ardour/libardour.so.3(_ZN6ARDOUR5Route16no_roll_unlockedEjllb+0xff) [0x7f01fda5da1b]
/home/notroot/ardour/build/libs/ardour/libardour.so.3(_ZN6ARDOUR5Route7no_rollEjllb+0x83) [0x7f01fda5d8e9]
/home/notroot/ardour/build/libs/ardour/libardour.so.3(_ZN6ARDOUR5Graph17process_one_routeEPNS_5RouteE+0x1fd) [0x7f01fd5375a5]
/home/notroot/ardour/build/libs/ardour/libardour.so.3(_ZN6ARDOUR5Route7processEv+0x30) [0x7f01fda48934]
/home/notroot/ardour/build/libs/ardour/libardour.so.3(_ZN6ARDOUR9GraphNode3runEPKNS_10GraphChainE+0x27) [0x7f01fd541b53]
/home/notroot/ardour/build/libs/ardour/libardour.so.3(_ZN6ARDOUR5Graph7run_oneEv+0x50b) [0x7f01fd535c2f]
/home/notroot/ardour/build/libs/ardour/libardour.so.3(_ZN6ARDOUR5Graph11main_threadEv+0x380) [0x7f01fd5363fa]
/home/notroot/ardour/build/libs/ardour/libardour.so.3(ZNK5boost4_mfi3mf0IvN6ARDOUR5GraphEEclEPS3+0x65) [0x7f01fd540dc1]
/home/notroot/ardour/build/libs/ardour/libardour.so.3(_ZN5boost3_bi5list1INS0_5valueIPN6ARDOUR5GraphEEEEclINS_4_mfi3mf0IvS4_EENS0_5list0EEEvNS0_4typeIvEERT_RT0_i+0x4d) [0x7f01fd54045f]
/home/notroot/ardour/build/libs/ardour/libardour.so.3(_ZN5boost3_bi6bind_tIvNS_4_mfi3mf0IvN6ARDOUR5GraphEEENS0_5list1INS0_5valueIPS5_EEEEEclEv+0x35) [0x7f01fd53f471]
/home/notroot/ardour/build/libs/ardour/libardour.so.3(_ZN5boost6detail8function26void_function_obj_invoker0INS_3_bi6bind_tIvNS_4_mfi3mf0IvN6ARDOUR5GraphEEENS3_5list1INS3_5valueIPS8_EEEEEEvE6invokeERNS1_15function_bufferE+0x20) [0x7f01fd53de81]
/home/notroot/ardour/build/gtk2_ardour/ardour-7.0.31(_ZNK5boost9function0IvEclEv+0x52) [0x764dac]
/home/notroot/ardour/build/libs/backends/alsa/libalsa_audiobackend.so(_ZN6ARDOUR16AlsaAudioBackend19alsa_process_threadEPv+0x56) [0x7f01e0506f7e]
/lib64/libc.so.6(+0x8cded) [0x7f01f91b9ded]
/lib64/libc.so.6(+0x112370) [0x7f01f923f370]

Plugin crashing!!!

jatinchowdhury18 added a commit that referenced this issue Nov 19, 2022
@jatinchowdhury18
Copy link
Contributor

Great thank you! The stack trace was super helpful. I was able to get a little testing set up worked out, and I think I've gotten to the bottom of the issue.

Basically, when the oversampling parameters are changed, the plugin has to tell the host that its latency has changed. Previously, I was doing that synchronously with the parameter change on the audio thread, which the other plugin formats / hosts seemed to handle in a thread-safe way. Unfortunately when the plugin does the same thing in Ardour, the host invalidates the audio buffer that is currently being processed, which was causing the crash. Personally, I really like how CLAP plugins handle latency changes, where the change has to be reported on the main thread (the CLAP "misbehaviour handler" enforces this), but the API provides a way for the plugin to do the call on the main thread without having to manage it's own message passing between threads (here's how the clap-juce-extensions does it).

Anyway (feel free to ignore all that technical business), I'm planning to merge the fix with #242. I'm going to be testing with other DAWs to make sure the change doesn't break things elsewhere, but if you'd like to test as well, feel free to build from the main branch or install the new nightly builds (probably available in an hour or two).

jatinchowdhury18 added a commit that referenced this issue Nov 19, 2022
* Attempted fix for #234

* Apply clang-format

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working dsp Related to the plugin signal processing
Projects
None yet
Development

No branches or pull requests

2 participants