Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 214063 - app-portage/elogv-0.6.3 crashes when displaying logs
Summary: app-portage/elogv-0.6.3 crashes when displaying logs
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Third-Party Tools (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Christian Faulhammer (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-03-20 17:25 UTC by Michał Kiedrowicz
Modified: 2008-03-21 22:02 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
x11-base:xorg-server-1.4.0.90-r3:20080320-074507.log (x11-base:xorg-server-1.4.0.90-r3:20080320-074507.log,3.78 KB, text/plain)
2008-03-20 17:26 UTC, Michał Kiedrowicz
Details
proposed patch (elogv-0.6.3-addstr.patch,1.56 KB, patch)
2008-03-20 17:32 UTC, Michał Kiedrowicz
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Michał Kiedrowicz 2008-03-20 17:25:49 UTC
Traceback (most recent call last):
  File "/usr/bin/elogv", line 493, in <module>
    curses.wrapper(ElogViewer)
  File "/usr/lib/python2.5/curses/wrapper.py", line 44, in wrapper
    return func(stdscr, *args, **kwds)
  File "/usr/bin/elogv", line 150, in __init__
    self.show_log()
  File "/usr/bin/elogv", line 399, in show_log
    self.log_win.addstr(x[:self.width-2],curses.color_pair(normal))
_curses.error: addstr() returned ERR

This is because addstr() returns ERR when it reaches end of a window. See similar issue:

http://ubuntuforums.org/showthread.php?t=457689

Solution given in mentioned thread also works here


Reproducible: Always

Steps to Reproduce:
1. Place file x11-base:xorg-server-1.4.0.90-r3:20080320-074507.log (attached below) in /var/log/portage/elog.
2. Set terminal size to 110x23.
3. Run elogv and view log with spacebar. Elogv crashes.
Comment 1 Michał Kiedrowicz 2008-03-20 17:26:26 UTC
Created attachment 146661 [details]
x11-base:xorg-server-1.4.0.90-r3:20080320-074507.log
Comment 2 Michał Kiedrowicz 2008-03-20 17:32:03 UTC
Created attachment 146662 [details, diff]
proposed patch
Comment 3 Christian Faulhammer (RETIRED) gentoo-dev 2008-03-21 08:59:19 UTC
As always, thanks a lot for your support.  Adding Luca to get him informed.
Comment 4 Luca Marturana 2008-03-21 10:18:52 UTC
(In reply to comment #3)
> As always, thanks a lot for your support.  Adding Luca to get him informed.
> 
Thanks again Michal for your work. ;) I've just released 0.6.4 including this fix.
Comment 5 Christian Faulhammer (RETIRED) gentoo-dev 2008-03-21 11:02:00 UTC
(In reply to comment #4)
> (In reply to comment #3)
> > As always, thanks a lot for your support.  Adding Luca to get him informed.
> > 
> Thanks again Michal for your work. ;) I've just released 0.6.4 including this
> fix.
 
 Bumped in Portage.  Another idea I have is localisation of the tool...I can provide Spanish and German translation, Luca Italian and Michal Polish for sure.  Is this doable in a simple way with elogv?  I think nls is there for Python, too.

Comment 6 Michał Kiedrowicz 2008-03-21 22:02:46 UTC
(In reply to comment #5)
>  Bumped in Portage.  Another idea I have is localisation of the tool...I can
> provide Spanish and German translation, Luca Italian and Michal Polish for
> sure.  Is this doable in a simple way with elogv?  I think nls is there for
> Python, too.
> 

Yeah, python has good integration with gettext, I think I can do it. I'll soon file a bug report with a patch and Polish translation.