sendChangeMessage problem

Hi together

Have some issues with the latest tip, hope someone can help me. Sometimes cubase 6 crashes (pc win 7 64bit) when i move a GUI slider or knob:

Cubase6.exe Version 6.0.1 Build 270 - 4.4.2011 13:59

Timestamp is 4d6c116a (Mon Feb 28 22:19:38 2011)
C:\Program Files (x86)\Steinberg\Cubase 6\Cubase6.exe

Exception code: C0000005 ACCESS_VIOLATION
Fault address: 229AFB82 02:004FAB82 C:\Program Files (x86)\Steinberg\Vstplugins\TAL - Togu Audio Line\TAL-Vocoder-2.dll

EAX=bf12c5fa ECX=20170318 EDX=00000000 EBX=00000000 ESI=0018f728 EDI= 0018f814
EBP=0018f820 EIP=229afb82 ESP=0018f720 CS= 00000023 SS= 0000002b Flags=00010246
DS= 0000002b ES= 0000002b FS= 00000053 GS= 0000002b

Float Save:
Control Word= 0000027f Status Word= 00004020 Tag Word=0000ffff
Error Offset= 224e7d4d Error Selector=041d0023
Data Offset= 22b50f00 Data Selector= 0000002b
Cr0NpxState= 0b61fc20

Bytes at CS:EIP:
ff 60 08 cc cc cc cc cc cc cc cc cc cc cc 81 e9
84 00 00 00 e9 21 c9 b1 ff cc cc cc cc cc 83 e9

Call stack:
Address Frame
229AFB82 0018F71C juce::ValueTree::Listener::`vcall’{8}’+2
229478F7 0018F820 juce::ListenerList<juce::ChangeListener,juce::Array<juce::ChangeListener *,juce::DummyCriticalSection> >::call<juce::ChangeBroadcaster *>+77
225C64E7 0018F908 juce::ChangeBroadcaster::callListeners+37
225C667E 0018F9E8 juce::ChangeBroadcaster::ChangeBroadcasterCallback::handleAsyncUpdate+8E
225C57D0 0018FAC8 juce::AsyncUpdaterMessage::messageCallback+50
225C960A 0018FBE4 juce::MessageManager::deliverMessage+9A
2280513E 0018FD50 juce::juce_MessageWndProc+AE
75D66238 0018FD7C gapfnScSendMessage+270
75D668EA 0018FDF4 gapfnScSendMessage+922
75D67D31 0018FE54 LoadStringW+11F
75D67DFA 0018FE64 DispatchMessageW+F
0115B1E9 0018FEA4 0001:00D5A1E9 C:\Program Files (x86)\Steinberg\Cubase 6\Cubase6.exe
0115A190 0018FF88 0001:00D59190 C:\Program Files (x86)\Steinberg\Cubase 6\Cubase6.exe
765A3677 0018FF94 BaseThreadInitThunk+12
76F99F02 0018FFD4 RtlInitializeExceptionChain+63
76F99ED5 0018FFEC RtlInitializeExceptionChain+36[/code]

I’m using ChangeListener in the view to get notifies from the Processor.

class TalComponent : public AudioProcessorEditor, public SliderListener, public ButtonListener, public ComboBoxListener, public ChangeListener

It never crashes if i remove following line in setParameter(int index, float newValue). Think thats the cause for the crash.

I’m also shure that my updateParametersFromFilter in the view hasnt a bug. It also crashes if this method is empty. And i can call the method from the gui constructor to initialize the values without any problem.

Its wired, it seems that this does not happen in minihost and sometimes it works in cubase too. Its to bad that i cant debug in cubase 6, think because some copy protection stuff… I saw that a lot things changed within the ChangeListener handling for plugins, maybe i missed something?

Thanks for reading. Any ideas?

Looks suspiciously like a dangling pointer to me…

Thanks for the response. Maybe i was a bit misleaded, because it happened in the message handling. Will check my pointers…

It looks like there’s something registered as a changelistener that’s been deleted. Hard to tell from the stack trace though.

Thanks a lot. Looks as the problem is solved now. Forgot getProcessor()->removeChangeListener(this); in the view’s deconstructor. Commented this out after i updated the tip and forgot to enable it again.