You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
One of our mac users has recently been helping troubleshoot issues that we've had with our macOS package. They identified two situations where creating and/or destroying a GLJPanel in close proximity to other AWT/Swing-ish commands will cause the application to hang with, so far, no known error messages.
The test system in question is running Big Sur with OpenJDK-17.0.1
These are distilled-down versions. If the code looks odd, it's because we have clipped out all the application-specific context for why these operations are done in this order.
We speculate that there may be a timing component because wrapping some of the operations in nested SwingUtilities.invokeLater() will allow the application to proceed without hanging.
importcom.jogamp.opengl.awt.GLJPanel;
importjavax.swing.JFrame;
importjavax.swing.JPanel;
importjavax.swing.SwingUtilities;
publicclassMaximizeTest2 {
JFramef;
GLJPanelcanvas;
JPanelp;
publicMaximizeTest2() {
newWindow();
}
publicvoidnewWindow() {
SwingUtilities.invokeLater(newRunnable() {
@Overridepublicvoidrun() {
f = newJFrame("test frame maximized both ");
f.setExtendedState(JFrame.MAXIMIZED_BOTH); //This call is about the only thing that reliablyf.setVisible(true); //triggers this behavior, but it actually came//up in the real applicationp = newJPanel();
canvas = newGLJPanel();
//p.add(canvas); //Note: It does not seem to matter if canvas is added to the panel or not.f.setContentPane(p);
f.validate();
System.out.println("yyyy");
}
});
}
publicstaticvoidmain(String[] args) {
// TODO code application logic hereSystem.out.println("xxxx");
newMaximizeTest2();
System.out.println("zzzz");
}
}
Reproduced with the following JDK on MacOS
Azul JDK 17 for ARM
OpenJDK 17 (Rosetta might be involved to run on ARM)
OpenJDK 11 (Rosetta as well)
The text was updated successfully, but these errors were encountered:
Initially discussed here.
Reproduced with the following JDK on MacOS
The text was updated successfully, but these errors were encountered: