Sorry, I should clarify, my problem is slightly different from that of the original poster. I should have read more carefully.
I’m not actually disabling the splash screen by not defining JUCE_DISPLAY_SPLASH SCREEN. The problem occurs when the splash screen is enabled, and JUCESplashScreen gets constructed twice. This happens when I close and open my plugin window.
So the first time my plugin UI is opened, the splash screen works perfectly. If I close the plugin window, the AudioProcessorEditor gets deleted. Then I open my plugin window, and the AudioProcessorEditor gets constructed again, and a new JUCESplashScreen gets created in AudioProcessorEditor::initialise (). That’s when the problem I describe above occurs.
splashDisplayTime is a static global, so the second time JUCESplashScreen gets constructed, it’s non-zero, and provided that more than 2 seconds has elapsed since the first splash screen was shown, we “startTimer (1)” without making the JUCESplashScreen visible.
In the timer callback, the first condition is:
if (isVisible () && !hasStartedFading)
isVisible returns false, so nothing gets executed here, most important, hasStartedFading does not get set to true.
the next condition is:
if (hasStartedFading && !fader.isAnimating())
hasStartedFading is also false, so “delete this” never executes.
the timer never gets stopped and runs at 1ms intervals without either of the conditions in the timerCallback every being true.
it looks like this could be resolved by making hasStartedFading also a static global.
I hope this makes sense! I’m sorry about the confusion! I think I should have started a new thread. I apologize for not reading more carefully before posting.