Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IDLE crashes when Stack Viewer opened #55278

Closed
YakovBlum mannequin opened this issue Jan 30, 2011 · 9 comments
Closed

IDLE crashes when Stack Viewer opened #55278

YakovBlum mannequin opened this issue Jan 30, 2011 · 9 comments
Labels
OS-windows topic-IDLE type-bug An unexpected behavior, bug, or error

Comments

@YakovBlum
Copy link
Mannequin

YakovBlum mannequin commented Jan 30, 2011

BPO 11069
Nosy @birkenfeld, @kbkaiser, @ned-deily, @briancurtin

Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

Show more details

GitHub fields:

assignee = None
closed_at = <Date 2011-01-30.08:16:52.049>
created_at = <Date 2011-01-30.02:36:15.533>
labels = ['expert-IDLE', 'type-bug', 'OS-windows']
title = 'IDLE crashes when Stack Viewer opened'
updated_at = <Date 2011-01-30.19:42:32.412>
user = 'https://bugs.python.org/YakovBlum'

bugs.python.org fields:

activity = <Date 2011-01-30.19:42:32.412>
actor = 'brian.curtin'
assignee = 'none'
closed = True
closed_date = <Date 2011-01-30.08:16:52.049>
closer = 'georg.brandl'
components = ['IDLE', 'Windows']
creation = <Date 2011-01-30.02:36:15.533>
creator = 'Yakov.Blum'
dependencies = []
files = []
hgrepos = []
issue_num = 11069
keywords = []
message_count = 9.0
messages = ['127509', '127510', '127511', '127514', '127515', '127520', '127527', '127532', '127547']
nosy_count = 5.0
nosy_names = ['georg.brandl', 'kbk', 'ned.deily', 'brian.curtin', 'Yakov.Blum']
pr_nums = []
priority = 'normal'
resolution = 'fixed'
stage = 'resolved'
status = 'closed'
superseder = None
type = 'behavior'
url = 'https://bugs.python.org/issue11069'
versions = ['Python 3.1']

@YakovBlum
Copy link
Mannequin Author

YakovBlum mannequin commented Jan 30, 2011

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

@YakovBlum YakovBlum mannequin added type-crash A hard crash of the interpreter, possibly with a core dump topic-IDLE labels Jan 30, 2011
@ned-deily
Copy link
Member

According to the StackOverflow report, the crash occurs on Python 3.1.2 with IDLE 3.1.2 on Windows 7.

@YakovBlum
Copy link
Mannequin Author

YakovBlum mannequin commented Jan 30, 2011

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

@briancurtin
Copy link
Member

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

@briancurtin briancurtin added type-bug An unexpected behavior, bug, or error and removed type-crash A hard crash of the interpreter, possibly with a core dump labels Jan 30, 2011
@briancurtin
Copy link
Member

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

@birkenfeld
Copy link
Member

Thanks, applied in r88258.

@briancurtin
Copy link
Member

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.

@birkenfeld
Copy link
Member

Please do.

@briancurtin
Copy link
Member

Fixed in release31-maint in r88269.

@ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OS-windows topic-IDLE type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

No branches or pull requests

3 participants