ThreadWithProgressWindow upon Menu command

Only on Mac, the ThreadWithProgressWindow will fail to update and dismiss if it is runThread() from a Menu command. For example, the user clicks the open menu item and chooses a big file to load, and then it tries to use ThreadWithProgressWindow.

After debugging in Juce for about a hour. I found the reason. It turns out that ThreadWithProgressWindow starts a 100ms timer to update the UI and detect if the task is done. However, this timer’s timerCallback will never be called because the current main thread is blocked by another timer which invokes the menu command. See attached picture for callstack. But this does not happen on Windows. Any idea?

Agghhh… Will everyone PLEASE stop wasting my time by reporting bugs in code that no longer exists!!