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(Logger.java:144)
at com.intellij.ui.messages.SheetMessage.<init>(SheetMessage.java:129)
at com.intellij.ui.messages.JBMacMessages.showMessageDialog(JBMacMessages.java:83)
at com.intellij.openapi.ui.Messages.showDialog(Messages.java:152)
at com.intellij.openapi.ui.Messages.showDialog(Messages.java:129)
at com.dci.intellij.dbn.common.util.MessageUtil$1.showDialog(MessageUtil.java:105)
at com.dci.intellij.dbn.common.util.MessageUtil$1.access$000(MessageUtil.java:87)
at com.dci.intellij.dbn.common.util.MessageUtil$1$1.execute(MessageUtil.java:95)
at com.dci.intellij.dbn.common.thread.SynchronizedTask.run(SynchronizedTask.java:17)
at com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.run(LaterInvocator.java:318)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:715)
at java.awt.EventQueue.access$400(EventQueue.java:82)
at java.awt.EventQueue$2.run(EventQueue.java:676)
at java.awt.EventQueue$2.run(EventQueue.java:674)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:86)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:685)
at com.intellij.ide.IdeEventQueue.e(IdeEventQueue.java:748)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:577)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:384)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:296)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:211)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:196)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:188)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
Please sign in to leave a comment.
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