Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8249874

Invoking java.awt.Robot#keyPress crashes the JVM | OpenJDK14.0.1+14

XMLWordPrintable

    • x86_64
    • os_x

      ADDITIONAL SYSTEM INFORMATION :
      --------------- S Y S T E M ---------------

      OS:uname:Darwin 19.5.0 Darwin Kernel Version 19.5.0: Tue May 26 20:41:44 PDT 2020; root:xnu-6153.121.2~2/RELEASE_X86_64 x86_64
      OS uptime: 1 days 23:04 hours
      rlimit: STACK 8192k, CORE 0k, NPROC 11136, NOFILE 10240, AS infinity, DATA infinity, FSIZE infinity
      load average:3.80 2.42 2.07

      CPU:total 8 (initial active 8) (4 cores per cpu, 2 threads per core) family 6 model 158 stepping 9, cmov, cx8, fxsr, mmx, sse, sse2, sse3, ssse3, sse4.1, sse4.2, popcnt, avx, avx2, aes, clmul, erms, rtm, 3dnowpref, lzcnt, ht, tsc, tscinvbit, bmi1, bmi2, adx, fma

      Memory: 4k page, physical 67108864k(2050216k free), swap 0k(0k free)

      vm_info: OpenJDK 64-Bit Server VM (14.0.1+14) for bsd-amd64 JRE (14.0.1+14), built on Jun 30 2020 17:14:54 by "brew" with clang 4.2.1 Compatible Apple LLVM 11.0.3 (clang-1103.0.32.62)

      END.


      A DESCRIPTION OF THE PROBLEM :
      When invoking java.awt.Robot#keyPress on Mac OS Catalina the JVM crashes.

      ERROR MESSAGES/STACK TRACES THAT OCCUR :
      Host: iMac18,3 x86_64 4200 MHz, 8 cores, 64G, Darwin 19.5.0
      Time: Wed Jul 15 21:12:03 2020 PDT elapsed time: 7 seconds (0d 0h 0m 7s)

      --------------- T H R E A D ---------------

      Current thread (0x00007fd51b828000): JavaThread "Test worker" [_thread_in_native, id=25347, stack(0x000070000ce97000,0x000070000cf97000)]

      Stack: [0x000070000ce97000,0x000070000cf97000], sp=0x000070000cf92400, free space=1005k
      Native frames: (J=compiled Java code, A=aot compiled Java code, j=interpreted, Vv=VM code, C=native code)
      C [libdispatch.dylib+0x38f1] _dispatch_assert_queue_fail+0x63
      C [libdispatch.dylib+0x3886] dispatch_assert_queue+0x7a
      C [HIToolbox+0x31dd2] islGetInputSourceListWithAdditions+0x77
      C [HIToolbox+0x345c8] isValidateInputSourceRef+0x5a
      C [HIToolbox+0x34490] TSMGetInputSourceProperty+0x1e
      C [SkyLight+0x238c28] invocation function for block in key_translate_initialize()+0xb2
      C [libdispatch.dylib+0x2658] _dispatch_client_callout+0x8
      C [libdispatch.dylib+0x37de] _dispatch_once_callout+0x14
      C [SkyLight+0x238b74] CGSKeyEventTranslate+0x40
      C [SkyLight+0xd52f0] SLEventCreateKeyboardEvent+0x110
      C [libawt_lwawt.dylib+0x2ad80] Java_sun_lwawt_macosx_CRobot_keyEvent+0x48
      j sun.lwawt.macosx.CRobot.keyEvent(IZ)V+0 java.desktop@14.0.1
      j sun.lwawt.macosx.CRobot.keyPress(I)V+3 java.desktop@14.0.1
      j java.awt.Robot.keyPress(I)V+10 java.desktop@14.0.1

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      In jshell:
      import java.awt.Robot;
      var awtRobot = new Robot();
      awtRobot.keyPress(java.awt.event.KeyEvent.VK_1);

      ACTUAL -
      Crashes the jvm

      CUSTOMER SUBMITTED WORKAROUND :
      The adoptOpenJDK build works as expected. The oracle openjdk build crashes

      FREQUENCY : always


            serb Sergey Bylokhov
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: