Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#10 Pebrot crashes with an overflow error

open
nobody
5
2010-08-29
2010-08-29
Geoff Shang
No

If you set Pebrot to relist contacts on Window 0 whenever there is a status change, it will eventually crash.

Steps to reproduce:

1. Configure the following options:

auto_list= 1
auto_list_last_move= 1
auto_list_on_0= 1
auto_list_on_0_clear= 0

2. Load up Pebrot and sign into an account with some contacts (the more the better).

3. Wait. Eventually Pebrot will crash with the following:

Traceback (most recent call last):
File "/usr/bin/pebrot", line 16, in <module>
pypebrot.pebrot.main()
File "/usr/lib/python2.5/site-packages/pypebrot/pebrot.py", line 1998, in main
curses.wrapper( gogogo )
File "/usr/lib/python2.5/curses/wrapper.py", line 44, in wrapper
return func(stdscr, *args, **kwds)
File "/usr/lib/python2.5/site-packages/pypebrot/pebrot.py", line 1960, in gogogo
con.loopInput()
File "/usr/lib/python2.5/site-packages/pypebrot/pebrot.py", line 1602, in loopInput
self.oneStep()
File "/usr/lib/python2.5/site-packages/pypebrot/pebrot.py", line 1528, in oneStep
st= self.Text.getLine( self.handleInput, self.step )
File "/usr/lib/python2.5/site-packages/pypebrot/ui.py", line 250, in getLine
idleFunc()
File "/usr/lib/python2.5/site-packages/pypebrot/MSN.py", line 941, in step
self.processMsgs()
File "/usr/lib/python2.5/site-packages/pypebrot/MSN.py", line 1063, in processMsgs
self.userChangesState( msg )
File "/usr/lib/python2.5/site-packages/pypebrot/pebrot.py", line 1637, in userChangesState
self.printUsers( chat )
File "/usr/lib/python2.5/site-packages/pypebrot/pebrot.py", line 795, in printUsers
self.pWin( chat, ': ', 'LIST_PARENS', 0 )
File "/usr/lib/python2.5/site-packages/pypebrot/pebrot.py", line 363, in pWin
self.Main.addstr( chat, text, self.COLORS[color] )
File "/usr/lib/python2.5/site-packages/pypebrot/ui.py", line 389, in addstr
w.addstr( text, attr )
File "/usr/lib/python2.5/site-packages/pypebrot/ui.py", line 82, in addstr
self.p= curses.newpad( self.pRows, scrX )
OverflowError: long int too large to convert to int

Suggested fix: Either fix the overflow or trim the scrollback buffer to keep it within a usable size.

Discussion