Karmic libncurses5.7 problems

Bug #464274 reported by Michael Selig
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
ncurses (Ubuntu)
New
Undecided
Unassigned

Bug Description

Binary package hint: libncurses5

Just upgraded to Karmic, and some legacy ncurses programs broke, using libncurses5 ver 5.7+20090303-2ubuntu2.
Replacing /lib/libncurses.5.7.so with the version from Jaunty fixes the problems.

There seem to be 2 separate problems:

1) Function key "soft labels" don't appear.

2) Ncurses programs seem to use a ridiculous amount of memory depending on locale, when "setlocale(3)" has been called.

I wrote the following C program to demonstrate the problems:

#include <ncurses.h>
#include <locale.h>

int
main()
{
        char label[3];
        int i;

        setlocale(LC_ALL, "");

        slk_init(1);
        initscr();
        cbreak();
        noecho();

        label[0] = 'F';
        label[2] = '\0';
        for (i = 1; i <= 8; i++) {
                label[1] = i + '0';
                slk_set(i, label, 1);
        }
        slk_noutrefresh();
        mvaddstr(0, 0, "The keys should be labelled F1 - F8");
        mvaddstr(2, 0, "Hit any key to continue: ");
        refresh();
        (void) getch();
        endwin();
}

Firstly this program is supposed to display 8 "soft labels" at the bottom of the XTerm (or gnome terminal), but it doesn't. (I have TERM=xterm).

If you unset the LANG environment variable, this program runs with a reasonable amount of memory, but if it is set to say en_AU.UTF-8, the process takes over 300MB!!

Thank you,
Michael Selig

ProblemType: Bug
Architecture: i386
CheckboxSubmission: da87e7fe49c084ad79757aef0e691a47
CheckboxSystem: daed2f3d6643b4a84b4520a2427f8c2b
Date: Fri Oct 30 17:42:18 2009
DistroRelease: Ubuntu 9.10
Package: libncurses5 5.7+20090803-2ubuntu2
ProcEnviron:
 LANGUAGE=en_AU.UTF-8
 PATH=(custom, user)
 LANG=en_AU.UTF-8
 SHELL=/bin/bash
ProcVersionSignature: Ubuntu 2.6.31-14.48-generic
SourcePackage: ncurses
Uname: Linux 2.6.31-14-generic i686

Revision history for this message
Michael Selig (michael-selig) wrote :
Revision history for this message
Thomas Dickey (dickey-his) wrote : Re: [Bug 464274] [NEW] Karmic libncurses5.7 problems

On Fri, 30 Oct 2009, Michael Selig wrote:

> Public bug reported:
>
> Binary package hint: libncurses5
>
> Just upgraded to Karmic, and some legacy ncurses programs broke, using libncurses5 ver 5.7+20090303-2ubuntu2.
> Replacing /lib/libncurses.5.7.so with the version from Jaunty fixes the problems.
>
> There seem to be 2 separate problems:
>
> 1) Function key "soft labels" don't appear.

That sounds like a regression which I fixed in

20090815
         + correct use of terminfo capabilities for initializing soft-keys,
           broken in 20090509 merging.

(iirc, Ubuntu bumped up to 20090803)

--
Thomas E. Dickey
http://invisible-island.net
ftp://invisible-island.net

Revision history for this message
Thomas Dickey (dickey-his) wrote :

On Fri, 30 Oct 2009, Thomas Dickey wrote:

> On Fri, 30 Oct 2009, Michael Selig wrote:
>
>> Public bug reported:
>>
>> Binary package hint: libncurses5
>>
>> Just upgraded to Karmic, and some legacy ncurses programs broke, using libncurses5 ver 5.7+20090303-2ubuntu2.
>> Replacing /lib/libncurses.5.7.so with the version from Jaunty fixes the problems.
>>
>> There seem to be 2 separate problems:
>>
>> 1) Function key "soft labels" don't appear.
>
> That sounds like a regression which I fixed in
>
> 20090815
> + correct use of terminfo capabilities for initializing soft-keys,
> broken in 20090509 merging.
>
> (iirc, Ubuntu bumped up to 20090803)

...however, a quick check of the sample code shows it not displaying
softkeys (will investigate).

--
Thomas E. Dickey
http://invisible-island.net
ftp://invisible-island.net

Revision history for this message
Thomas Dickey (dickey-his) wrote :

On Fri, 30 Oct 2009, Thomas Dickey wrote:

> On Fri, 30 Oct 2009, Thomas Dickey wrote:
>
>> On Fri, 30 Oct 2009, Michael Selig wrote:
>>
>>> Public bug reported:
>>>
>>> Binary package hint: libncurses5
>>>
>>> Just upgraded to Karmic, and some legacy ncurses programs broke, using libncurses5 ver 5.7+20090303-2ubuntu2.
>>> Replacing /lib/libncurses.5.7.so with the version from Jaunty fixes the problems.
>>>
>>> There seem to be 2 separate problems:
>>>
>>> 1) Function key "soft labels" don't appear.
>>
>> That sounds like a regression which I fixed in
>>
>> 20090815
>> + correct use of terminfo capabilities for initializing soft-keys,
>> broken in 20090509 merging.
>>
>> (iirc, Ubuntu bumped up to 20090803)
>
> ....however, a quick check of the sample code shows it not displaying
> softkeys (will investigate).

It was working in 20090803, but re-broken in

20090927
         + completed integrating "sp-funcs" by Juergen Pfeifer in ncurses
           library (some work remains for forms library).

--
Thomas E. Dickey
http://invisible-island.net
ftp://invisible-island.net

Revision history for this message
Thomas Dickey (dickey-his) wrote :

On Fri, 30 Oct 2009, Thomas Dickey wrote:

> On Fri, 30 Oct 2009, Thomas Dickey wrote:
> It was working in 20090803, but re-broken in
>
> 20090927
> + completed integrating "sp-funcs" by Juergen Pfeifer in ncurses
> library (some work remains for forms library).

...runtime size of the sample program looks okay though (a different bug).

--
Thomas E. Dickey
http://invisible-island.net
ftp://invisible-island.net

Revision history for this message
Thomas Dickey (dickey-his) wrote :

This was fixed upstream in

20091031
        + change initialization of "hidden" flag for soft-keys from true to
          false, broken in 20090704 merging (Ubuntu #464274).

Revision history for this message
Michael Selig (michael-selig) wrote :

I note that the original problem I reported in October last year is still present in Lucid.
The only workaround I have is to keep a copy of libncurses5.7.so from Jaunty and replace the Karmic (and now also Lucid) versions.
Why can't the above fix get into the Ubuntu distribution?

Revision history for this message
Joachim Geiler (joachim-geiler) wrote :

Same problem here. Breaks some older progs. Should be fixed for a distribution with LTS state.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.