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

Crash on editing Variable settings #233

Open
eugenezastrogin opened this issue Apr 1, 2017 · 2 comments · May be fixed by #465
Open

Crash on editing Variable settings #233

eugenezastrogin opened this issue Apr 1, 2017 · 2 comments · May be fixed by #465

Comments

@eugenezastrogin
Copy link

eugenezastrogin commented Apr 1, 2017

Crashes on certain repeatable sequence of actions.
Steps to reproduce:

  1. load http://ideone.com/DVs5cv
  2. start pudb (pudb3 script.py)
  3. Run till the end (repeated n, then examine post-mortem mode)
  4. Switch to Variables (V)
  5. Press enter on any Variable in the list

Traceback:

Traceback (most recent call last):
  File "/usr/bin/pudb3", line 11, in <module>
    load_entry_point('pudb==2017.1.1', 'console_scripts', 'pudb3')()
  File "/usr/lib/python3.6/site-packages/pudb/run.py", line 32, in main
    steal_output=options.steal_output)
  File "/usr/lib/python3.6/site-packages/pudb/__init__.py", line 127, in runscript
    dbg.interaction(None, sys.exc_info(), show_exc_dialog=False)
  File "/usr/lib/python3.6/site-packages/pudb/debugger.py", line 339, in interaction
    show_exc_dialog=show_exc_dialog)
  File "/usr/lib/python3.6/site-packages/pudb/debugger.py", line 2079, in call_with_ui
    return f(*args, **kwargs)
  File "/usr/lib/python3.6/site-packages/pudb/debugger.py", line 2307, in interaction
    self.event_loop()
  File "/usr/lib/python3.6/site-packages/pudb/debugger.py", line 2273, in event_loop
    toplevel.keypress(self.size, k)
  File "/usr/lib/python3.6/site-packages/pudb/ui_tools.py", line 96, in keypress
    result = self._w.keypress(size, key)
  File "/usr/lib64/python3.6/site-packages/urwid/container.py", line 1128, in keypress
    return self.body.keypress( (maxcol, remaining), key )
  File "/usr/lib64/python3.6/site-packages/urwid/container.py", line 2269, in keypress
    key = w.keypress((mc,) + size[1:], key)
  File "/usr/lib/python3.6/site-packages/pudb/ui_tools.py", line 96, in keypress
    result = self._w.keypress(size, key)
  File "/usr/lib64/python3.6/site-packages/urwid/container.py", line 1587, in keypress
    key = self.focus.keypress(tsize, key)
  File "/usr/lib64/python3.6/site-packages/urwid/container.py", line 1587, in keypress
    key = self.focus.keypress(tsize, key)
  File "/usr/lib/python3.6/site-packages/pudb/ui_tools.py", line 101, in keypress
    return handler(self, size, key)
  File "/usr/lib/python3.6/site-packages/pudb/debugger.py", line 789, in edit_inspector_detail
    fvi = self.get_frame_var_info(read_only=False)
  File "/usr/lib/python3.6/site-packages/pudb/var_view.py", line 536, in get_frame_var_info
    ssid = self.debugger.get_stack_situation_id()
  File "/usr/lib/python3.6/site-packages/pudb/debugger.py", line 342, in get_stack_situation_id
    return str(id(self.stack[self.curindex][0].f_code))
IndexError: list index out of range
@eugenezastrogin eugenezastrogin changed the title Periodically crashes Crash on editing Variable settings Apr 1, 2017
@asmeurer
Copy link
Collaborator

asmeurer commented Apr 1, 2017

Seems to happen with any script examining a variable in post-mortem mode.

@qhuy4119
Copy link
Contributor

qhuy4119 commented Jul 14, 2021

This is because when in post-mortem Debugger.stack is empty.

I can make it not crash by restoring Debugger.bottom_frame to Debugger.stack in post-mortem. However, at that point you can only inspect attributes of the module object itself, which in this case are a function and 2 classes (checkio, Wall, and WallPart)

@qhuy4119 qhuy4119 linked a pull request Jul 14, 2021 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants