Open jsoref opened 8 years ago
I can't make heads or tails of what you're saying. What were you doing? What happened? At any rate, this looks like it might be related to the custom stringifier stuff from #164.
I used n
to add some watches, and I used c
to continue through some code.
At some point, it crashed (according to key, I had recently pressed c
), w/ the stack listed.
The var
object which does not have an id_path
is actually the SEPARATOR
defined in var_view.py
.
I don't have a custom stringifier set up in preferences.
File "/home/timeless/hg/py/lib/python2.7/site-packages/pudb-2015.4.2-py2.7.egg/pudb/debugger.py", line 754, in change_var_state
.get_inspect_info(var.id_path, read_only=False)
AttributeError: 'NoneType' object has no attribute 'id_path'
I just hit this again. I'm basically stepping (often using c
or f
-- probably f
this time).
I think a try block would be helpful, something like: try: iinfo = self.get_frame_var_info(read_only=False) \ .get_inspect_info(var.id_path, read_only=False) except AttributeError:
I can't quite figure out what to put into the except block... (I can't figure out what's managing what)
A bunch of things don't make sense here.
change_var_state
should only be called in response to a key press.
self.var_list.listen("\\", change_var_state)
self.var_list.listen("t", change_var_state)
self.var_list.listen("r", change_var_state)
self.var_list.listen("s", change_var_state)
self.var_list.listen("c", change_var_state)
self.var_list.listen("h", change_var_state)
self.var_list.listen("@", change_var_state)
self.var_list.listen("*", change_var_state)
self.var_list.listen("w", change_var_state)
self.var_list.listen("m", change_var_state)
So I'm not sure how you get there just by hopping through some code.
change_var_state
finds the focused element in the var view. The
SEPARATOR
should never be able to gain focus.SEPARATOR
theory: The backtrace shows that var
comes out being None
.If you're looking for a recovery path, simply returning from change_var_state
should be OK, but that doesn't explain at all what's going on here. It would
help a lot if you could figure out a solid reproducer.
@inducer : is there a way to add some logging (would script
work?) so that we could debug this? I'd really prefer to give you whatever is necessary to be confident in the fix...
You can direct the Debugger UI to a separate PTY. (Debugger
takes stdin and stdout arguments.)
I'm using watches, and stepping using continue (
c
)...