This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: IDLE freezes after encountering a syntax error
Type: crash Stage: resolved
Components: IDLE Versions: Python 3.1
process
Status: closed Resolution: duplicate
Dependencies: Superseder: OS X IDLE 3 with Tk 8.4 appears to hang with syntax error
View: 11053
Assigned To: ned.deily Nosy List: brian89, ned.deily, ronaldoussoren
Priority: normal Keywords:

Created on 2009-08-02 23:15 by brian89, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (6)
msg91210 - (view) Author: brian (brian89) Date: 2009-08-02 23:15
Running Python 3.1/ IDLE, which was installed on top of a Python 2.5.4
install, Mac OSX 10.4

This seems like such an obvious bug, but I can't find it in the current
list of issues - so I suspect that it may not be reproducible on other
computers, but it's certainly reproducible on my laptop.

If I run a module with (any?) syntax error (for example,

for i in range(10) #missing semicolon
    print i

the interpreter will catch it and send you to fix it. Then, any
subsequent attempts to run that same module will freeze IDLE. The
problem doesn't occur if you run a different module.
msg91259 - (view) Author: Ned Deily (ned.deily) * (Python committer) Date: 2009-08-04 17:24
I can't reproduce a hang with the python.org 3.1 IDLE on either 10.4 or 
10.5 and with the system Tcl/Tk or with a newer Active Tcl/Tk 8.4 
installed.  Do you have another version of Tcl/Tk installed in 
/Library/Frameworks?  Can you give a step-by-step procedure for 
reproducing the problem you see?
msg91276 - (view) Author: brian (brian89) Date: 2009-08-04 21:56
I have Tcl/tk 8.4.7 installed.

To reproduce the hang on my machine:
open IDLE
new window
enter the following code:
  for i in range(10)
      print(i)
run module (saved as test.py)
interpreter complains (shell is still responsive at this point)
fix the code by adding the colon after the for loop
run module again (at this point, IDLE hangs)
While the top menu bar is responsive, all options are greyed out, and
apple-Q doesn't work. Force-quit is necessary to shut IDLE down. Also,
the force-quit menu doesn't show IDLE as being unresponsive, whereas
usually there will be a red alert for an unresponsive program.

Hope this helps
msg91281 - (view) Author: Ned Deily (ned.deily) * (Python committer) Date: 2009-08-04 22:59
Thanks, I'm now able to reproduce on both 10.4 and 10.5 with the Apple-
supplied Tcl/Tk 8.4.7 but apparently not with a newer Tcl/Tk nor with 
2.6.2.  Investigating further.
msg122551 - (view) Author: Ned Deily (ned.deily) * (Python committer) Date: 2010-11-27 20:34
This issue was reported again in Issue9763; at the time, I overlooked your original report.  As there is a more recent discussion of it over there, I am going to close this as a duplicate and add you to the nosy list there.
msg127500 - (view) Author: Ned Deily (ned.deily) * (Python committer) Date: 2011-01-29 23:47
For the record: The problem was caused by a minor change in IDLE during the port of IDLE from 2.x to 3.x.  It is fixed by the changes for Issue11053: r88234 (3.2rc2) and r88242 (planned for 3.1.4).
History
Date User Action Args
2022-04-11 14:56:51adminsetgithub: 50877
2011-01-29 23:47:34ned.deilysetnosy: ronaldoussoren, ned.deily, brian89
messages: + msg127500

assignee: ronaldoussoren -> ned.deily
superseder: Crashes upon run after syntax error encountered in OSX 10.5.8 -> OS X IDLE 3 with Tk 8.4 appears to hang with syntax error
stage: resolved
2010-11-27 20:34:45ned.deilysetstatus: open -> closed
resolution: duplicate
superseder: Crashes upon run after syntax error encountered in OSX 10.5.8
messages: + msg122551
2009-08-04 22:59:23ned.deilysetmessages: + msg91281
2009-08-04 21:56:58brian89setnosy: ronaldoussoren, ned.deily, brian89
messages: + msg91276
components: - macOS
2009-08-04 17:24:26ned.deilysetnosy: + ronaldoussoren, ned.deily
messages: + msg91259

assignee: ronaldoussoren
components: + macOS
2009-08-02 23:15:45brian89create