0

I am writing my python codes in Python IDLE. It sometimes just shuts down(exits) on its' own when I press "(".

(when I was writing this question it would shut down every time I type few characters and press Shift+9 which is symbol '(')

This is a similar problem to this one 1 , 2 and 3. In 2, the error occurred when the program was running in the full-screen mode. I don't do that.

It seems to me that people don't really know what this happens.

Surprisingly this happens quite rare. Sometimes I can work for days without this problem.

Versions: OS: Mac High Sierra Python 2.7.14 IDLE: 2.7.14 Tk: 8.5.9

 Valentyns-MBP:~ femto-13$ idle
2018-06-10 21:15:19.736 Python[42861:5352268] *** Assertion failure in -[_NSCGSWindow setFrame:], /BuildRoot/Library/Caches/com.apple.xbs/Sources/AppKit/AppKit-1561.40.112/CGS.subproj/NSCGSWindow.m:1002
2018-06-10 21:15:19.748 Python[42861:5352268] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Invalid parameter not satisfying: CGRectContainsRect(CGRectMake((CGFloat)INT_MIN, (CGFloat)INT_MIN, (CGFloat)INT_MAX - (CGFloat)INT_MIN, (CGFloat)INT_MAX - (CGFloat)INT_MIN), frame)'
*** First throw call stack:
(
    0   CoreFoundation                      0x00007fff32f6e32b __exceptionPreprocess + 171
    1   libobjc.A.dylib                     0x00007fff5a5e8c76 objc_exception_throw + 48
    2   CoreFoundation                      0x00007fff32f740c2 +[NSException raise:format:arguments:] + 98
    3   Foundation                          0x00007fff35090340 -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 193
    4   AppKit                              0x00007fff3059cf50 -[_NSCGSWindow setFrame:] + 475
    5   AppKit                              0x00007fff30654b07 _NSCreateWindowWithOpaqueShape2 + 248
    6   AppKit                              0x00007fff30653763 -[NSWindow _commonAwake] + 1057
    7   AppKit                              0x00007fff310010e5 -[NSWindow(NSFullScreen) _resolveAutomaticEnterFullScreenFlags] + 51
    8   AppKit                              0x00007fff3065317a -[NSWindow makeKeyAndOrderFront:] + 31
    9   Tk                                  0x00007fff3f60ce84 XMapWindow + 165
    10  Tk                                  0x00007fff3f613cab TkWmRestackToplevel + 59
    11  Tk                                  0x00007fff3f582a19 Tk_RestackWindow + 118
    12  Tk                                  0x00007fff3f562aa4 TkFreeBindingTags + 815
    13  Tcl                                 0x00007fff3f49a660 Tcl_ListMathFuncs + 1847
    14  Tcl                                 0x00007fff3f49aef6 Tcl_EvalObjv + 57
    15  _tkinter.so                         0x0000000102302e8e Tkapp_Call + 190
    16  Python                              0x00000001000c9439 PyEval_EvalFrameEx + 41257
    17  Python                              0x00000001000cac23 PyEval_EvalCodeEx + 2115
    18  Python                              0x00000001000c8f1f PyEval_EvalFrameEx + 39951
    19  Python                              0x00000001000c8fe2 PyEval_EvalFrameEx + 40146
    20  Python                              0x00000001000c8fe2 PyEval_EvalFrameEx + 40146
    21  Python                              0x00000001000c8fe2 PyEval_EvalFrameEx + 40146
    22  Python                              0x00000001000cac23 PyEval_EvalCodeEx + 2115
    23  Python                              0x000000010003e7a0 function_call + 176
    24  Python                              0x000000010000c2e2 PyObject_Call + 98
    25  Python                              0x00000001000c4820 PyEval_EvalFrameEx + 21776
    26  Python                              0x00000001000cac23 PyEval_EvalCodeEx + 2115
    27  Python                              0x000000010003e7a0 function_call + 176
    28  Python                              0x000000010000c2e2 PyObject_Call + 98
    29  Python                              0x000000010001ec3d instancemethod_call + 365
    30  Python                              0x000000010000c2e2 PyObject_Call + 98
    31  Python                              0x00000001000be027 PyEval_CallObjectWithKeywords + 87
    32  _tkinter.so                         0x0000000102301844 PythonCmd + 292
    33  Tcl                                 0x00007fff3f4991ff TclInvokeStringCommand + 124
    34  Tcl                                 0x00007fff3f49a660 Tcl_ListMathFuncs + 1847
    35  Tcl                                 0x00007fff3f4d9354 Tcl_ExprObj + 14350
    36  Tcl                                 0x00007fff3f4d5e62 Tcl_ExprObj + 796
    37  Tcl                                 0x00007fff3f49c7ae Tcl_ExprBooleanObj + 25
    38  Tcl                                 0x00007fff3f4a4a82 TclDumpMemoryInfo + 19261
    39  Tcl                                 0x00007fff3f49a660 Tcl_ListMathFuncs + 1847
    40  Tcl                                 0x00007fff3f49b873 Tcl_EvalEx + 2046
    41  Tcl                                 0x00007fff3f49b08f Tcl_EvalEx + 26
    42  Tk                                  0x00007fff3f55ddda Tk_BindEvent + 3883
    43  Tk                                  0x00007fff3f562429 TkBindEventProc + 336
    44  Tk                                  0x00007fff3f56944e Tk_HandleEvent + 1060
    45  Tk                                  0x00007fff3f5699c8 Tk_QueueWindowEvent + 528
    46  Tcl                                 0x00007fff3f5057af Tcl_ServiceEvent + 137
    47  Tcl                                 0x00007fff3f505a61 Tcl_DoOneEvent + 317
    48  _tkinter.so                         0x00000001023012ff Tkapp_MainLoop + 415
    49  Python                              0x00000001000c9439 PyEval_EvalFrameEx + 41257
    50  Python                              0x00000001000cac23 PyEval_EvalCodeEx + 2115
    51  Python                              0x00000001000c8f1f PyEval_EvalFrameEx + 39951
    52  Python                              0x00000001000cac23 PyEval_EvalCodeEx + 2115
    53  Python                              0x00000001000c8f1f PyEval_EvalFrameEx + 39951
    54  Python                              0x00000001000cac23 PyEval_EvalCodeEx + 2115
    55  Python                              0x00000001000cad46 PyEval_EvalCode + 54
    56  Python                              0x00000001000efcbe PyRun_FileExFlags + 174
    57  Python                              0x00000001000eff5a PyRun_SimpleFileExFlags + 458
    58  Python                              0x00000001001071dd Py_Main + 3101
    59  Python                              0x0000000100000f14 Python + 3860
    60  ???                                 0x0000000000000002 0x0 + 2
)
libc++abi.dylib: terminating with uncaught exception of type NSException
Abort trap: 6
Valentyns-MBP:~ femto-13$ 
Valentyn
  • 659
  • 1
  • 7
  • 28
  • Smells like some sort of GUI issue. – Ignacio Vazquez-Abrams Jun 11 '18 at 01:30
  • Likely solved by https://www.python.org/download/mac/tcltk/ - normally, I would just suggest switching to a better OS but you probably don't want to hear that :-) – paxdiablo Jun 11 '18 at 02:53
  • What version of Python (and IDLE) are you using? What version of tcl/tk? You should be using 3.6.5 with tk 8.5.19 or so. 3.7.0 with tct/tk 8.6.8 installed is in beta now and out without a month. – Terry Jan Reedy Jun 11 '18 at 05:16
  • I have the same issue. It happens to me when I use IDLE 3.8. But it only happens when I use the IDLE on my external monitor. When using it on my laptop screen, the breakage does not occur. I am pretty sure this is GUI issue, though I don't have a good answer for this. – CEKim Jul 20 '20 at 21:57
  • Here is a walkaround. See https://stackoverflow.com/questions/36053119/why-does-pythons-idle-crash-when-i-type-a-parenthesis-on-mac – CEKim Jul 20 '20 at 22:19

0 Answers0