<AWT Dev> AWT windows cannot be opened on Mavericks if screensaver is active
Thorsten Meinl
thorsten.meinl at knime.com
Tue Mar 18 10:08:25 UTC 2014
Hi,
I discovered a regression with the latest Mavericks update in MacOS X.
We have an automated test system (Jenkins) that runs GUI tests on MacOS
X. Since the update to Mavericks they don't work any more but lead to
exceptions such as
java.lang.NullPointerException
at java.awt.Window.initGC(Window.java:467)
at java.awt.Window.init(Window.java:487)
at java.awt.Window.<init>(Window.java:536)
at java.awt.Frame.<init>(Frame.java:420)
at java.awt.Frame.<init>(Frame.java:385)
at javax.swing.JFrame.<init>(JFrame.java:180)
This happens with the latest Java 1.7.0_51, Apple's old Java 6 is not
affected by this problem!
I investigated a bit further and found that this is caused by the
screensaver. As soon as the screensaver starts, it's not possible to
open AWT windows any more. I wrote a little program (see below) and
executed it every five minutes. The first executions were fine but after
about ~15 minutes (the display sleep timeout) it throws the above
exceptions.
Here is the program:
public class Test {
public static void main(String[] args) {
new javax.swing.JFrame().setVisible(true);
System.exit(0);
}
}
Steps to reproduce: compile it, execute
for ((i=0;i<20;i++)); do date; java test; sleep 300; done
in a shell, leave the Mac alone, and check back after 30 minutes or so.
It may be related to https://bugs.openjdk.java.net/browse/JDK-8036927,
but in my case no display mirroring was involved.
It may not be a critical problem for end users but it makes automated
testing impossible (except if you turn of the screensaver completely).
Regards,
Thorsten
--
Dr.-Ing. Thorsten Meinl
KNIME.com AG
Technoparkstr. 1
8005 Zurich, Switzerland
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: OpenPGP digital signature
URL: <http://mail.openjdk.java.net/pipermail/awt-dev/attachments/20140318/842af2e1/signature.asc>
More information about the awt-dev
mailing list