Regression test was added in JDK-8075244, see /test/java/awt/SplashScreen/MultiResolutionSplash/MultiResolutionSplashTest.java |
release-note: Area: client-libs/java.awt Synopsis: Mac 10.10: Application run with splash screen has focus issues Applications started through webstart or standalone applications , which use splashscreen, cannot get keyboard focus. Workaround: Launch javaws using the -Xnosplash option. |
Review request: http://mail.openjdk.java.net/pipermail/2d-dev/2015-March/005181.html |
As a fix I suggest to disable functionality which was added in JDK-8049198 and JDK-8043869. BEcause if I try to revert them back i should change more files Suggested fix: src/macosx/native/sun/awt/splashscreen/splashscreen_sys.m @@ -129,15 +129,11 @@ char* SplashGetScaledImageName(const char* jar, const char* file, float *scaleFactor) { NSAutoreleasePool *pool = [NSAutoreleasePool new]; *scaleFactor = 1; char* scaledFile = nil; - __block float screenScaleFactor = 1; - - [ThreadUtilities performOnMainThreadWaiting:YES block:^(){ - screenScaleFactor = [SplashNSScreen() backingScaleFactor]; - }]; + float screenScaleFactor = 1; if (screenScaleFactor > 1) { NSString *fileName = [NSString stringWithUTF8String: file]; NSUInteger length = [fileName length]; NSRange range = [fileName rangeOfString: @'.' jprt build: http://scaaa637.us.oracle.com/archive/2015/03/2015-03-12-001854.serb.jdk8-gate/bundles/ |
The problem occurs after we call NSScreen.backingScaleFactor on a Appkit Thread. NOte that it seems that it was working as expected when the fix was integrated, but now it can hang or have another artifacts. |
This is a regression of JDK-8049198. |
Also happens with 9 ea builds, which may be easier to debug on Yosemite |
I confirmed it happens when running 'java -jar SwingSet2.jar', reassigning to client-libs for further investigation |
Splash screen related changes in b15 and b16 are: JDK-8049198 and JDK-8043869 |
SwingSet2.jar does not get focus not only when run as jnlp. It also doesn't get focus when run as jar file (double click on jar).When I removed the following line from manifest:SplashScreen-Image: resources/images/splash.pngit works great!So, problem is in splash screen. Without splash screen SwingSet2 demo works when it runs as jar & as jnlp. |
Same problem with b17 and above. b13, b14 - OK. WebStart Application gets focus correctly but with same stacktrace. So, problem may be not illustrated by this stacktrace. Problem is introduced in b15 or b16. (Installer for b15 and b16 does not work) |
I see the following output in Java Console:Java Web Start 11.40.2.26Using JRE version 1.8.0_40-b26 Java HotSpot(TM) 64-Bit Server VMUser home directory = /Users/gtee----------------------------------------------------c: clear console windowf: finalize objects on finalization queueg: garbage collecth: display this help messagem: print memory usageo: trigger loggingp: reload proxy configurationq: hide consoler: reload policy configurations: dump system and deployment propertiest: dump thread listv: dump thread stack0-5: set trace level to <n>----------------------------------------------------Missing Permissions manifest attribute in main jar: http://download.java.net/javadesktop/swingset3/SwingSet3.jarsession restoration temporarily disabledMar 11, 2015 10:34:06 PM org.jdesktop.application.Task failedSEVERE: org.jdesktop.application.Application$DoWaitForEmptyEventQ@65f3ec6d failed: java.security.AccessControlException: access denied ('java.awt.AWTPermission' 'accessEventQueue')java.security.AccessControlException: access denied ('java.awt.AWTPermission' 'accessEventQueue') at java.security.AccessControlContext.checkPermission(AccessControlContext.java:457) at java.security.AccessController.checkPermission(AccessController.java:884) at java.lang.SecurityManager.checkPermission(SecurityManager.java:549) at com.sun.javaws.security.JavaWebStartSecurity.checkPermission(Unknown Source) at java.awt.Toolkit.getSystemEventQueue(Toolkit.java:1719) at org.jdesktop.application.Application.waitForEmptyEventQ(Application.java:383) at org.jdesktop.application.Application.access$200(Application.java:126) at org.jdesktop.application.Application$DoWaitForEmptyEventQ.doInBackground(Application.java:406) at org.jdesktop.application.Application$DoWaitForEmptyEventQ.doInBackground(Application.java:403) at org.jdesktop.swingworker.SwingWorker$1.call(Unknown Source) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at org.jdesktop.swingworker.SwingWorker.run(Unknown Source) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) |
Unable to switch focus in SwingSet2.1. Choose JTable demo. 2. Click on any control.3. Try to tab out.Escape in list box also does not work. |
On 11.03.2015 21:42, dmitriy.gubkin@oracle.com wrote:> Hi,> issue is reproducible.> Tried MacOS 10.10 + 8u40 b26.>> Tests:> 1. http://stt-13.ru.oracle.com:8080/JavawsMustangIntegTest/jdk1.8.0_40/demo/jfc/SwingSet2/SwingSet.jnlp ( need to choose JTable subdemo and try to edit Header/Footer field.> 2. https://docs.oracle.com/javase/tutorialJWS/samples/uiswing/InputVerificationDemoProject/InputVerificationDemo.jnlp - can't input data into input fields>> Notes:> 1. All input appears in text console where javaws is started.> 2. javaws -Xnosplash solves an issue.> 3. No issue for swingset started in browser on Mac as an applet ( http://stt-13.ru.oracle.com:8080/JavawsMustangIntegTest/jdk1.8.0_40/demo/jfc/SwingSet2/SwingSet.html )> 4. No issue on Windows>> Thanks, Dmitriy. |
SQE is able to reproduce the bug on 8u40 Mac 10.10. |
***********************************************************************************************************Checked this on Windows 7 (JDK 8u40) and the application loaded fine. Was able to run the example from the report with ability to edit the fields. Though received an exception in the Java console:Exception in thread 'AWT-EventQueue-2' java.lang.NullPointerException at customprogressindicator.CustomProgress$2.run(CustomProgress.java:90) at java.awt.event.InvocationEvent.dispatch(Unknown Source) at java.awt.EventQueue.dispatchEventImpl(Unknown Source) at java.awt.EventQueue.access$500(Unknown Source) at java.awt.EventQueue$3.run(Unknown Source) at java.awt.EventQueue$3.run(Unknown Source)************************************************************************************************************Plan: To test Mac OS X 10.10 (Yosemite). |