App hangs after quitting and reopening


My app has a problem on OSX where it will run once, but if you quit and try to reopen it it will sometimes but not always (maybe 1 in 3 times) hang. Its a dual screen app, and both screens go white with the spinning multicoloured cursor.

In activity monitor, whenever this happens, there is a process called ‘SystemUIServer’ that is not responding.

Slightly oddly, I never seem to get the problem if I have devTools open…

Is there something I need to do to make the app quit properly so it can restart without hanging?

At the moment I just have:

app.on(‘window-all-closed’, function () {