Segfault on exit from plugin or Standalone

Hello! I need some help :slight_smile:
I have the component juce::Component fx that is showed from ResizableWindow:

 wnd_fx = new juce::ResizableWindow ("FX", false);
 wnd_fx->setContentNonOwned (&fx, true);

There are some sub-components added to fx, with attached parameters,
juce::AudioProcessorValueTreeState::ButtonAttachment and juce::AudioProcessorValueTreeState::SliderAttachment. If I use the button component, all works fine. But with the slider, I get the segfaul at the desctructor on the component that is parent to fx:

0x0000555555883ce8 in juce::HeapBlock<juce::Slider::Listener*, false>::operator juce::Slider::Listener** (
    this=0x28) at /home/rox/devel/drumlabooh/b/_deps/juce-src/modules/juce_core/memory/juce_HeapBlock.h:182
182         inline operator ElementType*() const noexcept                            { return data; }
(gdb) bt
#0  0x0000555555883ce8 in juce::HeapBlock<juce::Slider::Listener*, false>::operator juce::Slider::Listener** (
    this=0x28) at /home/rox/devel/drumlabooh/b/_deps/juce-src/modules/juce_core/memory/juce_HeapBlock.h:182
#1  0x000055555586796c in juce::ArrayBase<juce::Slider::Listener*, juce::DummyCriticalSection>::begin (this=0x28)
    at /home/rox/devel/drumlabooh/b/_deps/juce-src/modules/juce_core/containers/juce_ArrayBase.h:171
#2  0x0000555555844785 in juce::Array<juce::Slider::Listener*, juce::DummyCriticalSection, 0>::removeFirstMatchingValue (this=0x28, valueToRemove=0x55555620ef60)
    at /home/rox/devel/drumlabooh/b/_deps/juce-src/modules/juce_core/containers/juce_Array.h:813
#3  0x0000555555815316 in juce::ListenerList<juce::Slider::Listener, juce::Array<juce::Slider::Listener*, juce::DummyCriticalSection, 0> >::remove (this=0x28, listenerToRemove=0x55555620ef60)
    at /home/rox/devel/drumlabooh/b/_deps/juce-src/modules/juce_core/containers/juce_ListenerList.h:108
#4  0x0000555555749125 in juce::Slider::removeListener (this=0x7ffff61e0d58, l=0x55555620ef60)
    at /home/rox/devel/drumlabooh/b/_deps/juce-src/modules/juce_gui_basics/widgets/juce_Slider.cpp:1467
#5  0x0000555555644267 in juce::SliderParameterAttachment::~SliderParameterAttachment (this=0x55555620ef60, 
    __in_chrg=<optimized out>)
    at /home/rox/devel/drumlabooh/b/_deps/juce-src/modules/juce_audio_processors/utilities/juce_ParameterAttachments.cpp:170
#6  0x000055555564429e in juce::SliderParameterAttachment::~SliderParameterAttachment (this=0x55555620ef60, 
    __in_chrg=<optimized out>)
    at /home/rox/devel/drumlabooh/b/_deps/juce-src/modules/juce_audio_processors/utilities/juce_ParameterAttachments.cpp:171
#7  0x0000555555c10cec in std::default_delete<juce::SliderParameterAttachment>::operator() (this=0x55555620ef40, 
    __ptr=0x55555620ef60) at /usr/include/c++/13.2.1/bits/unique_ptr.h:99
#8  0x0000555555c109fa in std::unique_ptr<juce::SliderParameterAttachment, std::default_delete<juce::SliderParameterAttachment> >::~unique_ptr (this=0x55555620ef40, __in_chrg=<optimized out>)
    at /usr/include/c++/13.2.1/bits/unique_ptr.h:404
#9  0x0000555555c1051c in juce::AudioProcessorValueTreeState::SliderAttachment::~SliderAttachment (
    this=0x55555620ef40, __in_chrg=<optimized out>)
    at /home/rox/devel/drumlabooh/b/_deps/juce-src/modules/juce_audio_processors/utilities/juce_AudioProcessorValueTreeState.h:540
#10 0x0000555555c10542 in std::default_delete<juce::AudioProcessorValueTreeState::SliderAttachment>::operator() (
    this=0x7ffff61e0998, __ptr=0x55555620ef40) at /usr/include/c++/13.2.1/bits/unique_ptr.h:99
#11 0x0000555555c10164 in std::unique_ptr<juce::AudioProcessorValueTreeState::SliderAttachment, std::default_delete<--Type <RET> for more, q to quit, c to continue without paging--
juce::AudioProcessorValueTreeState::SliderAttachment> >::~unique_ptr (this=0x7ffff61e0998, 

upd: fixed by attachment = nullptr; at destructor