NetBSD Problem Report #41423
From www@NetBSD.org Wed May 13 15:10:40 2009
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
by www.NetBSD.org (Postfix) with ESMTP id 362B663C1BF
for <gnats-bugs@gnats.netbsd.org>; Wed, 13 May 2009 15:10:40 +0000 (UTC)
Message-Id: <20090513151040.0616863B8DF@www.NetBSD.org>
Date: Wed, 13 May 2009 15:10:40 +0000 (UTC)
From: vs@nifelheim.info
Reply-To: vs@nifelheim.info
To: gnats-bugs@NetBSD.org
Subject: CenterIM unusable: ignores several keys (like enter)
X-Send-Pr-Version: www-1.0
>Number: 41423
>Category: pkg
>Synopsis: CenterIM unusable: ignores several keys (like enter)
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: jdc
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Wed May 13 15:15:00 +0000 2009
>Closed-Date: Sun Dec 19 02:52:56 +0000 2021
>Last-Modified: Sun Dec 19 02:52:56 +0000 2021
>Originator: Volkmar Seifert
>Release: NetBSD 5.0_RC4
>Organization:
>Environment:
NetBSD unknown 5.0_RC4 NetBSD 5.0_RC4 (GENERIC) #3: Wed Apr 22 11:23:42 CEST 2009 root@ymir:/usr/build/src/sys/arch/i386/compile/obj.i386/GENERIC i386
>Description:
First of all: I am using pkgsrg-current, with nightly updates.
To compile CenterIM, I am using the default PKG_OPTIONS of the package.
Now to the problem:
CenterIM ignores keypresses, like "enter" when selecting a user from the userlist. It also ignores most other configured keys except for "g" (generic menu) and "s" (status menu), and the "arrow"-keys. (In those menus, "enter" does work, btw...)
At first, I got some garbage on the screen, too, but found out rather quickly that I have to add
INCOMPAT_CURSES+= NetBSD 5.*_* NetBSD-5.*-*
to the Makefile to solve that problem. The Garbage is now gone, but the key-problem remains.
I have tried several things, from redefining keys through the config-files, running it inside and outside of screen, changing $TERM from xterm to vt100 etc., with no effect what so ever, the keys are still ignored no matter what I try.
>How-To-Repeat:
Compile CenterIM from pkgsrc-current on NetBSD 5.0 (no matter whether some RC or RELEASE), arch i386, and start it with a valid IM-Account, e.g. ICQ.
>Fix:
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: pkg-manager->jdc
Responsible-Changed-By: wiz@NetBSD.org
Responsible-Changed-When: Thu, 14 May 2009 13:07:00 +0000
Responsible-Changed-Why:
jdc will take a look.
From: "Volkmar Seifert" <vs@nifelheim.info>
To: gnats-bugs@NetBSD.org
Cc:
Subject: Re: pkg/41423: CenterIM unusable: ignores several keys (like enter)
Date: Thu, 14 May 2009 18:08:44 +0200 (CEST)
One further interesting thing: <enter> works on the user-tree to
expand/collapse folders, but not to open chat-windows. For the other keys,
the described behavior is valid.
- Volkmar
On Wed, May 13, 2009 17:15, vs@nifelheim.info wrote:
>>Number: 41423
>>Category: pkg
>>Synopsis: CenterIM unusable: ignores several keys (like enter)
>>Confidential: no
>>Severity: serious
>>Priority: medium
>>Responsible: pkg-manager
>>State: open
>>Class: sw-bug
>>Submitter-Id: net
>>Arrival-Date: Wed May 13 15:15:00 +0000 2009
>>Originator: Volkmar Seifert
>>Release: NetBSD 5.0_RC4
>>Organization:
>>Environment:
> NetBSD unknown 5.0_RC4 NetBSD 5.0_RC4 (GENERIC) #3: Wed Apr 22 11:23:42
> CEST 2009 root@ymir:/usr/build/src/sys/arch/i386/compile/obj.i386/GENERIC
> i386
>>Description:
> First of all: I am using pkgsrg-current, with nightly updates.
> To compile CenterIM, I am using the default PKG_OPTIONS of the package.
>
> Now to the problem:
>
> CenterIM ignores keypresses, like "enter" when selecting a user from the
> userlist. It also ignores most other configured keys except for "g"
> (generic menu) and "s" (status menu), and the "arrow"-keys. (In those
> menus, "enter" does work, btw...)
> At first, I got some garbage on the screen, too, but found out rather
> quickly that I have to add
>
> INCOMPAT_CURSES+= NetBSD 5.*_* NetBSD-5.*-*
>
> to the Makefile to solve that problem. The Garbage is now gone, but the
> key-problem remains.
>
> I have tried several things, from redefining keys through the
> config-files, running it inside and outside of screen, changing $TERM from
> xterm to vt100 etc., with no effect what so ever, the keys are still
> ignored no matter what I try.
>>How-To-Repeat:
> Compile CenterIM from pkgsrc-current on NetBSD 5.0 (no matter whether some
> RC or RELEASE), arch i386, and start it with a valid IM-Account, e.g. ICQ.
>>Fix:
>
>
--
http://blog.nifelheim.info/tech
From: "Volkmar Seifert" <vs@nifelheim.info>
To: gnats-bugs@NetBSD.org
Cc: jdc@NetBSD.org, gnats-admin@NetBSD.org, pkgsrc-bugs@NetBSD.org
Subject: Re: pkg/41423: CenterIM unusable: ignores several keys (like enter)
Date: Wed, 20 May 2009 08:03:14 +0200 (CEST)
Hello,
I just wanted to ask if there are any news about this problem, or anything
I could contribute to help, since so far there seems to be no reaction to
this PR other than an assignment...
So far, CenterIM remains unusable and I still don't have clue why (else I
would have attached a patch/solution :) )
- Volkmar
--
http://blog.nifelheim.info/tech
From: Julian Coleman <jdc@coris.org.uk>
To: gnats-bugs@NetBSD.org
Cc:
Subject: Re: pkg/41423: CenterIM unusable: ignores several keys (like enter)
Date: Wed, 20 May 2009 12:37:12 +0100
Hi,
> I just wanted to ask if there are any news about this problem, or anything
> I could contribute to help, since so far there seems to be no reaction to
> this PR other than an assignment...
>
> So far, CenterIM remains unusable and I still don't have clue why (else I
> would have attached a patch/solution :) )
I have started to look at this. When it starts up, the screen looks OK
apart from any highlighted items are white on white (title, current
selection). Using the left arrow key will get me to a sub-menu plus box
borders drawn in an odd place. No other keys appear to do anything.
> At first, I got some garbage on the screen, too, but found out rather
> quickly that I have to add
>
> INCOMPAT_CURSES+= NetBSD 5.*_* NetBSD-5.*-*
This tends to imply that there is an application bug, as it will not work
with either NetBSD curses nor ncurses. I will look at the debugging output
from our curses library and see what I can spot.
Do other version of centerim (apart from the one in pkgsrc) work?
Thanks,
J
--
My other computer also runs NetBSD / Sailing at Newbiggin
http://www.netbsd.org/ / http://www.newbigginsailingclub.org/
From: Julian Coleman <jdc@coris.org.uk>
To: gnats-bugs@NetBSD.org
Cc:
Subject: Re: pkg/41423: CenterIM unusable: ignores several keys (like enter)
Date: Wed, 20 May 2009 16:10:10 +0100
Hi,
For some reason, it looks like we lose keypad() mode, so that the arrow
keys are treated as sequence of single keys instead of left, right, etc.
I'm not quite sure why. One oddity is that running with a high level of
debugging for libcurses (compiled with make BEBUG_CURSES=1) makes the
problem go away.
The garbled screen looks like a refresh() related problem with multiple
windows - I only see parts of the underlying main screen drawn, and not
all of it. This is probably due to a behaviour difference between our
libcurses and ncurses.
Thanks,
J
--
My other computer also runs NetBSD / Sailing at Newbiggin
http://www.netbsd.org/ / http://www.newbigginsailingclub.org/
From: Julian Coleman <jdc@coris.org.uk>
To: gnats-bugs@NetBSD.org
Cc:
Subject: Re: pkg/41423: CenterIM unusable: ignores several keys (like enter)
Date: Fri, 22 May 2009 13:26:08 +0100
Hi,
> > When it starts up, the screen looks OK
> > apart from any highlighted items are white on white (title, current
> > selection).
> That's an interesting new behavior I haven't seen, yet.
> libcurses, I guess?
Yes. I am doing all my tests with NetBSD's libcurses.
The white on white behaviour is a centerim bug - it sets the highlighted
items to be white foreground and default (i.e. whatever the terminal is set
to) background colours. As I use white background, I get white on white ;-)
> Well, with this line, CenterIM was at least displaying everything the way
> it was meant (on my machine, that is).
As I mentioned, this looks like a refresh() difference between NetBSD curses
and ncurses. I think it's to do with interactions between different curses
windows (i.e. the background and the dialog box), where the specification is
not clear on behaviour.
> I just downloaded, compiled and installed CenterIM 4.22.7 from
> centerim.org . The behavior is just the same as with the pkgsrc-version
> AND the INCOMPAT_CURSES-line, meaning everything that works is displayed
> properly, but the keys are not responding as one would expect, in the very
> same way as before.
Thanks for checking. At least the versions of CenterIM are consistent.
I have narrowed down the problem further. For some reason, when we call
getchar() from the curses library (src/lib/libcurses/getch.c:602), it
returns -1 for the second character in an escape sequence (e.g. left arrow
is the three characters <esc> O D when using an xterm). This causes
the parsing in "assembling a key sequence" state to abort. (The other
characters in the escape sequence are read after the extra -1.) Also, as I
mentioned previously, if I slow everything down by using a curses library
with enough debug enabled, we read the key sequences for the arrow keys
without a problem.
I will see if I can spot why getchar() is returning -1.
Thanks,
J
--
My other computer also runs NetBSD / Sailing at Newbiggin
http://www.netbsd.org/ / http://www.newbigginsailingclub.org/
From: "Volkmar Seifert" <vs@nifelheim.info>
To: jdc@netbsd.org
Cc: gnats-bugs@netbsd.org, pkgsrc-bugs@netbsd.org
Subject: Re: pkg/41423: CenterIM unusable: ignores several keys (like enter)
Date: Sat, 23 May 2009 00:05:56 +0200 (CEST)
Hi,
>> That's an interesting new behavior I haven't seen, yet. libcurses, I
>> guess?
>
> Yes. I am doing all my tests with NetBSD's libcurses.
Ah ok. Well, in the end, it should not really matter. I haven't got it to
work with base's curses, thus the INCOMPAT-line and ncurses.
> The white on white behaviour is a centerim bug - it sets the highlighted
> items to be white foreground and default (i.e. whatever the terminal is
> set to) background colours. As I use white background, I get white on
> white ;-)
he he, ok. Well, if it's just that, I don't care: work-around "use
different bg-color" is easily done :)
> Thanks for checking. At least the versions of CenterIM are consistent.
If I can help, I'll do it :)
And yes, it looks quite consistent.
> I have narrowed down the problem further. For some reason, when we call
> getchar() from the curses library (src/lib/libcurses/getch.c:602), it
> returns -1 for the second character in an escape sequence (e.g. left
> arrow is the three characters <esc> O D when using an xterm). This
> causes the parsing in "assembling a key sequence" state to abort. (The
> other characters in the escape sequence are read after the extra -1.)
> Also, as I mentioned previously, if I slow everything down by using a
> curses library with enough debug enabled, we read the key sequences for
> the arrow keys without a problem.
>
> I will see if I can spot why getchar() is returning -1.
Now that you are mentioning terminal-types like xterm...I tried different
$TERM values, e.g. vt100 and xterm, and the behavior of the keys never
changed. I don't know if this information is helpful, but since I tried
that, I thought it couldn't hurt being mentioned :)
best regards
- Volkmar
--
http://blog.nifelheim.info/tech
From: Julian Coleman <jdc@coris.org.uk>
To: gnats-bugs@NetBSD.org
Cc:
Subject: Re: pkg/41423: CenterIM unusable: ignores several keys (like enter)
Date: Wed, 27 May 2009 15:18:50 +0100
Hi,
> it
> returns -1 for the second character in an escape sequence
Hmm, of course - this is EOF (from src/lib/libc/stdio/rget.c).
> I will see if I can spot why getchar() is returning -1.
So, I looked at the CenterIM code, and discovered the getkey() function in
kkconsui/src/conscommon.cc. This is doing really horrible things to stdin.
I'm amazed that it works anywhere. Probably throwing most of that away will
make things work.
Thanks,
J
--
My other computer also runs NetBSD / Sailing at Newbiggin
http://www.netbsd.org/ / http://www.newbigginsailingclub.org/
From: momomo@lavabit.com
To: gnats-bugs@NetBSD.org
Cc:
Subject: Re: pkg/41423: CenterIM unusable: ignores several keys (like enter)
Date: Mon, 8 Feb 2010 02:27:54 -0500 (EST)
I had a similar problem (i.e. Enter key not working) on i386-netbsd.
However, the same package (or was it CenterICQ ?) worked fine on
alpha-netbsd.
I don't think it's a keyboard issue, I believe that all actions that
require a contact to be selected fail because the function returning
the selected contact contains a bogus check:
--- src/icqface.cc.orig 2010-01-19 16:01:41.000000000 +0100
+++ src/icqface.cc 2010-01-19 16:02:05.000000000 +0100
@@ -539,7 +539,7 @@
g = 0;
}
- if((intptr_t) c < 100) c = 0;
+ /* if((intptr_t) c < 100) c = 0; */
if(i) {
switch(action = extk) {
/**************** end of patch **************************/
I looked in their source tree and it looks like this line
was in there in a form or other since the initial import from
CenterICQ. To me, this looks like a guard against a bad memory
reference that just happened to work whenever they were debugging
a problem, and that was left in and is only seen in certain
memory layouts (which is why it may have worked on alpha or
other architectures or other OSes). I can't imagine a valid
reason to reject a contact if it lives in a certain part of the
RAM...
Regards,
--
Mo mo Mo
PS: updated distinfo
$NetBSD$
SHA1 (centerim-4.22.9.tar.gz) = ebe9f4ee2064a2fa10f1084ce26083ccd295673e
RMD160 (centerim-4.22.9.tar.gz) = 253007e466a211ec740f7843538e4f686ab95cad
Size (centerim-4.22.9.tar.gz) = 2252262 bytes
SHA1 (patch-aa) = 47ddb8568aa36255ad20b71d999284f023726980
SHA1 (patch-ac) = 4ef992ed632a57e921661b1b0054beff0c0aa587
SHA1 (patch-ad) = bfe19ca98facfbb23a87dd28a176980fb4e986de
SHA1 (patch-av) = 05758183016fb1bb297c9c3d2c0606e6a66f9901
SHA1 (patch-bb) = 7312d496cdde7f619eff6bfef6025fe9be14529d
SHA1 (patch-bc) = a9e8bfef2d224fb78b78b761f611226444d488e6
From: "David A. Holland" <dholland@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/41423 CVS commit: pkgsrc/chat/centerim
Date: Sun, 19 Dec 2021 02:44:20 +0000
Module Name: pkgsrc
Committed By: dholland
Date: Sun Dec 19 02:44:20 UTC 2021
Modified Files:
pkgsrc/chat/centerim: Makefile distinfo
Added Files:
pkgsrc/chat/centerim/patches: patch-src_icqface.cc
Log Message:
chat/centerim: patch out bogus code
From momomo@lavabit.com in PR 41423 (years ago)
To generate a diff of this commit:
cvs rdiff -u -r1.62 -r1.63 pkgsrc/chat/centerim/Makefile
cvs rdiff -u -r1.11 -r1.12 pkgsrc/chat/centerim/distinfo
cvs rdiff -u -r0 -r1.1 pkgsrc/chat/centerim/patches/patch-src_icqface.cc
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/41423: CenterIM unusable: ignores several keys (like enter)
Date: Sun, 19 Dec 2021 02:49:00 +0000
On Mon, Feb 08, 2010 at 08:35:01AM +0000, momomo@lavabit.com wrote:
> - if((intptr_t) c < 100) c = 0;
> + /* if((intptr_t) c < 100) c = 0; */
I committed that, thanks. (Sorry it took ten years...)
Looking at the current code I'm guessing that most of the horrors jdc
saw in conscommon.c have been removed upstream, as there are signs of
it having been simplified (e.g. a loop that executes only once) and
it's now not doing anything all that horrible.
Since it's been updated a couple times in the past ten years (only a
couple, but even so...) I propose to close this PR; if it's still not
working, please file a new one.
--
David A. Holland
dholland@netbsd.org
State-Changed-From-To: open->closed
State-Changed-By: dholland@NetBSD.org
State-Changed-When: Sun, 19 Dec 2021 02:52:56 +0000
State-Changed-Why:
I committed the patch, and the package has been updated since jdc
discovered horrors, and it looks probable that the horrors were
cleansed upstream. That is likely to fix the reported problems;
if not, or if more problems appear, please file a new PR.
>Unformatted:
(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.