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 when searching #51

Closed
bukzor opened this issue Jan 9, 2013 · 8 comments
Closed

crash when searching #51

bukzor opened this issue Jan 9, 2013 · 8 comments

Comments

@bukzor
Copy link
Contributor

bukzor commented Jan 9, 2013

Reproduction steps:

  1. python -m pudb.run foo.py
  2. /
  3. foo
  4. <enter>
  5. The below traceback is displayed.

If you can tell me how to induce this error automatically, I can write a unit test for it, at minimum, and likely produce a patch for the bug as well.

Traceback (most recent call last):
  File "/usr/lib/python2.6/bdb.py", line 46, in trace_dispatch                                                                                                                                               
    return self.dispatch_line(frame)                                                                                                                                                                         
  File "/usr/lib/python2.6/bdb.py", line 64, in dispatch_line                                                                                                                                                
    self.user_line(frame)                                                                                                                                                                                    
  File "/home/buck/venv/mypy/lib/python2.6/site-packages/pudb/debugger.py", line 257, in user_line                                                                                                           
    self.interaction(frame)                                                                                                                                                                                  
  File "/home/buck/venv/mypy/lib/python2.6/site-packages/pudb/debugger.py", line 226, in interaction                                                                                                         
    show_exc_dialog=show_exc_dialog)                                                                                                                                                                         
  File "/home/buck/venv/mypy/lib/python2.6/site-packages/pudb/debugger.py", line 1256, in call_with_ui                                                                                                       
    return f(*args, **kwargs)                                                                                                                                                                                
  File "/home/buck/venv/mypy/lib/python2.6/site-packages/pudb/debugger.py", line 1386, in interaction                                                                                                        
    self.event_loop()                                                                                                                                                                                        
  File "/home/buck/venv/mypy/lib/python2.6/site-packages/pudb/debugger.py", line 1343, in event_loop                                                                                                         
    toplevel.keypress(self.size, k)                                                                                                                                                                          
  File "/home/buck/venv/mypy/lib/python2.6/site-packages/pudb/ui_tools.py", line 82, in keypress                                                                                                             
    result = self._w.keypress(size, key)                                                                                                                                                                     
  File "/home/buck/venv/mypy/lib/python2.6/site-packages/urwid/container.py", line 1103, in keypress                                                                                                         
    return self.body.keypress( (maxcol, remaining), key )                                                                                                                                                    
  File "/home/buck/venv/mypy/lib/python2.6/site-packages/urwid/container.py", line 2241, in keypress                                                                                                         
    key = w.keypress((mc,) + size[1:], key)                                                                                                                                                                  
  File "/home/buck/venv/mypy/lib/python2.6/site-packages/urwid/container.py", line 1560, in keypress                                                                                                         
    key = self.focus.keypress(tsize, key)                                                                                                                                                                    
  File "/home/buck/venv/mypy/lib/python2.6/site-packages/pudb/ui_tools.py", line 294, in keypress                                                                                                            
    self.controller.hide_search_ui()                                                                                                                                                                         
  File "/home/buck/venv/mypy/lib/python2.6/site-packages/pudb/ui_tools.py", line 197, in hide_search_ui                                                                                                      
    self.ui.lhs_col.set_focus(self.ui.lhs_col.widget_list[0])                                                                                                                                                
IndexError: list index out of range                                                                                                                                                                          

@inducer
Copy link
Owner

inducer commented Jan 9, 2013

What version of urwid are you using?

@inducer
Copy link
Owner

inducer commented Jan 9, 2013

I should add that I currently can't reproduce this issue.

@asmeurer
Copy link
Collaborator

asmeurer commented Jan 9, 2013

Perhaps the contents of foo.py are relevant.

@bukzor
Copy link
Contributor Author

bukzor commented Jan 9, 2013

my pudb is the latest pypi. I'll try the github version shortly.

$ python -V
Python 2.6.7

$ pip freeze | egrep 'urwid|pudb'
pudb==2012.3
urwid==1.1.1

foo.py is entirely trivial:

def foo():
    print 'ok'

foo()

@asmeurer
Copy link
Collaborator

asmeurer commented Jan 9, 2013

I can reproduce this. It seems to be an issue with the newer urwid (pip still installs version 1.0.2 for me for some reason).

@inducer
Copy link
Owner

inducer commented Jan 11, 2013

Should be fixed in git. urwid changed the interface for what I'm trying to do there (delete the search box), and the backwards compatibility shim isn't exactly backwards compatible. I did what I had to do to fix this: Use the new interface, require urwid 1.1.1.

@inducer inducer closed this as completed Jan 11, 2013
@inducer
Copy link
Owner

inducer commented Jan 11, 2013

Uh, nope. Didn't fix it.

@inducer inducer reopened this Jan 11, 2013
@inducer
Copy link
Owner

inducer commented Jan 11, 2013

Never mind. Urwid 1.0.1 had crept back into my virtualenv. Should be fine.

@inducer inducer closed this as completed Jan 11, 2013
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

No branches or pull requests

3 participants