classification
Title: International keyboard makes IDLE crash on OSX
Type: crash Stage: resolved
Components: IDLE, macOS Versions: Python 3.5
process
Status: closed Resolution: third party
Dependencies: Superseder:
Assigned To: Nosy List: mc128k, ned.deily, ronaldoussoren, serhiy.storchaka
Priority: normal Keywords:

Created on 2014-10-06 11:50 by mc128k, last changed 2014-10-06 19:28 by mc128k. This issue is now closed.

Messages (5)
msg228663 - (view) Author: Mc128k (mc128k) Date: 2014-10-06 11:50
When using OSX 10.9 or 10.10 with the latest version of python, if I type ' or " with the international keyboard enabled (dead keys), the program crashes immediately. This can be reproduced in any occasion.
msg228672 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2014-10-06 12:27
Run following command in a terminal:

    python -c 'import tkinter; tkinter.Text().pack(); tkinter.mainloop()'

and type your dead keys in created window. What happened?
msg228714 - (view) Author: Mc128k (mc128k) Date: 2014-10-06 16:03
2014-10-06 18:01:38.139 Python[13297:1294014] An uncaught exception was raised
2014-10-06 18:01:38.139 Python[13297:1294014] -[__NSCFConstantString characterAtIndex:]: Range or index out of bounds
2014-10-06 18:01:38.139 Python[13297:1294014] (
	0   CoreFoundation                      0x00007fff89f3e64c __exceptionPreprocess + 172
	1   libobjc.A.dylib                     0x00007fff8c8e56de objc_exception_throw + 43
	2   CoreFoundation                      0x00007fff89f3e4fd +[NSException raise:format:] + 205
	3   CoreFoundation                      0x00007fff89e12c46 -[__NSCFString characterAtIndex:] + 102
	4   Tk                                  0x000000010243d5a8 TkpInitKeymapInfo + 751
	5   Tk                                  0x000000010244360b Tk_MacOSXSetupTkNotifier + 880
	6   Tcl                                 0x000000010231849c Tcl_DoOneEvent + 316
	7   _tkinter.so                         0x0000000102290831 Tkapp_MainLoop + 177
	8   Python                              0x00000001000e542b PyEval_EvalFrameEx + 31291
	9   Python                              0x00000001000e665d PyEval_EvalCodeEx + 2349
	10  Python                              0x00000001000e51f7 PyEval_EvalFrameEx + 30727
	11  Python                              0x00000001000e665d PyEval_EvalCodeEx + 2349
	12  Python                              0x00000001000e671f PyEval_EvalCode + 63
	13  Python                              0x00000001001111e7 PyRun_StringFlags + 183
	14  Python                              0x0000000100111271 PyRun_SimpleStringFlags + 65
	15  Python                              0x0000000100127e55 Py_Main + 1445
	16  Python                              0x0000000100000e32 Python + 3634
	17  Python                              0x0000000100000c84 Python + 3204
)
2014-10-06 18:01:38.140 Python[13297:1294014] *** Terminating app due to uncaught exception 'NSRangeException', reason: '-[__NSCFConstantString characterAtIndex:]: Range or index out of bounds'
*** First throw call stack:
(
	0   CoreFoundation                      0x00007fff89f3e64c __exceptionPreprocess + 172
	1   libobjc.A.dylib                     0x00007fff8c8e56de objc_exception_throw + 43
	2   CoreFoundation                      0x00007fff89f3e4fd +[NSException raise:format:] + 205
	3   CoreFoundation                      0x00007fff89e12c46 -[__NSCFString characterAtIndex:] + 102
	4   Tk                                  0x000000010243d5a8 TkpInitKeymapInfo + 751
	5   Tk                                  0x000000010244360b Tk_MacOSXSetupTkNotifier + 880
	6   Tcl                                 0x000000010231849c Tcl_DoOneEvent + 316
	7   _tkinter.so                         0x0000000102290831 Tkapp_MainLoop + 177
	8   Python                              0x00000001000e542b PyEval_EvalFrameEx + 31291
	9   Python                              0x00000001000e665d PyEval_EvalCodeEx + 2349
	10  Python                              0x00000001000e51f7 PyEval_EvalFrameEx + 30727
	11  Python                              0x00000001000e665d PyEval_EvalCodeEx + 2349
	12  Python                              0x00000001000e671f PyEval_EvalCode + 63
	13  Python                              0x00000001001111e7 PyRun_StringFlags + 183
	14  Python                              0x0000000100111271 PyRun_SimpleStringFlags + 65
	15  Python                              0x0000000100127e55 Py_Main + 1445
	16  Python                              0x0000000100000e32 Python + 3634
	17  Python                              0x0000000100000c84 Python + 3204
)
libc++abi.dylib: terminating with uncaught exception of type NSException
Abort trap: 6
msg228725 - (view) Author: Ned Deily (ned.deily) * (Python committer) Date: 2014-10-06 18:23
This crash behavior is due to an old bug in the OS X Cocoa implementation of Tk.  It has been fixed in the most recent releases of Tk 8.5.x and 8.6.x but, unfortunately, Apple has not yet shipped the fix in any version of the OS X system Tk 8.5 (since OS X 10.6).  If you are building your own Python 3.5, you can install the most recent copy of ActiveTcl 8.5.x or 8.6.x (assuming the license terms are acceptable) or you could build your own Tcl/Tk and then rebuild _tkinter.so.  For more information: https://www.python.org/download/mac/tcltk and
http://sourceforge.net/p/tktoolkit/bugs/2722/
msg228728 - (view) Author: Mc128k (mc128k) Date: 2014-10-06 19:28
Hi
Thank you a lot for the help, installing ActiveTcl8.5.15.1.297588-macosx10.5-i386-x86_64-threaded solved the problem immediately.
History
Date User Action Args
2015-08-14 13:29:01ned.deilylinkissue24865 superseder
2014-10-06 19:28:55mc128ksetmessages: + msg228728
2014-10-06 18:23:44ned.deilysetstatus: open -> closed

assignee: ronaldoussoren ->

nosy: + ned.deily
messages: + msg228725
resolution: third party
stage: resolved
2014-10-06 16:03:37mc128ksetmessages: + msg228714
2014-10-06 12:27:04serhiy.storchakasetnosy: + serhiy.storchaka, ronaldoussoren
messages: + msg228672

assignee: ronaldoussoren
components: + IDLE, macOS
2014-10-06 11:50:43mc128kcreate