Skip to content

Instantly share code, notes, and snippets.

@lukhnos
Created September 4, 2009 09:34
Show Gist options
  • Save lukhnos/180813 to your computer and use it in GitHub Desktop.
Save lukhnos/180813 to your computer and use it in GitHub Desktop.
rdar://7198300
04-Sep-2009 05:29 PM Lukhnos D. Liu:
Summary:
Terminal.app in 10B503 often crashes when it wraps a line of overlong text, most often when an IME is in effect and the overlong text includes uncommitted buffer (composing buffer/reading text).
Steps to Reproduce:
1. Switch to Kotoeri (Hiragana) input method
2. Open Terminal.app under 10B503
3. Open irssi, a popular IRC client
4. Under the "command line", press the key "," to output repeatedly the text "<"
5. When "<" overflows the input buffer, Kotoeri commits the text.
6. When the line text on irssi is too long, Terminal.app starts to attempt to wrap the text, causing irssi to "scroll" the line so that only the rear part of the line text is visible (to visualize: a Terminal of 80x24, and you input 70 A's and 20 B's, when you finish the last B, you see 40 A's and 20 B's, leaving another 20 character space).
7. Usually you're not able to finish that, because Terminal.app crashes. Samples attached.
8. Under 10B503, when Terminal.app crashes, it always accompanies the HIToolbox exception mentioned in rdar://7198283
9. Switch to the built-in Zhuyin (Traditional Chinese Bopomoho/Phonetics) input method, repeat steps 1.-8., same
10. Switch to a 3rd party input method, Yahoo! KeyKey (http://tw.download.yahoo.com/keykey/ ; Leopard version), repeat steps 1.-8., same
Expected Results:
Text-wrapping should not cause crashing in Terminal.app
Actual Results:
Terminal.app crashes, at a high probability, when the boundary condition occurs.
Regression:
The bug is first reported in rdar://5450383, but then Apple told the reporter that it seemd to be a 3rd-party input method bug. The bug actually persisted throughout all Leopard versions and afflicted all built-in input methods albeit at a lower frequency. On 10A432 the bug persists, and built-in input method now has a higher probability of being able to reproduce the bug.
Interestingly, since 10B503, when Terminal.app crashes, the Console always dumps a huge number of HIToolbox exceptions. In fact, those exceptions seem to appear before the crash. The exception text is also attached.
Personally I have two suspicions: (1) Terminal.app might have some boundary condition not entirely sane, (2) Terminal.app cannot send -handlEvent: to the IMK-based IME client *and* handle client-initiated -insertText:replacementRange: or -setMarkedText:selectionRange:replacementRange: in waffled manner / at the same time (e.g. they can't be reentrant) whereas all other apps don't seem to suffer from such problem. But both (1) (2) are only my wild guesses.
Notes:
Provide additional information, such as references to related problems, workarounds and relevant attachments.
'Terminal_2009-09-04-164414-170204_telemakhos.crashlogs.zip' and 'Lukhnos-MacBookPro-SystemProfileXML.zip' were successfully uploaded
04-Sep-2009 05:31 PM Lukhnos D. Liu:
The console log msgs are also attached here. Please note this is a longer version than the one attached in rdar://7198283
'TerminalConsoleLog-LongVersion.txt' was successfully uploaded
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment