snare / voltron

A hacky debugger UI for hackers
MIT License
6.16k stars 414 forks source link

Bug in stack view? #188

Open mmontag opened 7 years ago

mmontag commented 7 years ago

I'm having a stack view crash while stepping through code with this error:

[stack]                                                                                                       [0x0127:00007FFF5FBFE210]Exception in thread Thread-1:
Traceback (most recent call last):
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/threading.py", line 810, in __bootstrap_inner
    self.run()
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/threading.py", line 763, in run
    self.__target(*self.__args, **self.__kwargs)
  File "/Library/Python/2.7/site-packages/voltron/core.py", line 563, in run
    self.update()
  File "/Library/Python/2.7/site-packages/voltron/core.py", line 517, in update
    self.callback(results)
  File "/Library/Python/2.7/site-packages/voltron/view.py", line 396, in render
    self.render(results)
  File "/Library/Python/2.7/site-packages/voltron/plugins/view/memory.py", line 218, in render
    super(StackView, self).render(results)
  File "/Library/Python/2.7/site-packages/voltron/plugins/view/memory.py", line 161, in render
    lines = pygments.format(self.generate_tokens(results), f).split('\n')
  File "/Library/Python/2.7/site-packages/pygments/__init__.py", line 66, in format
    formatter.format(tokens, realoutfile)
  File "/Library/Python/2.7/site-packages/pygments/formatters/terminal256.py", line 206, in format
    return Formatter.format(self, tokensource, outfile)
  File "/Library/Python/2.7/site-packages/pygments/formatter.py", line 95, in format
    return self.format_unencoded(tokensource, outfile)
  File "/Library/Python/2.7/site-packages/pygments/formatters/terminal256.py", line 209, in format_unencoded
    for ttype, value in tokensource:
  File "/Library/Python/2.7/site-packages/voltron/plugins/view/memory.py", line 94, in generate_tokens
    if x != six.indexbytes(self.last_memory, c + i):
  File "/Library/Python/2.7/site-packages/six.py", line 655, in indexbytes
    return ord(buf[i])
IndexError: string index out of range

I'm using continue in LLDB, hitting a repeated breakpoint to monitor a hot area of the stack where about 80 bytes are changed each cycle. Maybe some issue with the formatting logic.

bmcorser commented 6 years ago

I'm hitting this as well, except I get it when I run voltron update

Edit: That is, after I resize a pane in tmux.

rileyrg commented 3 years ago

Getting it today in 2021 ;) screenshot-latest