ports/164818: sysutils/tty-clock may be fixed on 9.0
Sergey Kronshtadtov
svk at arm.ru
Mon Feb 6 10:20:08 UTC 2012
>Number: 164818
>Category: ports
>Synopsis: sysutils/tty-clock may be fixed on 9.0
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: update
>Submitter-Id: current-users
>Arrival-Date: Mon Feb 06 10:20:07 UTC 2012
>Closed-Date:
>Last-Modified:
>Originator: Sergey Kronshtadtov
>Release: 9.0-STABLE
>Organization:
-
>Environment:
FreeBSD clock01.008.sbm5.net 9.0-STABLE FreeBSD 9.0-STABLE #0: Mon Jan 30 20:02:22 MSK 2012 svk at fs1-1.008.sbm5.net:/usr/obj/i386.i386/.01/build/9-STABLE-20120127/usr/src/sys/GENERIC i386
>Description:
I have no coredumps on 9.0-STABLE (27.01.2012) but "minutes" section becomes defaced after a while.
It seems for me like a bug in console subsystem. It happend only on consoles, not ssh etc. I suppose the problem is in some kind of data corruption while window refreshes frequently. Thereby color pairs applied incorrectly. Though i can't figure out the clear way to make things goes wrong. Only "something wrong with wrefresh".
The patch is just rearrangement of pair of code blocks to run wrefresh-es in slighly different sequence. Now it works flawlessly for me.
>How-To-Repeat:
-
>Fix:
clock01# diff ttyclock.c ttyclock.c.save.00
177c177
< draw_number(int n, int y, int x)
---
> draw_number(int n, int x, int y)
179c179
< int i, sx = x;
---
> int i, sy = y;
181c181
< for(i = 0; i < 30; ++i, ++sx)
---
> for(i = 0; i < 30; ++i, ++sy)
183c183
< if(sx == x + 6)
---
> if(sy == y + 6)
185,186c185,186
< sx = x;
< ++y;
---
> sy = y;
> ++x;
189c189
< mvwaddch(ttyclock->framewin, y, sx, ' ');
---
> mvwaddch(ttyclock->framewin, x, sy, ' ');
190a191
> wrefresh(ttyclock->framewin);
210a212,216
> /* Draw the date */
> wbkgdset(ttyclock->datewin, (COLOR_PAIR(2)));
> mvwprintw(ttyclock->datewin, (DATEWINH / 2), 1, ttyclock->date.datestr);
> wrefresh(ttyclock->datewin);
>
224,231d229
< wrefresh(ttyclock->framewin);
<
< /* Draw the date */
< wbkgdset(ttyclock->datewin, (COLOR_PAIR(2)));
< mvwprintw(ttyclock->datewin, (DATEWINH / 2), 1, ttyclock->date.datestr);
<
< wrefresh(ttyclock->datewin);
<
clock01#
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list