surge-synthesizer / surge

Synthesizer plug-in (previously released as Vember Audio Surge)
https://surge-synthesizer.github.io/
GNU General Public License v3.0
3.11k stars 395 forks source link

Crash in QTractor with FX plugin #6337

Open haenkel opened 2 years ago

haenkel commented 2 years ago

fx.vst3 and xt.clap are fine Starting here but I can move this to the qtractor repo if need be.

==30395==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000028 (pc 0x7fe790310da6 bp 0x7ffe2e8196f0 sp 0x7ffe2e819610 T0)
==30395==The signal is caused by a READ memory access.
==30395==Hint: address points to the zero page.
    #0 0x7fe790310da6 in juce::Slider::Pimpl::setValue(double, juce::NotificationType) /home/blah/surge/libs/JUCE/modules/juce_gui_basics/widgets/juce_Slider.cpp:174:9
    #1 0x7fe790279f23 in juce::Slider::setValue(double, juce::NotificationType) /home/blah/surge/libs/JUCE/modules/juce_gui_basics/widgets/juce_Slider.cpp:1527:12
    #2 0x7fe79075fff8 in SurgefxAudioProcessorEditor::resetLabels() /home/blah/surge/src/surge-fx/SurgeFXEditor.cpp:261:27
    #3 0x7fe7907616c2 in SurgefxAudioProcessorEditor::setEffectType(int) /home/blah/surge/src/surge-fx/SurgeFXEditor.cpp:313:5
    #4 0x7fe790767374 in SurgefxAudioProcessorEditor::showMenu()::$_11::operator()() const /home/blah/surge/src/surge-fx/SurgeFXEditor.cpp:482:21
    #5 0x7fe79076731c in void std::__invoke_impl<void, SurgefxAudioProcessorEditor::showMenu()::$_11&>(std::__invoke_other, SurgefxAudioProcessorEditor::showMenu()::$_11&) /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/12.1.0/../../../../include/c++/12.1.0/bits/invoke.h:61:14
    #6 0x7fe7907672cc in std::enable_if<is_invocable_r_v<void, SurgefxAudioProcessorEditor::showMenu()::$_11&>, void>::type std::__invoke_r<void, SurgefxAudioProcessorEditor::showMenu()::$_11&>(SurgefxAudioProcessorEditor::showMenu()::$_11&) /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/12.1.0/../../../../include/c++/12.1.0/bits/invoke.h:111:2
    #7 0x7fe79076712c in std::_Function_handler<void (), SurgefxAudioProcessorEditor::showMenu()::$_11>::_M_invoke(std::_Any_data const&) /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/12.1.0/../../../../include/c++/12.1.0/bits/std_function.h:290:9
    #8 0x7fe79013b1e4 in std::function<void ()>::operator()() const /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/12.1.0/../../../../include/c++/12.1.0/bits/std_function.h:591:9
    #9 0x7fe7905ddde8 in juce::MessageManager::callAsync(std::function<void ()>)::AsyncCallInvoker::messageCallback() /home/blah/surge/libs/JUCE/modules/juce_events/messages/juce_MessageManager.cpp:195:44
    #10 0x7fe7905ef218 in juce::InternalMessageQueue::InternalMessageQueue()::'lambda'(int)::operator()(int) const /home/blah/surge/libs/JUCE/modules/juce_events/native/juce_linux_Messaging.cpp:42:62
    #11 0x7fe7905ef190 in void std::__invoke_impl<void, juce::InternalMessageQueue::InternalMessageQueue()::'lambda'(int)&, int>(std::__invoke_other, juce::InternalMessageQueue::InternalMessageQueue()::'lambda'(int)&, int&&) /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/12.1.0/../../../../include/c++/12.1.0/bits/invoke.h:61:14
    #12 0x7fe7905ef121 in std::enable_if<is_invocable_r_v<void, juce::InternalMessageQueue::InternalMessageQueue()::'lambda'(int)&, int>, void>::type std::__invoke_r<void, juce::InternalMessageQueue::InternalMessageQueue()::'lambda'(int)&, int>(juce::InternalMessageQueue::InternalMessageQueue()::'lambda'(int)&, int&&) /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/12.1.0/../../../../include/c++/12.1.0/bits/invoke.h:111:2
    #13 0x7fe7905ef011 in std::_Function_handler<void (int), juce::InternalMessageQueue::InternalMessageQueue()::'lambda'(int)>::_M_invoke(std::_Any_data const&, int&&) /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/12.1.0/../../../../include/c++/12.1.0/bits/std_function.h:290:9
    #14 0x7fe79040403c in std::function<void (int)>::operator()(int) const /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/12.1.0/../../../../include/c++/12.1.0/bits/std_function.h:591:9
    #15 0x7fe7905e3f36 in juce::InternalRunLoop::dispatchPendingEvents() /home/blah/surge/libs/JUCE/modules/juce_events/native/juce_linux_Messaging.cpp:185:25
    #16 0x7fe7905d6fee in juce::dispatchNextMessageOnSystemQueue(bool) /home/blah/surge/libs/JUCE/modules/juce_events/native/juce_linux_Messaging.cpp:299:26
    #17 0x7fe790134405 in ClapJuceWrapper::onTimer(unsigned int) /home/blah/surge/libs/clap-juce-extensions/src/wrapper/clap-juce-wrapper.cpp:233:16
    #18 0x7fe79013a08f in clap::helpers::Plugin<(clap::helpers::MisbehaviourHandler)0, (clap::helpers::CheckingLevel)1>::clapOnTimer(clap_plugin const*, unsigned int) /home/blah/surge/libs/clap-juce-extensions/clap-libs/clap-helpers/include/clap/helpers/plugin.hxx:925:12
    #19 0x55aaf69732ff in qtractorClapPlugin::Impl::plugin_on_timer(unsigned int) /home/blah/qtractor/src/qtractorClapPlugin.cpp:2325:3
    #20 0x55aaf6973098 in qtractorClapPluginHost::process_timers() /home/blah/qtractor/src/qtractorClapPlugin.cpp:1279:16
    #21 0x55aaf6997b7b in qtractorClapPluginHost::Timer::timerEvent(QTimerEvent*) /home/blah/qtractor/src/qtractorClapPlugin.cpp:248:13
    #22 0x7fe7b7818e75 in QObject::event(QEvent*) (/usr/lib/libQt6Core.so.6+0x157e75)
    #23 0x7fe7b9a8a9db in QApplicationPrivate::notify_helper(QObject*, QEvent*) (/usr/lib/libQt6Widgets.so.6+0x1749db)
    #24 0x7fe7b77d4087 in QCoreApplication::notifyInternal2(QObject*, QEvent*) (/usr/lib/libQt6Core.so.6+0x113087)
    #25 0x7fe7b792731a in QTimerInfoList::activateTimers() (/usr/lib/libQt6Core.so.6+0x26631a)
    #26 0x7fe7b79f32c9  (/usr/lib/libQt6Core.so.6+0x3322c9)
    #27 0x7fe7b8e42c6a in g_main_context_dispatch (/usr/lib/libglib-2.0.so.0+0x54c6a)
    #28 0x7fe7b8e99000  (/usr/lib/libglib-2.0.so.0+0xab000)
    #29 0x7fe7b8e40391 in g_main_context_iteration (/usr/lib/libglib-2.0.so.0+0x52391)
    #30 0x7fe7b79f14d1 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (/usr/lib/libQt6Core.so.6+0x3304d1)
    #31 0x7fe7b77dd013 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) (/usr/lib/libQt6Core.so.6+0x11c013)
    #32 0x7fe7b77d76aa in QCoreApplication::exec() (/usr/lib/libQt6Core.so.6+0x1166aa)
    #33 0x55aaf6885dd3 in main /home/blah/qtractor/src/qtractor.cpp:564:9
    #34 0x7fe7b69b128f  (/usr/lib/libc.so.6+0x2928f)
    #35 0x7fe7b69b1349 in __libc_start_main (/usr/lib/libc.so.6+0x29349)
    #36 0x55aaf674e5d4 in _start /build/glibc/src/glibc/csu/../sysdeps/x86_64/start.S:115

AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV /home/blah/surge/libs/JUCE/modules/juce_gui_basics/widgets/juce_Slider.cpp:174:9 in juce::Slider::Pimpl::setValue(double, juce::NotificationType)
==30395==ABORTING
baconpaul commented 2 years ago

Oh interesting. Is it only EQ or other types too? I presume it is other types.

Let’s keep it here for a bit. That stack looks pretty surge / cje pointing to me.

haenkel commented 2 years ago

yes eq is just an example, switching effect types does it.

baconpaul commented 2 years ago

Yeah

I'm chasing validator crashes today and notice that one of the tests in surge fx crashes around parameter flushes and the like. wonder if that's related? Will poke at it this week and kicked it into the milestone.