JDK-8214166 : java/awt/event/KeyEvent/SwallowKeyEvents: call TIS/TSM in main thread
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 10,11,12
  • Priority: P3
  • Status: Closed
  • Resolution: Duplicate
  • OS: os_x
  • CPU: x86
  • Submitted: 2018-11-01
  • Updated: 2020-03-30
  • Resolved: 2020-03-30
Related Reports
Duplicate :  
Description
ADDITIONAL SYSTEM INFORMATION :
$ uname -a
Darwin unit-929 18.0.0 Darwin Kernel Version 18.0.0: Wed Aug 22 20:13:40 PDT 2018; root:xnu-4903.201.2~1/RELEASE_X86_64 x86_64

$ java -version
java version "10.0.2" 2018-07-17
Java(TM) SE Runtime Environment 18.3 (build 10.0.2+13)
Java HotSpot(TM) 64-Bit Server VM 18.3 (build 10.0.2+13, mixed mode)

A DESCRIPTION OF THE PROBLEM :
The test java/awt/event/KeyEvent/SwallowKeyEvents/SwallowKeyEvents.java fails with the message "2018-11-01 15:07:11.914 java[7593:648181] pid(7593)/euid(502) is calling TIS/TSM in non-main thread environment, ERROR : This is NOT allowed. Please call TIS/TSM in main thread!!!"
The issue was observed on MacOSX 10.14

REGRESSION : Last worked in version 10.0.2

STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
$ jtreg -ignore:quiet -v -a -xml -testjdk:"/Library/Java/JavaVirtualMachines/jdk-10.0.2.jdk/Contents/Home" test/java/awt/event/KeyEvent/SwallowKeyEvents/SwallowKeyEvents.java

ACTUAL -
#section:main
----------messages:(5/242)----------
command: main SwallowKeyEvents
reason: User specified action: run main SwallowKeyEvents 
Mode: othervm
Additional options from @modules: --add-modules java.desktop --add-exports java.desktop/sun.awt=ALL-UNNAMED
elapsed time (seconds): 24.296
----------configuration:(4/97)----------
Boot Layer
  add modules: java.desktop         
  add exports: java.desktop/sun.awt ALL-UNNAMED

----------System.out:(1/21)----------
key_pressed count: 0
----------System.err:(14/964)----------
2018-11-01 15:07:11.914 java[7593:648181] pid(7593)/euid(502) is calling TIS/TSM in non-main thread environment, ERROR : This is NOT allowed. Please call TIS/TSM in main thread!!!
java.lang.RuntimeException: Test failed!
	at SwallowKeyEvents.main(SwallowKeyEvents.java:90)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:564)
	at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:115)
	at java.base/java.lang.Thread.run(Thread.java:844)

JavaTest Message: Test threw exception: java.lang.RuntimeException: Test failed!
JavaTest Message: shutting down test

STATUS:Failed.`main' threw exception: java.lang.RuntimeException: Test failed!

---------- BEGIN SOURCE ----------
http://hg.openjdk.java.net/jdk10/jdk10/jdk/file/777356696811/test/java/awt/event/KeyEvent/SwallowKeyEvents/SwallowKeyEvents.java
---------- END SOURCE ----------

FREQUENCY : always



Comments
not able to reproduce
15-11-2018