Endless loop on Linux bringing component to front

Eventually malloc fails.

#35455 0x00000000011e795f in juce::ModalComponentManager::bringModalComponentsToFront (this=0x4169310, topOneShouldGrabFocus=false)
    at ../../../modules/juce/modules/juce_gui_basics/components/juce_ModalComponentManager.cpp:225
#35456 0x00000000011e2568 in juce::Component::internalBroughtToFront (this=0x47bbad0)
    at ../../../modules/juce/modules/juce_gui_basics/components/juce_Component.cpp:2563
#35457 0x0000000001268db8 in juce::ComponentPeer::handleBroughtToFront (this=0x4813960)
    at ../../../modules/juce/modules/juce_gui_basics/windows/juce_ComponentPeer.cpp:289
#35458 0x00000000012cca1f in juce::LinuxComponentPeer::toFront (this=0x4813960, makeActive=false)
    at ../../../modules/juce/modules/juce_gui_basics/native/juce_linux_X11_Windowing.cpp:1475
#35459 0x00000000011e795f in juce::ModalComponentManager::bringModalComponentsToFront (this=0x4169310, topOneShouldGrabFocus=false)
    at ../../../modules/juce/modules/juce_gui_basics/components/juce_ModalComponentManager.cpp:225
#35460 0x00000000011e2568 in juce::Component::internalBroughtToFront (this=0x47bbad0)
    at ../../../modules/juce/modules/juce_gui_basics/components/juce_Component.cpp:2563
#35461 0x0000000001268db8 in juce::ComponentPeer::handleBroughtToFront (this=0x4813960)
    at ../../../modules/juce/modules/juce_gui_basics/windows/juce_ComponentPeer.cpp:289
#35462 0x00000000012cca1f in juce::LinuxComponentPeer::toFront (this=0x4813960, makeActive=false)
    at ../../../modules/juce/modules/juce_gui_basics/native/juce_linux_X11_Windowing.cpp:1475
#35463 0x00000000011e795f in juce::ModalComponentManager::bringModalComponentsToFront (this=0x4169310, topOneShouldGrabFocus=false)
    at ../../../modules/juce/modules/juce_gui_basics/components/juce_ModalComponentManager.cpp:225
#35464 0x00000000011e2568 in juce::Component::internalBroughtToFront (this=0x47bbad0)
    at ../../../modules/juce/modules/juce_gui_basics/components/juce_Component.cpp:2563
#35465 0x0000000001268db8 in juce::ComponentPeer::handleBroughtToFront (this=0x4813960)
    at ../../../modules/juce/modules/juce_gui_basics/windows/juce_ComponentPeer.cpp:289
#35466 0x00000000012cca1f in juce::LinuxComponentPeer::toFront (this=0x4813960, makeActive=false)
    at ../../../modules/juce/modules/juce_gui_basics/native/juce_linux_X11_Windowing.cpp:1475
#35467 0x00000000011e795f in juce::ModalComponentManager::bringModalComponentsToFront (this=0x4169310, topOneShouldGrabFocus=false)
    at ../../../modules/juce/modules/juce_gui_basics/components/juce_ModalComponentManager.cpp:225
#35468 0x00000000011e2568 in juce::Component::internalBroughtToFront (this=0x47bbad0)
    at ../../../modules/juce/modules/juce_gui_basics/components/juce_Component.cpp:2563
#35469 0x0000000001268db8 in juce::ComponentPeer::handleBroughtToFront (this=0x4813960)
    at ../../../modules/juce/modules/juce_gui_basics/windows/juce_ComponentPeer.cpp:289
#35470 0x00000000012cca1f in juce::LinuxComponentPeer::toFront (this=0x4813960, makeActive=false)
    at ../../../modules/juce/modules/juce_gui_basics/native/juce_linux_X11_Windowing.cpp:1475
#35471 0x00000000011e795f in juce::ModalComponentManager::bringModalComponentsToFront (this=0x4169310, topOneShouldGrabFocus=false)
    at ../../../modules/juce/modules/juce_gui_basics/components/juce_ModalComponentManager.cpp:225
#35472 0x00000000011e2568 in juce::Component::internalBroughtToFront (this=0x47bbad0)
    at ../../../modules/juce/modules/juce_gui_basics/components/juce_Component.cpp:2563
#35473 0x0000000001268db8 in juce::ComponentPeer::handleBroughtToFront (this=0x4813960)
    at ../../../modules/juce/modules/juce_gui_basics/windows/juce_ComponentPeer.cpp:289
#35474 0x00000000012cca1f in juce::LinuxComponentPeer::toFront (this=0x4813960, makeActive=false)

Not exactly sure what causes it yet.

Have you got some example code which causes this behaviour? I’m having a hard time reproducing it…

Also having a hard time reproducing it in a minimal program… I’ll keep working on it