Unexplained assertion in juce_Thread.cpp

I’ve started running into a problem where I frequently get an assertion on line 233 of juce_Thread.cpp when shutting down an application.

bool Thread::stopThread (const int timeOutMilliseconds)
 // ...

    if (isThreadRunning())
    {
        // very bad karma if this point is reached, as there are bound to be
        // locks and events left in silly states when a thread is killed by force..
        jassertfalse;  //            <<--- here

The assertion comes often when I close the application, but not every time. The funny thing is that it seems to happen in any juce application, not just the one I’m working on. When I build an application from juce demo code and shut it down, I get the same thing. It wasn’t happening yesterday, and since it seems to work independently from my code, I have no idea how to diagnose it. Any suggestions?

I’m not seeing this on macOS 10.14.5 using the latest tip of develop. Are you able to track down the commit which started causing this behaviour?

I’m actually still using JUCE 5.4.1, and haven’t updated it for ages. This is why it’s so strange, as I can’t think of what might have triggered it. But perhaps this is the right time for me to update JUCE anyway–I’ll try it and see if it helps.

This problem seems to have passed. I’ve updated to JUCE 5.4.3, although I could swear that the problem had disappeared before I updated (indicating that it wasn’t the update that fixed it). Maybe it was just having a bad day.