Hi all,
I’m having a strange, erratic bug in my latest Windows plugin (demo can be grabbed from ValhallaRoom 1.5.1 Released for OSX and Windows. Electric Blue GUI. - Valhalla DSP). I’m using a PopupWindow for the preset menu. Things work great in OSX, but on Windows, if you do a lot of rapid browsing in the PopupMenu, and open up PopupMenus from the main PopupMenu, it crashes the DAW.
Here’s the call stack:
[code] ValhallaRoom.dll!juce::WeakReferencejuce::Component::SharedPointer::get() Line 137 + 0xa bytes C++
ValhallaRoom.dll!juce::WeakReferencejuce::Component::Master::operator()(juce::Component * const object) Line 180 + 0x12 bytes C++
ValhallaRoom.dll!juce::Component::getWeakReference() Line 448 C++
ValhallaRoom.dll!juce::WeakReferencejuce::Component::WeakReferencejuce::Component(juce::Component * const object) Line 92 + 0x37 bytes C++
ValhallaRoom.dll!juce::Component::BailOutChecker::BailOutChecker(juce::Component * const component) Line 3031 + 0x26 bytes C++
ValhallaRoom.dll!juce::Component::internalHierarchyChanged() Line 1510 + 0xf bytes C++
ValhallaRoom.dll!juce::Component::setAlwaysOnTop(const bool shouldStayOnTop) Line 902 C++
ValhallaRoom.dll!juce::DropShadower::updateShadows() Line 255 C++
ValhallaRoom.dll!juce::DropShadower::componentVisibilityChanged(juce::Component & __formal) Line 176 C++
ValhallaRoom.dll!juce::ListenerList<juce::ComponentListener,juce::Array<juce::ComponentListener * __ptr64,juce::DummyCriticalSection> >::callChecked<juce::Component::BailOutChecker,juce::Component & __ptr64>(const juce::Component::BailOutChecker & bailOutChecker, void (juce::Component &)* callbackFunction, juce::Component & param1) Line 181 + 0x16 bytes C++
ValhallaRoom.dll!juce::Component::sendVisibilityChangeMessage() Line 537 + 0x24 bytes C++
ValhallaRoom.dll!juce::Component::setVisible(bool shouldBeVisible) Line 511 C++
ValhallaRoom.dll!juce::PopupMenu::showSubMenuFor(juce::PopupMenu::ItemComponent * const childComp) Line 1041 C++
ValhallaRoom.dll!juce::PopupMenu::timerCallback() Line 554 C++
ValhallaRoom.dll!juce::InternalTimerThread::callTimers() Line 138 + 0x10 bytes C++
ValhallaRoom.dll!juce::InternalTimerThread::handleMessage(const juce::Message & __formal) Line 155 C++
ValhallaRoom.dll!juce::MessageManager::deliverMessage(juce::Message * const message) Line 116 + 0x15 bytes C++
ValhallaRoom.dll!juce::MessageManager::dispatchNextMessageOnSystemQueue(const bool returnIfNoPendingMessages) Line 164 C++
ValhallaRoom.dll!juce::MessageManager::runDispatchLoopUntil(int millisecondsToRunFor) Line 148 + 0x1d bytes C++
ValhallaRoom.dll!juce::ModalComponentManager::runEventLoopForCurrentComponent() Line 280 + 0x12 bytes C++
ValhallaRoom.dll!juce::Component::runModalLoop() Line 1553 C++
ValhallaRoom.dll!juce::PopupMenu::showWithOptionalCallback(const juce::PopupMenu::Options & options, juce::ModalComponentManager::Callback * const userCallback, const bool canBeModal) Line 1516 + 0x21 bytes C++
ValhallaRoom.dll!juce::PopupMenu::showAt(juce::Component * componentToAttachTo, const int itemIdThatMustBeVisible, const int minimumWidth, const int maximumNumColumns, const int standardItemHeight, juce::ModalComponentManager::Callback * callback) Line 1582 + 0x1d bytes C++
ValhallaRoom.dll!ValhallaRoomEditor::doPatchMenu() Line 141 + 0x38 bytes C++
ValhallaRoom.dll!ValhallaRoomEditor::buttonClicked(juce::Button * buttonThatWasClicked) Line 597 C++
ValhallaRoom.dll!juce::ListenerList<juce::Button::Listener,juce::Array<juce::Button::Listener * __ptr64,juce::DummyCriticalSection> >::callChecked<juce::Component::BailOutChecker,juce::Button * __ptr64>(const juce::Component::BailOutChecker & bailOutChecker, void (juce::Button ) callbackFunction, juce::Button * param1) Line 181 + 0x16 bytes C++
ValhallaRoom.dll!juce::Button::sendClickMessage(const juce::ModifierKeys & modifiers) Line 384 + 0x24 bytes C++
ValhallaRoom.dll!juce::Button::internalClickCallback(const juce::ModifierKeys & modifiers) Line 326 C++
ValhallaRoom.dll!juce::Button::mouseUp(const juce::MouseEvent & e) Line 441 C++
ValhallaRoom.dll!juce::Component::internalMouseUp(juce::MouseInputSource & source, const juce::Point & relativePos, const juce::Time & time, const juce::ModifierKeys & oldModifiers) Line 2483 C++
ValhallaRoom.dll!juce::MouseInputSourceInternal::sendMouseUp(juce::Component * const comp, const juce::Point & screenPos, const juce::Time & time) Line 134 + 0x67 bytes C++
ValhallaRoom.dll!juce::MouseInputSourceInternal::setButtons(const juce::Point & screenPos, const juce::Time & time, const juce::ModifierKeys & newButtonState) Line 166 + 0x4f bytes C++
ValhallaRoom.dll!juce::MouseInputSourceInternal::handleEvent(juce::ComponentPeer * const newPeer, const juce::Point & positionWithinPeer, const juce::Time & time, const juce::ModifierKeys & newMods) Line 279 + 0x19 bytes C++
ValhallaRoom.dll!juce::MouseInputSource::handleEvent(juce::ComponentPeer * peer, const juce::Point & positionWithinPeer, const __int64 time, const juce::ModifierKeys & mods) Line 528 + 0x66 bytes C++
ValhallaRoom.dll!juce::ComponentPeer::handleMouseEvent(const int touchIndex, const juce::Point & positionWithinPeer, const juce::ModifierKeys & newMods, const __int64 time) Line 108 C++
ValhallaRoom.dll!juce::Win32ComponentPeer::doMouseEvent(const juce::Point & position) Line 1397 C++
ValhallaRoom.dll!juce::Win32ComponentPeer::doMouseUp(const juce::Point & position, const unsigned int64 wParam) Line 1496 C++
ValhallaRoom.dll!juce::Win32ComponentPeer::peerWindowProc(HWND * h, unsigned int message, unsigned __int64 wParam, int64 lParam) Line 2051 + 0x47 bytes C++
ValhallaRoom.dll!juce::Win32ComponentPeer::windowProc(HWND * h, unsigned int message, unsigned __int64 wParam, __int64 lParam) Line 1969 + 0x23 bytes C++
[/code]
The actual line that displays the menu in my own code is
const int result = menu.showAt (presetsSelect);
I have a feeling that this might have something to do with modal state, but I HAVE NO IDEA WHAT THAT MEANS. I am just using the PopupMenu, I have no idea why this is crashing, and I have a bunch of people complaining about it in a bunch of forums, so my brain is a bit frazzled. Any assistance is greatly appreciated. Example code, or pointers to example code for fixes, is always welcome (DSP guy here - not great at the deeper C++ stuff, but I can rattle off a few dozen allpass topologies that are useful).
Thanks,
Sean Costello