BUG: Crash inside juce_Component.cpp

Hey Jules

First off - I am using the current git head revision.

I thought this bug had gone with moving from 1.53 but I just saw it happen again.

In my main window, I have a tooltip that I am setting the text of using the settableTooltipClient mechanism (setTooltip).

The crash occurs at juce_Component.cpp:L691 (peer->setAlwaysOnTop (true);).
The call it has come from is TooltipWindow::showFor:L115, called from TooltipWindow::timerCallback:L178.

In the debugger I can see all the contents of peer (including vfptr) are 0xfeeefeee - looks like they have just been deallocated.

The activity that led to this was just moving the mouse over the window that updates its tooltips. Possibly this occurred just when the mouse started moving again. At this point in time the tooltip itself is not shown.

This is not easy to reproduce - but kills my application when it occurs…



Interesting… I’ve never seen that myself, but it sounds like some kind of callback is deleting the peer halfway through the method. Does adding this safeguard sort out the problem:

[code] bounds.setPosition (topLeft);
peer->setBounds (topLeft.x, topLeft.y, getWidth(), getHeight(), false);
peer->setVisible (isVisible());

peer = ComponentPeer::getPeerFor (this);
if (peer == nullptr)

        if (wasFullscreen)



Hi Jules

I have just got back to this code now and will give it a shot.


Hi Jules

So far so good. No crashes with the new code in place. My hypothesis is that this is closing down the race…

If I get any recurrence I will let you know.


ps. New profile picture is a good one…