Okay, so this is a really, REALLY weird problem that we have with the application in my company. I will try to describe it as best as possible.
Firstly, it is an obsolete Swing user interface application.
Secondly, the problem only occurs when it is compiled and launched using Java 8. This does not happen with Java 7 and below.
So, the problem is: when the dialog is displayed (modal or non-modal, it does not matter), the user interface becomes immune to mouse clicks. However, what is really crazy is that the user interface is NOT frozen. Hovering over something causes the cursor to highlight as usual. Keyboard commands are great. However, mouse clicks do not work.
This also happens only on OSX. Windows and Linux do not have this problem. I am running this on OSX El Capitan.
For code samples, this affects all dialogs in the application. JOptionPanes and JDialogs don't seem to matter. Here is a simple JOptionPane declaration:
int n = JOptionPane.showOptionDialog(mcContext.getMapperView(), "xPath of dropping target can't be evaluated" + "\nPlease, select xPath for dropped node", "xPath calculation for dropped node", JOptionPane.YES_NO_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE, null, options, options[0]);
This code is called in EventThread, so I do not consider this a problem with threads.
I am completely fixated on the reason for this. So far, we have ignored it, compiling and running it in Java 7, but at some point, when the versions will evolve, we will have to solve this problem more directly.
Does anyone have any idea?
Edit: Thanks for the idea of ββSSCCE. Now I'm more confused than ever. When I put together a quick frame / dialog demo, it worked perfectly. No questions. Therefore, I do not know what exactly in the application can cause this. Any good places to start looking?
Edit 2: One of the ads in SwingUtilities.invokeLater was wrapped and it worked. Alright ... now, what could be the culprit? This should still be something that Java 8 compiles other than Java 7.
Edit 3: Stranger behavior. I moved my IDE to a separate "desktop" than the application in which it was running, and when the error dialog is displayed, I cannot switch to this desktop. I can switch to any application on the current desktop, but not to another desktop.
Edit 4: These dialogs are launched using drag and drop actions. Not sure if this helps or not, but I see that there is a stream in the background in the stream dump using the sun.lwawt.macosx.CDragSourceContextPeer class.