TabbedComponent non-stop paint()

I’m sure I must be overlooking something really simple. I’m using a subclass of TabbedComponent with a custom TabBarButton, hosting four tabs with some composite components. Now something makes the TabbedComponent run its paint() non-stop. I have actually stripped it down to a bare bones TabbedComponent subclass, no tabs, no createTabButton() override and it still runs paint() endlessly. Any clues to solve this would be greatly appreciated, some of the components I’m loading are expensive to render and cannot be refreshed constantly. Thanks in advance.

Are you calling repaint() in a timer callback, or from parameterChanged(), perhaps? Or running in a debugger, which causes the UI to refresh every time you switch from the debugger back to the DAW? (I like to use two monitors and use Studio One instead of Cubase for debugging VST3 plugins for that reason… no UI repaints every time I do anything in the debugger!)

Thank you, but no timer callbacks of any kind, nor parameterChanged() repaints. I’m using attachments exclusively for that, except for a few static ValueTree elements, pretty vanilla JUCE UI techniques. No user activity either for that matter, no mouse movement, nothing, it just sits there an paints. Naturally I blamed my custom components at first but then tracked it down to the TabbedComponent which seems to be running a lot of repaints just by itself, even if completely empty. I’ll try to stand up a separate example and see if it can be reproduced in a simpler context. Thanks …

Have you removed all child components from your TabbedComponent, and if so, does it still do continuous repaints? if not, have you added the children back one at a time to see which one is causing the repaints?

Good morning, yes, stripped it down to essentially an empty tabbed component with just a paint() override, and all that does is write out that it’s being called. I haven’t had a chance to stand up a separate plugin editor for more troubleshooting, but it really does not look correct. Thanks …

Alright, so here is the TabbedComponent infinite loop trap. Hastily coded I suppose, but problem solved …

void MasterGroup::paint(Graphics& g) {

    Colour tabColor = findColour(MainProcessorEditor::backgroundColourId);

    for (int tab = 0; tab < getNumTabs(); ++tab) {
        setTabBackgroundColour(tab, tabColor);
    }
}