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

[macosx] Input methods crash on Sierra

    Details

      Description

      FULL PRODUCT VERSION :
      8u111, tried older versions of 8 too

      ADDITIONAL OS VERSION INFORMATION :
      OS X Sierra

      A DESCRIPTION OF THE PROBLEM :
      If you have an input method enabled on the OS e.g. Japanese - Hiragana, as soon as you press a key Java shows a crash report

      Tried capturing the input method event but the crash seems to occur before that

      Note: doesn't happen when you have a text field in focus. If you just have an app open and hit a key the crash occurs



      REGRESSION. Last worked in version 6u45

      ADDITIONAL REGRESSION INFORMATION:
      Doesn't work in 9 either

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      1. Open any java app
      2. Switch to an input method e.g. Japanese-hiragana
      3. Click on the JFrame to get focus
      4. Press a key

      any app will do but just tried this for example
      http://java-sl.com/download/shapedemo.jar

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      No crash

      ERROR MESSAGES/STACK TRACES THAT OCCUR :
      Exception Name: JavaNativeException
      Description: java.lang.NullPointerException

      User Info: (null)

      0 CoreFoundation 0x00007fffb03cb52b __exceptionPreprocess + 171
      1 libobjc.A.dylib 0x00007fffc4aa3cad objc_exception_throw + 48
      2 CoreFoundation 0x00007fffb03cb479 -[NSException raise] + 9
      3 JavaNativeFoundation 0x000000010c5166d8 JNFCallObjectMethod + 230
      4 libawt_lwawt.dylib 0x000000010eb72c79 -[AWTView attributedSubstringForProposedRange:actualRange:] + 78
      5 AppKit 0x00007fffae912604 -[NSTextInputContext(NSInputContext_WithCompletion) attributedSubstringForProposedRange:completionHandler:] + 105
      6 AppKit 0x00007fffae90e6ec __55-[NSTextInputContext handleTSMEvent:completionHandler:]_block_invoke.625 + 91
      7 AppKit 0x00007fffae908e9a -[NSTextInputContext tryHandleTSMEvent_attributedSubstringForProposedRange_withContext:dispatchCondition:dispatchWork:continuation:] + 92
      8 AppKit 0x00007fffae90e616 __55-[NSTextInputContext handleTSMEvent:completionHandler:]_block_invoke.620 + 450
      9 AppKit 0x00007fffae16f760 -[NSTextInputContext handleTSMEvent:completionHandler:] + 2549
      10 AppKit 0x00007fffae16ecfd _NSTSMEventHandler + 319
      11 HIToolbox 0x00007fffaf8bb0d5 _ZL23DispatchEventToHandlersP14EventTargetRecP14OpaqueEventRefP14HandlerCallRec + 1708
      12 HIToolbox 0x00007fffaf8ba346 _ZL30SendEventToEventTargetInternalP14OpaqueEventRefP20OpaqueEventTargetRefP14HandlerCallRec + 428
      13 HIToolbox 0x00007fffaf8ba18f SendEventToEventTargetWithOptions + 43
      14 HIToolbox 0x00007fffaf910f86 SendTSMEvent_WithCompletionHandler + 408
      15 HIToolbox 0x00007fffafac4378 __SendTextInputEvent_WithCompletionHandler_block_invoke + 584
      16 HIToolbox 0x00007fffafac2689 SendTextInputEvent_WithCompletionHandler + 1154
      17 HIToolbox 0x00007fffafb33829 -[IMKInputSession _postEvent:completionHandler:] + 176
      18 HIToolbox 0x00007fffafb43485 -[IMKInputSession _copyUniCharsForRange:intoBuffer:ofLength:completionHandler:] + 530
      19 HIToolbox 0x00007fffafb43c0e -[IMKInputSession _coreAttributesFromRange:whichAttributes:completionHandler:] + 281
      20 HIToolbox 0x00007fffafb498b0 -[IMKInputSession stringFromRange:completionHandler:] + 175
      21 HIToolbox 0x00007fffafb3f27a __48-[IMKInputSession imkxpc_stringFromRange:reply:]_block_invoke + 505
      22 CoreFoundation 0x00007fffb03613ac __CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK__ + 12
      23 CoreFoundation 0x00007fffb0342424 __CFRunLoopDoBlocks + 356
      24 CoreFoundation 0x00007fffb0341f66 __CFRunLoopRun + 1878
      25 CoreFoundation 0x00007fffb03415b4 CFRunLoopRunSpecific + 420
      26 HIToolbox 0x00007fffafb1d63e -[IMKInputSessionXPCInvocation invocationAwaitXPCReply] + 606
      27 HIToolbox 0x00007fffafb24b6a __49-[IMKInputSession handleEvent:completionHandler:]_block_invoke_2.479 + 1720
      28 HIToolbox 0x00007fffafb23f88 __49-[IMKInputSession handleEvent:completionHandler:]_block_invoke_2.438 + 566
      29 HIToolbox 0x00007fffafb08314 -[IMKClient switchedInputMode:completionHandler:] + 405
      30 HIToolbox 0x00007fffafb22e32 -[IMKInputSession tryHandleEventSwitchedInputMode:eventWasHandled:continuationHandler:] + 122
      31 HIToolbox 0x00007fffafb23d2c __49-[IMKInputSession handleEvent:completionHandler:]_block_invoke.437 + 170
      32 HIToolbox 0x00007fffafb23b6b __49-[IMKInputSession handleEvent:completionHandler:]_block_invoke + 261
      33 HIToolbox 0x00007fffafb2fd3f -[IMKInputSession _eventIsOn:completionHandler:] + 1838
      34 HIToolbox 0x00007fffafb233e1 -[IMKInputSession handleEvent:completionHandler:] + 890
      35 HIToolbox 0x00007fffafad3f10 IMKInputSessionProcessEventRefWithCompletionHandler + 120
      36 HIToolbox 0x00007fffafad32c2 InputMethodInstanceProcessEventRef_WithCompletionHandler + 129
      37 HIToolbox 0x00007fffafac1a1a __TSMEventToInputMethod_WithCompletionHandler_block_invoke + 124
      38 HIToolbox 0x00007fffafac58a0 __SendTSMDocumentLockEvent_WithCompletionHandler_block_invoke + 95
      39 HIToolbox 0x00007fffaf913f92 ___ZL23DispatchEventToHandlersP14EventTargetRecP14OpaqueEventRefP14HandlerCallRec_block_invoke + 108
      40 AppKit 0x00007fffae16fa4d -[NSTextInputContext handleTSMEvent:completionHandler:] + 3298
      41 AppKit 0x00007fffae16ecfd _NSTSMEventHandler + 319
      42 HIToolbox 0x00007fffaf8bb0d5 _ZL23DispatchEventToHandlersP14EventTargetRecP14OpaqueEventRefP14HandlerCallRec + 1708
      43 HIToolbox 0x00007fffaf8ba346 _ZL30SendEventToEventTargetInternalP14OpaqueEventRefP20OpaqueEventTargetRefP14HandlerCallRec + 428
      44 HIToolbox 0x00007fffaf8ba18f SendEventToEventTargetWithOptions + 43
      45 HIToolbox 0x00007fffaf910f86 SendTSMEvent_WithCompletionHandler + 408
      46 HIToolbox 0x00007fffafac1951 TrySendLockEvent_BeforeEventToInputMethod_WithContinuationHandler + 351
      47 HIToolbox 0x00007fffafac178e TSMEventToInputMethod_WithCompletionHandler + 148
      48 HIToolbox 0x00007fffafac16da TSMEventToKeyboardInputMethod_WithCompletionHandler + 127
      49 HIToolbox 0x00007fffaf910474 TSMKeyEvent_WithCompletionHandler + 584
      50 HIToolbox 0x00007fffaf9101f3 __TSMProcessRawKeyEventWithOptionsAndCompletionHandler_block_invoke_4 + 251
      51 HIToolbox 0x00007fffaf910020 __TSMProcessRawKeyEventWithOptionsAndCompletionHandler_block_invoke_3 + 281
      52 HIToolbox 0x00007fffaf90fd36 __TSMProcessRawKeyEventWithOptionsAndCompletionHandler_block_invoke_2 + 308
      53 HIToolbox 0x00007fffaf90fa6d __TSMProcessRawKeyEventWithOptionsAndCompletionHandler_block_invoke + 300
      54 HIToolbox 0x00007fffaf90efdd TSMProcessRawKeyEventWithOptionsAndCompletionHandler + 3604
      55 AppKit 0x00007fffae90ff16 __61-[NSTextInputContext _handleEvent:options:completionHandler:]_block_invoke.885 + 116
      56 AppKit 0x00007fffae90f9c5 __204-[NSTextInputContext tryTSMProcessRawKeyEvent_orSubstitution:dispatchCondition:setupForDispatch:furtherCondition:doubleSpaceSubstitutionCondition:doubleSpaceSubstitutionWork:dispatchTSMWork:continuation:]_block_invoke.817 + 121
      57 AppKit 0x00007fffae90f82f -[NSTextInputContext tryTSMProcessRawKeyEvent_orSubstitution:dispatchCondition:setupForDispatch:furtherCondition:doubleSpaceSubstitutionCondition:doubleSpaceSubstitutionWork:dispatchTSMWork:continuation:] + 285
      58 AppKit 0x00007fffae16d5fb -[NSTextInputContext _handleEvent:options:completionHandler:] + 1298
      59 AppKit 0x00007fffae16d0ae -[NSTextInputContext handleEvent:] + 109
      60 AppKit 0x00007fffae16cfb2 -[NSView interpretKeyEvents:] + 232
      61 libawt_lwawt.dylib 0x000000010eb71aad -[AWTView keyDown:] + 85
      62 AppKit 0x00007fffae8487ec -[NSWindow(NSEventRouting) _reallySendEvent:isDelayedEvent:] + 4086
      63 AppKit 0x00007fffae84742a -[NSWindow(NSEventRouting) sendEvent:] + 541
      64 libawt_lwawt.dylib 0x000000010eb7597f -[AWTWindow_Normal sendEvent:] + 86
      65 AppKit 0x00007fffae6e8a1c -[NSApplication(NSEvent) sendEvent:] + 4768
      66 libosxapp.dylib 0x000000010e0f232c -[NSApplicationAWT sendEvent:] + 378
      67 AppKit 0x00007fffadfce009 -[NSApplication run] + 1002
      68 libosxapp.dylib 0x000000010e0f214d +[NSApplicationAWT runAWTLoopWithApp:] + 156
      69 libawt_lwawt.dylib 0x000000010ebb155b -[AWTStarter starter:] + 905
      70 Foundation 0x00007fffb1d8df2a __NSThreadPerformPerform + 326
      71 CoreFoundation 0x00007fffb0361551 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
      72 CoreFoundation 0x00007fffb03426bd __CFRunLoopDoSources0 + 557
      73 CoreFoundation 0x00007fffb0341bb6 __CFRunLoopRun + 934
      74 CoreFoundation 0x00007fffb03415b4 CFRunLoopRunSpecific + 420
      75 libjli.dylib 0x00000001083e88fb CreateExecutionEnvironment + 871
      76 libjli.dylib 0x00000001083e4644 JLI_Launch + 1952
      77 JavaAppLauncher 0x000000010836a960 launch + 6704
      78 JavaAppLauncher 0x0000000108368d16 main + 102
      79 JavaAppLauncher 0x0000000108368ca4 start + 52

      REPRODUCIBILITY :
      This bug can be reproduced always.

      ---------- BEGIN SOURCE ----------
      Any app seems to cause it, e.g. http://java-sl.com/download/shapedemo.jar
      ---------- END SOURCE ----------

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                aniyogi Avik Niyogi (Inactive)
                Reporter:
                webbuggrp Webbug Group
              • Votes:
                0 Vote for this issue
                Watchers:
                10 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: