Hi there,
Anyone know how to suppress this annoying dialog when re-running an app from Xcode?
E.g. building juce’s AudioRecordingDemo app in Xcode opens the app fine, then re-running the build also opens the app fine but also shows this dialog on top.
Is there perhaps some macOS/Xcode/Cmake setting that disables a set of crash reporting dialogs for development only?
1 Like
I had a similar issue and found that it was due to my JUCEApplication
’s initialise
method taking too long to run. You can see it by adding a juce::Thread::sleep (1000);
and setting a breakpoint after and seeing that the error happens during the sleep!
1 Like
I’ve noticed the same but i’m running a different version of the run loop. I’m pumping the message thread with CFRunLoopRunInMode
once i switched it to use kCFRunLoopCommonModes
instead of kCFRunLoopDefaultMode
, this completely removed the annoying popup. But i’m not 100% sure of the consequences, but worth mentioning.
2 Likes
Building the juce example “HelloWorldDemo” after completely emptying the body of its Main::initialise()
method still produces the issue consistently for me.
1 Like
And [NSApp setMainMenu: mainMenuBar];
is being called in time? I guessed that might be the crucial part but possibly it’s something else.
1 Like
I’m afraid I’m unable to replicate the issue at all. Even with inserting sleeps.
1 Like
Btw in case it matters for repro info I’m on macOS 15.5 (24F74) on a M4 Pro MacBook connected to a monitor using Xcode Version 16.2 (16C5032a) with JUCE currently based on 7
1 Like
I noticed that there is some connection between the amount of time that a message on the message thread is taking to perform and the popup. I’ve previously executed unit tests on the message thread (using googletest RUN_ALL_TESTS) in a single MessageManager::callAsync
and was experiencing the popup pretty much at every run. Now i execute each test suite in their own callAsync and i haven’t seen the popup ever since.
Btw here also i’m on 15.5 (24F74) with the basis of juce_core/juce_events of JUCE 7
2 Likes
It only started a few months ago for me, either with the latest macOS or Xcode update. I do the following now and the popup has gone away for me:
void NexusStandaloneApp::initialise ( const juce::String& /*commandLineParameters*/ )
{
juce::Timer::callAfterDelay ( 1, [ this ]
{
if ( getInstance () )
createPlugin ();
} );
}
3 Likes
I still get the issue when delaying initialisation, tried both 1ms and 5000ms delay:
void initialise (const juce::String&) override
{
juce::Timer::callAfterDelay ( 1, [ this ]
{
mainWindow.reset (new MainWindow ("HelloWorldDemo", new HelloWorldDemo, *this));
} );
}
This is on Xcode 16.0, macOS 15.5, juce 8.0.8.
Updated on Xcode to different versions and tried again…
- HelloWorldDemo still produces the issue on Xcode 16.0, 16.4, 26.0 (Beta 3).
- Issue occurs whether the previous debug run was crashed or safely quitted (i.e. program exit code 9 or 0).
- Issue does not occur on the first run after reopening the .xcodeproj or restarting Xcode.
- ConsoleAppExample does not produce the issue under any condition.