Access violation in juce_ListenerList.h


#1

I have found problem with my GUI and I don’t know if I am missing something. I am using JUCE 4.2.3. Inside my PluginEditor I have component “Foo”

class Foo : public Component, public ChangeListener
{
};

Inside constructor I am adding ChangeListener

Desktop::getInstance().getAnimator().addChangeListener(this);

Later I am calling

Desktop::getInstance().getAnimator().animateComponent(…);

Even if changeListenerCallback function is empty I am getting Access violation. How can I solve this problem?


#2

have you tried to using a member version of the animator? Sounds like the connection is getting broken and then the animator is trying to send a message to a nullptr. Perhaps the host is breaking the connection and you’d be better off using your own as opposed to the global


#3

I don’t know if it is possible. It looks that connection is fine because changeListenerCallback is recalling properly, whole code inside is working fine. It is crashing on callback return.


#4

Can you post a stack trace?