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 crashes when Stack Viewer opened
Type: behavior Stage: resolved
Components: IDLE, Windows Versions: Python 3.1
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: Yakov.Blum, brian.curtin, georg.brandl, kbk, ned.deily
Priority: normal Keywords:

Created on 2011-01-30 02:36 by Yakov.Blum, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Messages (9)
msg127509 - (view) Author: Yakov Blum (Yakov.Blum) Date: 2011-01-30 02:36
This problem was asked about on Stack Overflow, where there's some more information on it:
http://stackoverflow.com/questions/4046021/python-idle-windows-pressing-stack-viewer-exits-all-idle-windows

But I didn't see it listed as a bug here. I've also experienced it in Python 3.1.3
msg127510 - (view) Author: Ned Deily (ned.deily) * (Python committer) Date: 2011-01-30 02:47
According to the StackOverflow report, the crash occurs on Python 3.1.2 with IDLE 3.1.2 on Windows 7.
msg127511 - (view) Author: Yakov Blum (Yakov.Blum) Date: 2011-01-30 02:49
A few additional details:

I'm also running Windows 7.

Reproducing the crash is as simple as opening IDLE, typing, e.g.,
raise TypeError
and clicking Debug > Stack Viewer
msg127514 - (view) Author: Brian Curtin (brian.curtin) * (Python committer) Date: 2011-01-30 03:10
I don't get a crash, but it certainly doesn't work. Once IDLE is open I type "raise TypeError", then open the stack viewer as you did. Here's what I'm seeing:


[WINSEVEN] 2011-01-29 21:05:30.18
c:\Users\brian
>c:\python31\python.exe -m idlelib.idle
*** Internal Error: rpc.py:SocketIO.localcall()

 Object: 49395136
 Method: <bound method WrappedObjectTreeItem._GetSubList of <idlelib.RemoteObjec
tBrowser.WrappedObjectTreeItem object at 0x0000000002F1B5C0>>
 Args: ()

Traceback (most recent call last):
  File "c:\python31\lib\idlelib\rpc.py", line 188, in localcall
    ret = method(*args, **kwargs)
  File "c:\python31\lib\idlelib\RemoteObjectBrowser.py", line 21, in _GetSubList

    return list(map(remote_object_tree_item, list))
TypeError: 'list' object is not callable
Exception in Tkinter callback
Traceback (most recent call last):
  File "c:\python31\lib\tkinter\__init__.py", line 1399, in __call__
    return self.func(*args)
  File "c:\python31\lib\idlelib\PyShell.py", line 1171, in open_stack_viewer
    return self.interp.remote_stack_viewer()
  File "c:\python31\lib\idlelib\PyShell.py", line 572, in remote_stack_viewer
    node.expand()
  File "c:\python31\lib\idlelib\TreeWidget.py", line 131, in expand
    self.update()
  File "c:\python31\lib\idlelib\TreeWidget.py", line 170, in update
    self.draw(7, 2)
  File "c:\python31\lib\idlelib\TreeWidget.py", line 184, in draw
    sublist = self.item._GetSubList()
  File "c:\python31\lib\idlelib\RemoteObjectBrowser.py", line 36, in _GetSubList

    return [StubObjectTreeItem(self.sockio, oid) for oid in list]
TypeError: 'NoneType' object is not iterable
msg127515 - (view) Author: Brian Curtin (brian.curtin) * (Python committer) Date: 2011-01-30 03:32
The following patch will fix it. Another example of why 'list' isn't a great name :)

Index: Lib/idlelib/RemoteObjectBrowser.py
===================================================================
--- Lib/idlelib/RemoteObjectBrowser.py  (revision 88248)
+++ Lib/idlelib/RemoteObjectBrowser.py  (working copy)
@@ -17,8 +17,8 @@
         return value

     def _GetSubList(self):
-        list = self.__item._GetSubList()
-        return list(map(remote_object_tree_item, list))
+        sub_list = self.__item._GetSubList()
+        return list(map(remote_object_tree_item, sub_list))

 class StubObjectTreeItem:
     # Lives in IDLE process
msg127520 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2011-01-30 08:16
Thanks, applied in r88258.
msg127527 - (view) Author: Brian Curtin (brian.curtin) * (Python committer) Date: 2011-01-30 12:53
This should be back-ported to the maintenance branch as well. I can take care of that if Georg is busy with release-related stuff.
msg127532 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2011-01-30 13:55
Please do.
msg127547 - (view) Author: Brian Curtin (brian.curtin) * (Python committer) Date: 2011-01-30 19:42
Fixed in release31-maint in r88269.
History
Date User Action Args
2022-04-11 14:57:12adminsetgithub: 55278
2011-01-30 19:42:32brian.curtinsetnosy: georg.brandl, kbk, ned.deily, brian.curtin, Yakov.Blum
messages: + msg127547
stage: resolved
2011-01-30 13:55:41georg.brandlsetnosy: georg.brandl, kbk, ned.deily, brian.curtin, Yakov.Blum
messages: + msg127532
2011-01-30 12:53:16brian.curtinsetnosy: georg.brandl, kbk, ned.deily, brian.curtin, Yakov.Blum
messages: + msg127527
2011-01-30 08:16:52georg.brandlsetstatus: open -> closed

nosy: + georg.brandl
messages: + msg127520

resolution: fixed
2011-01-30 03:32:26brian.curtinsetnosy: kbk, ned.deily, brian.curtin, Yakov.Blum
messages: + msg127515
2011-01-30 03:12:03brian.curtinsetnosy: kbk, ned.deily, brian.curtin, Yakov.Blum
type: crash -> behavior
2011-01-30 03:10:54brian.curtinsetnosy: kbk, ned.deily, brian.curtin, Yakov.Blum
messages: + msg127514
2011-01-30 02:49:29Yakov.Blumsetnosy: kbk, ned.deily, brian.curtin, Yakov.Blum
messages: + msg127511
2011-01-30 02:47:32ned.deilysetnosy: + kbk, brian.curtin, ned.deily
messages: + msg127510
components: + Windows
2011-01-30 02:36:15Yakov.Blumcreate