Receiving "The should return focus on closing the message" when using Messages.showDialog

I am sometimes receiving the following assertion exception when using Messages.showDialog(): "The should return focus on closing the message".
Not sure what i am doing wrong. I am ensuring this runs in the dispatch thread. This only happens on MAC-OS. Appreciate any hint.

at com.intellij.openapi.diagnostic.Logger.assertTrue(
at com.intellij.ui.messages.SheetMessage.<init>(
at com.intellij.ui.messages.JBMacMessages.showMessageDialog(
at com.intellij.openapi.ui.Messages.showDialog(
at com.intellij.openapi.ui.Messages.showDialog(
at com.dci.intellij.dbn.common.util.MessageUtil$1.showDialog(
at com.dci.intellij.dbn.common.util.MessageUtil$1.access$000(
at com.dci.intellij.dbn.common.util.MessageUtil$1$1.execute(
at com.intellij.openapi.application.impl.LaterInvocator$
at java.awt.event.InvocationEvent.dispatch(
at java.awt.EventQueue.dispatchEventImpl(
at java.awt.EventQueue.access$400(
at java.awt.EventQueue$
at java.awt.EventQueue$
at Method)
at java.awt.EventQueue.dispatchEvent(
at com.intellij.ide.IdeEventQueue.e(
at com.intellij.ide.IdeEventQueue._dispatchEvent(
at com.intellij.ide.IdeEventQueue.dispatchEvent(
at java.awt.EventDispatchThread.pumpOneEventForFilters(
at java.awt.EventDispatchThread.pumpEventsForFilter(
at java.awt.EventDispatchThread.pumpEventsForHierarchy(
at java.awt.EventDispatchThread.pumpEvents(
at java.awt.EventDispatchThread.pumpEvents(


You're not doing anything wrong; this is an IntelliJ issue. The assertion is removed in the current 14.1 code.


Great! Thanks Dmitry!


Is there any quick workaround for circumventing this? I am getting lots of issue reports. My message dialogs are usually not triggered by the user directly, they are mostly the result of a background operation which eventually finishes while the ide is not focused. This is the only explanation why i get so many of these.
Or can the fix be ported back to the earlier releases? say 14.0,x


Please sign in to leave a comment.