Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

If input string is in the popup, hitting enter after word outputs the input string #26

Closed
deepestblue opened this issue Jun 20, 2017 · 8 comments
Labels

Comments

@deepestblue
Copy link
Contributor

I'm on the latest release version (how do I find the version info from the installation?)

  • I switched to Lipika, Devanagari (output script doesn't seem to matter).
  • I turned on the setting to render the output-string in the client-window and the input-string in a popup.
  • I then typed in some Indic text (say, the keystrokes that would render the word "लिपिका"), and then hit Enter.

Expected: लिपिका appears in the client window.
Actual: "lipikA" (the input-string) appears in the client window.

@ratreya
Copy link
Owner

ratreya commented Jun 21, 2017

I was able to reproduce the bug. There is a simple fix for this, however, I am wondering if this mode is even valid or useful for people.

@deepestblue
Copy link
Contributor Author

The setting itself? Yeah, I don't know how many people find it useful. I was playing with Lipika, found the setting, kind of liked it and was using it till I ran into this weirdness. I've since switched it off, and am not much worse off :-)

@ratreya
Copy link
Owner

ratreya commented Jun 27, 2017

Fixed in the latest release: /~https://github.com/ratreya/lipika-ime/releases/tag/v1.7.4

@ratreya ratreya closed this as completed Jun 27, 2017
@ratreya ratreya added the bug label Jun 27, 2017
@deepestblue
Copy link
Contributor Author

Unfortunately, there seems to be a regression from this.

  • Install v1.7.4.
  • Choose Tamil and Ksharanam (also repros in Kannada but not Devanagari)
  • Turn on the setting to render the output-string in the client-window and the input-string in a popup.
  • Launch Chrome
  • Start typing in Tamil 'ca'
  • Observe that Chrome crashes

Call stack below. Should I open a separate issue?

Crashed Thread: 0 CrBrowserMain Dispatch queue: com.apple.main-thread

Exception Type: EXC_BAD_INSTRUCTION (SIGILL)
Exception Codes: 0x0000000000000001, 0x0000000000000000

Application Specific Information:
Crashing on exception: *** -[NSConcreteTextStorage attributesAtIndex:effectiveRange:]: Range or index out of bounds

Application Specific Backtrace 1:
0 CoreFoundation 0x00007fffcb1ed2cb __exceptionPreprocess + 171
1 Google Chrome Framework 0x000000010bfe818b ChromeMain + 23620747
2 libobjc.A.dylib 0x00007fffdfff848d objc_exception_throw + 48
3 CoreFoundation 0x00007fffcb26bc3d +[NSException raise:format:] + 205
4 UIFoundation 0x00007fffdde0ee0a -[NSConcreteTextStorage attributesAtIndex:effectiveRange:] + 127
5 UIFoundation 0x00007fffdde294a4 -[NSTypesetter baselineOffsetInLayoutManager:glyphIndex:] + 130
6 UIFoundation 0x00007fffddede9a8 -[NSATSTypesetter baselineOffsetInLayoutManager:glyphIndex:] + 259
7 AppKit 0x00007fffc96308c0 __55-[NSTextInputContext handleTSMEvent:completionHandler:]_block_invoke.656 + 205
8 AppKit 0x00007fffc96306c2 __55-[NSTextInputContext handleTSMEvent:completionHandler:]_block_invoke.627 + 655
9 AppKit 0x00007fffc9636c03 -[NSTextInputContext(NSInputContext_WithCompletion) attributedSubstringForProposedRange:completionHandler:] + 201
10 AppKit 0x00007fffc96303ca __55-[NSTextInputContext handleTSMEvent:completionHandler:]_block_invoke_3.616 + 101
11 AppKit 0x00007fffc962c531 -[NSTextInputContext tryHandleTSMEvent_attributedSubstringForProposedRange_withContext:dispatchCondition:dispatchWork:continuation:] + 92
12 AppKit 0x00007fffc963033f __55-[NSTextInputContext handleTSMEvent:completionHandler:]_block_invoke.612 + 406
13 AppKit 0x00007fffc9630092 __55-[NSTextInputContext handleTSMEvent:completionHandler:]_block_invoke_2.598 + 417
14 AppKit 0x00007fffc9636eea -[NSTextInputContext(NSInputContext_WithCompletion) firstRectForCharacterRange:completionHandler:] + 509
15 AppKit 0x00007fffc962fee8 __55-[NSTextInputContext handleTSMEvent:completionHandler:]_block_invoke.597 + 185
16 AppKit 0x00007fffc962c1c9 __178-[NSTextInputContext tryHandleTSMEvent_offsetToPos_markedOrSelRange_withContext:markedOrSelRangeDispatchCondition:markedRangeContinuation:selectedRangeContinuation:continuation:]_block_invoke + 77
17 AppKit 0x00007fffc962c16f -[NSTextInputContext tryHandleTSMEvent_offsetToPos_markedOrSelRange_withContext:markedOrSelRangeDispatchCondition:markedRangeContinuation:selectedRangeContinuation:continuation:] + 181
18 AppKit 0x00007fffc962fb0f __55-[NSTextInputContext handleTSMEvent:completionHandler:]_block_invoke.564 + 320
19 AppKit 0x00007fffc8df3ec2 -[NSTextInputContext handleTSMEvent:completionHandler:] + 1488
20 AppKit 0x00007fffc8df3883 _NSTSMEventHandler + 321
21 HIToolbox 0x00007fffca69cd85 _ZL23DispatchEventToHandlersP14EventTargetRecP14OpaqueEventRefP14HandlerCallRec + 1708
22 HIToolbox 0x00007fffca69bff6 _ZL30SendEventToEventTargetInternalP14OpaqueEventRefP20OpaqueEventTargetRefP14HandlerCallRec + 428
23 HIToolbox 0x00007fffca69be3f SendEventToEventTargetWithOptions + 43
24 HIToolbox 0x00007fffca6f36d6 SendTSMEvent_WithCompletionHandler + 408
25 HIToolbox 0x00007fffca8a761c __SendTextInputEvent_WithCompletionHandler_block_invoke + 584
26 HIToolbox 0x00007fffca8a592d SendTextInputEvent_WithCompletionHandler + 1154
27 HIToolbox 0x00007fffca9175b5 -[IMKInputSession _postEvent:completionHandler:] + 176
28 HIToolbox 0x00007fffca91747f -[IMKInputSession _createAndSendOffsetToPointEvent:completionHandler:] + 281
29 HIToolbox 0x00007fffca92c157 -[IMKInputSession attributesForCharacterIndex_andLineRect:completionHandler:] + 591
30 HIToolbox 0x00007fffca92cde3 -[IMKInputSession attributesForCharacterIndex:completionHandler:] + 80
31 HIToolbox 0x00007fffca9192f5 __60-[IMKInputSession imkxpc_attributesForCharacterIndex:reply:]_block_invoke + 505
...

@ratreya
Copy link
Owner

ratreya commented Jun 28, 2017

I was able to repro. I am at a loss here because the changes I made should not introduce any new code paths where this stack is exposed. Do you know if this was working in the previous version under the same configuration?

@ratreya ratreya reopened this Jun 28, 2017
@deepestblue
Copy link
Contributor Author

Yeah, I was wondering that too. But it only repros if that setting is on. And no, from my memory it doesn't repro in the previous version: I'll try it out tonight for sure.

@deepestblue
Copy link
Contributor Author

Huh. I installed 1.4.2 and was able to repro the bug as well, so clearly I was wrong and this is a pre-existing issue. Let me know if I should open a new issue. Regardless, perhaps you're right in that this preference-setting is too much work to make it work.

@ratreya
Copy link
Owner

ratreya commented Jul 6, 2018

Fixed in v2. Will be releasing soon.

@ratreya ratreya closed this as completed Jul 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants