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.

Title: IDLE Freezes After Running Scripts
Type: behavior Stage: test needed
Components: IDLE Versions: Python 3.1, Python 3.2, Python 2.7
Status: closed Resolution: out of date
Dependencies: Superseder:
Assigned To: Nosy List: ajaksu2, deejross, gpolo, kbk, taleinat, terry.reedy
Priority: normal Keywords:

Created on 2007-08-20 02:56 by deejross, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (7)
msg32665 - (view) Author: Ross Peoples (deejross) Date: 2007-08-20 02:56
IDLE freezes after running a script in a new window. I'm writing a wxPython script, which runs well until the window is closed, then IDLE freezes (shell and all open windows) and I have to kill the process. It is a tutorial script, so nothing too fancy:

import wx

class MyFrame(wx.Frame):
    def __init__(self, parent, id, title):
        wx.Frame.__init__(self, parent, id, title)

        menubar = wx.MenuBar()
        file = wx.Menu()
        edit = wx.Menu()
        help = wx.Menu()

        file.Append(101, "&New")
        file.Append(102, "&Open", "Open a new document")

        fileRecent = wx.Menu()
        fileRecent.Append(10301, "First Item")
        fileRecent.Append(10302, "Second Item")
        file.AppendMenu(103, "Open &Recent", fileRecent)
        file.Append(104, "&Save", "Save the document")
        file.Append(105, "E&xit", "Close this window")

        edit.Append(201, "Check 1", "Check 1 Tooltip", wx.ITEM_CHECK)
        edit.Append(202, "Check 2", "Check 2 Tooltip", wx.ITEM_CHECK)

        menubar.Append(file, "&File")
        menubar.Append(edit, "&Edit")
        menubar.Append(help, "&Help")

class MyApp(wx.App):
    def OnInit(self):
        frame = MyFrame(None, -1, "My Frame")
        return True

app = MyApp(0)

It should be noted that usually it freezes after running the script once, but sometimes I can run it a second time before it freezes IDLE. It doesn't seem to freeze using only core Python, only when using wxWidgets.

Here are some versions:
Ubuntu Gusty
Python version 2.5.1
IDLE version 1.2.1
msg58521 - (view) Author: Kurt B. Kaiser (kbk) * (Python committer) Date: 2007-12-13 04:00
What happens when you run this using idle -n  (i.e. without the 
msg86611 - (view) Author: Daniel Diniz (ajaksu2) * (Python triager) Date: 2009-04-26 22:10
Ross: can you confirm this with 2.6/3.x?
msg86661 - (view) Author: Ross Peoples (deejross) Date: 2009-04-27 12:56
I just did a fresh install of Ubuntu Jaunty in a virtual machine, copied
and pasted the code. It ran the first time without a problem. But the
second time I ran it, the application would not exit and IDLE is frozen.
So I still have to force quit. This is with Python 2.6.
msg112639 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2010-08-03 17:56
Intermittent bugs involving 3rd-party packages are hard to even confirm, let alone fix. 2.6.6rc will be out today, so no fix for that. IDLE on 3.1.2 is more stable than it was on 3.0, so I will not assume that the problem still exists on the even newer 2.7. And AFAIK, there is no wxpython for 3.1.

So unless this is verified to still be a problem with 2.7 and the latest wxpython, it should be closed as out-of-date.
msg112697 - (view) Author: Ross Peoples (deejross) Date: 2010-08-03 21:49
It is very simple to reproduce the problem: Ubuntu + wxPython + IDLE = crash. If you don't use Ubuntu, you could boot it from a Live CD and reproduce the problem (if it still exists) in about 10 minutes. I don't develop in Python anymore otherwise I would test it myself.
msg132615 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2011-03-30 21:00
Closing until there is a confirmed problem with current Python.
Date User Action Args
2022-04-11 14:56:26adminsetgithub: 45328
2011-03-30 21:00:19terry.reedysetstatus: open -> closed
resolution: out of date
messages: + msg132615
2010-09-18 12:57:38BreamoreBoysetversions: + Python 2.7, Python 3.2, - Python 2.6
2010-08-03 21:49:12deejrosssetstatus: pending -> open

messages: + msg112697
2010-08-03 17:56:41terry.reedysetstatus: open -> pending
nosy: + terry.reedy
messages: + msg112639

2009-04-27 12:56:17deejrosssetmessages: + msg86661
2009-04-26 22:10:59ajaksu2setversions: + Python 2.6, Python 3.1, - Python 2.5
nosy: + ajaksu2, gpolo

messages: + msg86611

type: behavior
stage: test needed
2007-12-15 00:35:58taleinatsetnosy: + taleinat
2007-12-13 04:00:54kbksetnosy: + kbk
messages: + msg58521
2007-08-20 02:56:49deejrosscreate