NetBSD Problem Report #55931
From buhrow@nfbcal.org Sat Jan 16 00:38:07 2021
Return-Path: <buhrow@nfbcal.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))
(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
by mollari.NetBSD.org (Postfix) with ESMTPS id 4F3E61A9217
for <gnats-bugs@www.NetBSD.org>; Sat, 16 Jan 2021 00:38:07 +0000 (UTC)
Message-Id: <202101160038.10G0c4Qw011448@nfbcal.org>
Date: Fri, 15 Jan 2021 16:38:04 -0800 (PST)
From: buhrow@nfbcal.org
Reply-To: buhrow@nfbcal.org
To: gnats-bugs@www.NetBSD.org
Subject: Lynx-2.8.9rel.1 doesn't work with libcurses in NetBSD-9
X-Send-Pr-Version: 3.95
>Number: 55931
>Category: lib
>Synopsis: misc/window doesn't work (was: Lynx-2.8.9rel.1 doesn't work with libcurses in NetBSD-9)
>Confidential: no
>Severity: serious
>Priority: high
>Responsible: blymn
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sat Jan 16 00:40:00 +0000 2021
>Closed-Date: Sat Feb 26 01:29:48 +0000 2022
>Last-Modified: Sat Feb 26 01:30:02 +0000 2022
>Originator: Brian Buhrow
>Release: NetBSD 9.1_stable
>Organization:
NFB of California
>Environment:
System: NetBSD mirkwood.nfbcal.org 9.1_STABLE NetBSD 9.1_STABLE (MIRKWOOD) #0: Wed Dec 23 20:12:58 PST 2020 buhrow@loth-9.nfbcal.org:/usr/local/netbsd/src-90/sys/arch/amd64/compile/MIRKWOOD amd64
Architecture: x86_64
Machine: amd64
>Description:
When using lynx, the text based browser, with NetBSD-9, the screen is improperly rendered.
Specifically, as the screen is redrawn as part of the updating process, characters from
previous screens are left behind, rendering a very messy screen. In addition, there appears to
be some kind of cursor addressing problem in that the cursor is not always placed correctly on
the current link or form field.
I've tried reinstalling the package using the curses option, rather than the cursesw option,
thinking it might be an issue with wide curses support. That didn't fix the problem.
I believe the problem is with the libcurses library because the same version of the same
package works fine when compiled on NetBSD-5.2. Other programs, such as vi, top etc. that use
libcurses seem to work fine under NetBSD-9, so there seems to be some interaction between the
updated version of libcurses and lynx that other programs aren't exhibiting.
Output of ldd against lynx looks like:
lynx:
-lz.1 => /usr/lib/libz.so.1
-lc.12 => /usr/lib/libc.so.12
-lcurses.8 => /usr/lib/libcurses.so.8
-lterminfo.1 => /usr/lib/libterminfo.so.1
-lssl.14 => /usr/lib/libssl.so.14
-lcrypto.14 => /usr/lib/libcrypto.so.14
-lcrypt.1 => /lib/libcrypt.so.1
-lintl.1 => /usr/lib/libintl.so.1
>How-To-Repeat:
Install the pkg/www/lynx package under NetBSD-9
Install the window(1) package
run: window -e^o (to make the window command control-o)
Run lynx under wond of your windows.
>Fix:
I don't yet have a fix, but I'm hoping someone who knows about the innards of libcurses will be
able to identify the problem quickly.
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: pkg-manager->blymn
Responsible-Changed-By: blymn@NetBSD.org
Responsible-Changed-When: Sun, 27 Jun 2021 23:54:31 +0000
Responsible-Changed-Why:
I will take this bug.
State-Changed-From-To: open->feedback
State-Changed-By: blymn@NetBSD.org
State-Changed-When: Sun, 27 Jun 2021 23:54:31 +0000
State-Changed-Why:
Fix found, commit will come shortly and will request feedback.
From: "Brett Lymn" <blymn@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/55931 CVS commit: src/lib/libcurses
Date: Sun, 27 Jun 2021 23:57:08 +0000
Module Name: src
Committed By: blymn
Date: Sun Jun 27 23:57:08 UTC 2021
Modified Files:
src/lib/libcurses: cr_put.c
Log Message:
Fix PR lib/55931
Only reset outcol if we actually emit a \n as cursor_down may not may
not put the cursor at the start of the next line.
To generate a diff of this commit:
cvs rdiff -u -r1.34 -r1.35 src/lib/libcurses/cr_put.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
From: David Holland <dholland-pbugs@netbsd.org>
To: gnats-bugs@netbsd.org
Cc:
Subject: Re: pkg/55931: Lynx-2.8.9rel.1 doesn't work with libcurses in
NetBSD-9
Date: Sun, 18 Jul 2021 22:48:23 +0000
On Sat, Jan 16, 2021 at 12:40:00AM +0000, buhrow@nfbcal.org wrote:
> >How-To-Repeat:
> Install the pkg/www/lynx package under NetBSD-9
> Install the window(1) package
> run: window -e^o (to make the window command control-o)
> Run lynx under wond of your windows.
This is the critical part: window doesn't work. Nothing curses-based
seems to display properly, lynx or otherwise.
--
David A. Holland
dholland@netbsd.org
From: Brett Lymn <blymn@internode.on.net>
To: gnats-bugs@netbsd.org
Cc: blymn@netbsd.org, gnats-admin@netbsd.org, netbsd-bugs@netbsd.org,
buhrow@nfbcal.org
Subject: Re: pkg/55931: Lynx-2.8.9rel.1 doesn't work with libcurses in
NetBSD-9
Date: Mon, 19 Jul 2021 16:54:58 +0930
On Sun, Jul 18, 2021 at 10:50:02PM +0000, David Holland wrote:
> > run: window -e^o (to make the window command control-o)
> > Run lynx under wond of your windows.
>
> This is the critical part: window doesn't work. Nothing curses-based
> seems to display properly, lynx or otherwise.
>
Yes, this is true and, for the record, it wouldn't just be window but
any terminal that did not use \n for the CUD1 capability.
This should be fixed in -current, I was waiting for feedback.
--
Brett Lymn
--
Sent from my NetBSD device.
"We are were wolves",
"You mean werewolves?",
"No we were wolves, now we are something else entirely",
"Oh"
From: David Holland <dholland-bugs@netbsd.org>
To: gnats-bugs@netbsd.org
Cc:
Subject: Re: pkg/55931: Lynx-2.8.9rel.1 doesn't work with libcurses in
NetBSD-9
Date: Mon, 19 Jul 2021 08:56:56 +0000
On Mon, Jul 19, 2021 at 04:54:58PM +0930, Brett Lymn wrote:
> Yes, this is true and, for the record, it wouldn't just be window but
> any terminal that did not use \n for the CUD1 capability.
>
> This should be fixed in -current, I was waiting for feedback.
Oops, I only saw the original pkgsrc manifestation of the PR before
replying...
--
David A. Holland
dholland@netbsd.org
From: Brian Buhrow <buhrow@nfbcal.org>
To: Brett Lymn <blymn@internode.on.net>, gnats-bugs@netbsd.org
Cc: blymn@netbsd.org, gnats-admin@netbsd.org, netbsd-bugs@netbsd.org,
buhrow@nfbcal.org
Subject: Re: pkg/55931: Lynx-2.8.9rel.1 doesn't work with libcurses in NetBSD-9
Date: Tue, 20 Jul 2021 09:52:12 -0700
Hello. I have been on vacation, but I'll try to get this done in a week or so. One other
place I notice the problem, is with vi(1) and window(1) when lines wrap from one line to
another on the screen. The bug is more subtle, but I think it's a manifestation of the same
issue. This one is interesting because I'm seeing it using vi(1) over an ssh connection into a
window(1) terminal. In any case, I sure hope the fix cures the problem with window(1) because
this is a critical application for me.
-thanks
-Brian
On Jul 19, 4:54pm, Brett Lymn wrote:
} Subject: Re: pkg/55931: Lynx-2.8.9rel.1 doesn't work with libcurses in Net
} On Sun, Jul 18, 2021 at 10:50:02PM +0000, David Holland wrote:
} > > run: window -e^o (to make the window command control-o)
} > > Run lynx under wond of your windows.
} >
} > This is the critical part: window doesn't work. Nothing curses-based
} > seems to display properly, lynx or otherwise.
} >
}
} Yes, this is true and, for the record, it wouldn't just be window but
} any terminal that did not use \n for the CUD1 capability.
}
} This should be fixed in -current, I was waiting for feedback.
}
} --
} Brett Lymn
} --
From: Brian Buhrow <buhrow@nfbcal.org>
To: gnats-bugs@netbsd.org, blymn@netbsd.org, gnats-admin@netbsd.org,
netbsd-bugs@netbsd.org
Cc: buhrow@nfbcal.org
Subject: Re: pkg/55931: Lynx-2.8.9rel.1 doesn't work with libcurses in NetBSD-9
Date: Tue, 10 Aug 2021 11:48:09 -0700
Hello Brett. My apologies for taking so long to look at this issue. Your fixes improve
the situation, but don't appear to entirely solve it. Specifically, in lynx, if trying to
select from a drop down menu, the options for the drop down menu do not appear on the screen.
Here's how to reproduce the issue I'm seeing and my environment, in case that helps clarify the
problem.
1. Run lynx against any web site.
lynx -show_cursor
2. While lynx is running, press o to open the options page.
3. Arrow down until you reach the SSL prompting menu item.
4. press return on that menu item. This should produce a popup window in the middle of your
text and your arrow keys should let you select one of the choices.
5. On a working system, I get the popup window and I can arrow around.
On the libcurses with your changes, nothing appears on the screen, though the arrow keys do
change the choices from inside Lynx, meaning when you hit return to select an option, you can
see you've changed your selection back on the main screen.
My environment is as follows:
NetBSD mirkwood.nfbcal.org 9.99.77 NetBSD 9.99.77 (MIRKWOOD) #0: Tue Jan 19 14:34:20 PST 2021
buhrow@loth-9.nfbcal.org:/usr/local/netbsd/obj-current/sys/arch/amd64/compile/MIRKWOOD amd64
Just so you're clear, I built a new build of the entire NetBSD-current sources that I've
been running for a while, with your patch installed. that way, your patch is the only change
from the environment I've been using.
My shell environment looks like:
HOME=/usr/home/buhrow
SHELL=/bin/csh
TERM=window-v2
LOGNAME=buhrow
USER=buhrow
PATH=/bin:/usr/bin:/usr/pkg/bin:/usr/local/bin:/usr/sbin:/usr/X11R7/bin:/usr/games:/usr/home/buhrow/bin:.
PWD=/usr/home/buhrow
AUDIODEV=/dev/sound0
TERMCAP=WW|window-v2|window program version 2: :am:bs:da:db:ms:pt:cr=^M:nl=^J:bl=^G:ta=^I: :cm=\EY%+ %+ :le=^H:nd=\EC:up=\EA:do=\EB:ho=\EH: :cd=\EJ:ce=\EK:cl=\EE:me=\Er^?:co#100:li#18:se=\ErA:so=\EsA:mr=\EsA:ue=\ErD:us=\EsD:ae=\ErH:as=\EsH:al=\EL:dl=\EM:kb=^H:ku=^[OA:kd=^[OB:kl=^[OD:kr=^[OC:
WINDOW_ID=7
Hopefully this is a simple problem for you to reproduce or you can tell me I'm doing something
silly that's creating the trouble.
-thanks
-Brian
From: Brett Lymn <blymn@internode.on.net>
To: gnats-bugs@netbsd.org
Cc: blymn@netbsd.org, gnats-admin@netbsd.org, netbsd-bugs@netbsd.org,
buhrow@nfbcal.org
Subject: Re: pkg/55931: Lynx-2.8.9rel.1 doesn't work with libcurses in
NetBSD-9
Date: Fri, 1 Oct 2021 17:06:34 +0930
On Tue, Aug 10, 2021 at 06:50:02PM +0000, Brian Buhrow wrote:
>
> 1. Run lynx against any web site.
> lynx -show_cursor
>
> 2. While lynx is running, press o to open the options page.
>
> 3. Arrow down until you reach the SSL prompting menu item.
>
> 4. press return on that menu item. This should produce a popup window in the middle of your
> text and your arrow keys should let you select one of the choices.
>
When I do this I get a popup with the options in it but there is no
highlighting. The arrow keys change the selection because when an
option is selected it is reflected in the options screen.
This can actually be seen outside window too, if TERM in an xterm is set to
vt100 (thus disabling colour support) then the highlighting is absent in
the popup. If colour is available then the popup highlighting works.
Digging into the curses debug it looks like the characters are being
added without the correct attribute rather than the refresh code somehow
missing the highlight.
--
Brett Lymn
--
Sent from my NetBSD device.
"We are were wolves",
"You mean werewolves?",
"No we were wolves, now we are something else entirely",
"Oh"
From: Brett Lymn <blymn@internode.on.net>
To: gnats-bugs@netbsd.org
Cc: blymn@netbsd.org, gnats-admin@netbsd.org, netbsd-bugs@netbsd.org,
buhrow@nfbcal.org
Subject: Re: pkg/55931: Lynx-2.8.9rel.1 doesn't work with libcurses in
NetBSD-9
Date: Fri, 15 Oct 2021 17:28:39 +1030
On Fri, Oct 01, 2021 at 07:40:01AM +0000, Brett Lymn wrote:
>
> On Tue, Aug 10, 2021 at 06:50:02PM +0000, Brian Buhrow wrote:
> >
> > 1. Run lynx against any web site.
> > lynx -show_cursor
> >
> > 2. While lynx is running, press o to open the options page.
> >
> > 3. Arrow down until you reach the SSL prompting menu item.
> >
> > 4. press return on that menu item. This should produce a popup window in the middle of your
> > text and your arrow keys should let you select one of the choices.
> >
>
> When I do this I get a popup with the options in it but there is no
> highlighting. The arrow keys change the selection because when an
> option is selected it is reflected in the options screen.
>
> This can actually be seen outside window too, if TERM in an xterm is set to
> vt100 (thus disabling colour support) then the highlighting is absent in
> the popup. If colour is available then the popup highlighting works.
>
> Digging into the curses debug it looks like the characters are being
> added without the correct attribute rather than the refresh code somehow
> missing the highlight.
>
I built lynx against ncurses to test the behaviour there. What happens
with ncurses is that when navigating the popup the cursor is moved up
and down when the arrow keys are pressed to indicate the current
selection. With NetBSD curses the cursor briefly is in the popup window
but is moved to a line near the bottom of the screen.
So, the real issue here is that the cursor location should be within the
popup window but this is not happeing.
--
Brett Lymn
--
Sent from my NetBSD device.
"We are were wolves",
"You mean werewolves?",
"No we were wolves, now we are something else entirely",
"Oh"
From: "Brett Lymn" <blymn@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/55931 CVS commit: src/lib/libcurses
Date: Tue, 19 Oct 2021 06:37:29 +0000
Module Name: src
Committed By: blymn
Date: Tue Oct 19 06:37:29 UTC 2021
Modified Files:
src/lib/libcurses: getch.c
Log Message:
Fix for PR pkg/55931
Don't move the cursor when getch is called if input is not going to
be echoed. Lynx uses the cursor to mark the current selection in a
pop-up, previously the cursor was being relocated when getch was called
which broke the Lynx item marking.
To generate a diff of this commit:
cvs rdiff -u -r1.77 -r1.78 src/lib/libcurses/getch.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
From: Brett Lymn <blymn@internode.on.net>
To: gnats-bugs@netbsd.org
Cc: blymn@netbsd.org, gnats-admin@netbsd.org, netbsd-bugs@netbsd.org,
buhrow@nfbcal.org
Subject: Re: pkg/55931: Lynx-2.8.9rel.1 doesn't work with libcurses in
NetBSD-9
Date: Tue, 19 Oct 2021 17:16:35 +1030
On Fri, Oct 15, 2021 at 07:00:03AM +0000, Brett Lymn wrote:
>
> So, the real issue here is that the cursor location should be within the
> popup window but this is not happeing.
>
I have just committed a fix for this. There was another bug where the
cursor was not synced properly when getch was called if move() had been
called but no refresh() done. The fix is to only move the cursor when
getch is called iff characters are going to be echoed.
--
Brett Lymn
--
Sent from my NetBSD device.
"We are were wolves",
"You mean werewolves?",
"No we were wolves, now we are something else entirely",
"Oh"
State-Changed-From-To: feedback->closed
State-Changed-By: buhrow@NetBSD.org
State-Changed-When: Sat, 26 Feb 2022 01:29:48 +0000
State-Changed-Why:
The issue is resolved.
From: Brian Buhrow <buhrow@nfbcal.org>
To: gnats-bugs@netbsd.org, blymn@netbsd.org, gnats-admin@netbsd.org,
netbsd-bugs@netbsd.org
Cc: buhrow@nfbcal.org
Subject: Re: pkg/55931: Lynx-2.8.9rel.1 doesn't work with libcurses in NetBSD-9
Date: Fri, 25 Feb 2022 17:27:46 -0800
hello. I have now tested lynx with the latest version of libcurses from -current sources
as of 2022-02-24 and find that everything appears to work as expected. Thanks for working on
this. I'll close the ticket soon!
-thanks
-Brian
>Unformatted:
The screen isn't properly drawn with lynx when used with libcurses under NetBSD-9
(Contact us)
$NetBSD: query-full-pr,v 1.46 2020/01/03 16:35:01 leot Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2020
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.