AlbinJS / IPTClock

A countdown clock for IPT written in python using tKinter
GNU General Public License v3.0
0 stars 4 forks source link

Crashes upon use of dead keys - Mac OS X 10.10.5 #1

Open joel-magnusson opened 7 years ago

joel-magnusson commented 7 years ago

Python instantly crashes, throwing NSRangeException, upon entering a dead key into one of the three text fields (Rep, Opp, Rev), when using Mac OS X 10.10.5. This issue seems to be fixed, but it also seems like Apple have yet to include the updated libraries in their shipped OS versions.

Options:

  1. Force people to manually rebuild Tk locally (not really an option)
  2. Create executables not requiring the correct local (default) libraries
  3. Catch the exception, somehow?
  4. Tell people to disable the use of dead keys on their Macs (seems to require a 3rd party program such as Ukulele)
  5. Simply tell people to not press any dead keys.

Links:

Example error:

2016-12-09 15:44:16.504 Python[21626:2038927] An uncaught exception was raised 2016-12-09 15:44:16.504 Python[21626:2038927] -[NSCFConstantString characterAtIndex:]: Range or index out of bounds 2016-12-09 15:44:16.504 Python[21626:2038927] ( 0 CoreFoundation 0x00007fff9047403c exceptionPreprocess + 172 1 libobjc.A.dylib 0x00007fff9670c76e objc_exception_throw + 43 2 CoreFoundation 0x00007fff90473eed +[NSException raise:format:] + 205 3 CoreFoundation 0x00007fff903470c6 -[__NSCFString characterAtIndex:] + 102 4 Tk 0x0000000101c215a8 TkpInitKeymapInfo + 751 5 Tk 0x0000000101c2760b Tk_MacOSXSetupTkNotifier + 880 6 Tcl 0x0000000101afc49c Tcl_DoOneEvent + 316 7 _tkinter.cpython-35m-darwin.so 0x00000001003ed9a1 _tkinter_tkapp_mainloop + 209 8 Python 0x0000000100065479 PyCFunction_Call + 233 9 Python 0x00000001000f1631 PyEval_EvalFrameEx + 36305 10 Python 0x00000001000f2510 _PyEval_EvalCodeWithName + 2368 11 Python 0x00000001000f038b PyEval_EvalFrameEx + 31531 12 Python 0x00000001000f2510 _PyEval_EvalCodeWithName + 2368 13 Python 0x00000001000f2671 PyEval_EvalCode + 81 14 Python 0x000000010012083e PyRun_FileExFlags + 206 15 Python 0x0000000100120adf PyRun_SimpleFileExFlags + 447 16 Python 0x0000000100139858 Py_Main + 3512 17 Python 0x0000000100000e32 Python + 3634 18 Python 0x0000000100000c84 Python + 3204 19 ??? 0x0000000000000002 0x0 + 2 ) 2016-12-09 15:44:16.505 Python[21626:2038927] Terminating app due to uncaught exception 'NSRangeException', reason: '-[__NSCFConstantString characterAtIndex:]: Range or index out of bounds' First throw call stack: ( 0 CoreFoundation 0x00007fff9047403c exceptionPreprocess + 172 1 libobjc.A.dylib 0x00007fff9670c76e objc_exception_throw + 43 2 CoreFoundation 0x00007fff90473eed +[NSException raise:format:] + 205 3 CoreFoundation 0x00007fff903470c6 -[NSCFString characterAtIndex:] + 102 4 Tk 0x0000000101c215a8 TkpInitKeymapInfo + 751 5 Tk 0x0000000101c2760b Tk_MacOSXSetupTkNotifier + 880 6 Tcl 0x0000000101afc49c Tcl_DoOneEvent + 316 7 _tkinter.cpython-35m-darwin.so 0x00000001003ed9a1 _tkinter_tkapp_mainloop + 209 8 Python 0x0000000100065479 PyCFunction_Call + 233 9 Python 0x00000001000f1631 PyEval_EvalFrameEx + 36305 10 Python 0x00000001000f2510 _PyEval_EvalCodeWithName + 2368 11 Python 0x00000001000f038b PyEval_EvalFrameEx + 31531 12 Python 0x00000001000f2510 _PyEval_EvalCodeWithName + 2368 13 Python 0x00000001000f2671 PyEval_EvalCode + 81 14 Python 0x000000010012083e PyRun_FileExFlags + 206 15 Python 0x0000000100120adf PyRun_SimpleFileExFlags + 447 16 Python 0x0000000100139858 Py_Main + 3512 17 Python 0x0000000100000e32 Python + 3634 18 Python 0x0000000100000c84 Python + 3204 19 ??? 0x0000000000000002 0x0 + 2 ) libc++abi.dylib: terminating with uncaught exception of type NSException Abort trap: 6

AlbinJS commented 7 years ago

I made an attempt to solve this in the last commit, please see if it worked. I'm not that hopefull though...