[ python-Bugs-1464056 ] curses library in python 2.4.3 broken

SourceForge.net noreply at sourceforge.net
Sun Apr 9 14:14:55 CEST 2006


Bugs item #1464056, was opened at 2006-04-04 18:47
Message generated for change (Comment added) made by anthonybaxter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1464056&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Python Library
Group: Python 2.4
Status: Open
Resolution: None
Priority: 5
Submitted By: nomind (vnainar)
Assigned to: Nobody/Anonymous (nobody)
Summary: curses library in python 2.4.3 broken

Initial Comment:
My python programs using curses  library do not work
with version 2.4.3.Even the 'ncurses.py ' demo program
in the Demo/curses directory does not work correctly.
The problem seems to be in the 'panels' library


----------------------------------------------------------------------

>Comment By: Anthony Baxter (anthonybaxter)
Date: 2006-04-09 22:14

Message:
Logged In: YES 
user_id=29957

The buildbot boxes don't show this problem.

You might need to rebuild a Python with -g and unstripped to
get a useful backtrace.


----------------------------------------------------------------------

Comment By: Jan Palus (atler_)
Date: 2006-04-09 20:51

Message:
Logged In: YES 
user_id=1497957

$ ldd /usr/lib/python2.4/lib-dynload/_curses.so
        libncursesw.so.5 => /usr/lib/libncursesw.so.5
(0x7004c000)
        libpthread.so.0 => /lib/libpthread.so.0 (0x70080000)
        libc.so.6 => /lib/libc.so.6 (0x700e4000)
        libdl.so.2 => /lib/libdl.so.2 (0x70228000)
        libtinfow.so.5 => /usr/lib/libtinfow.so.5 (0x7023c000)
        /lib/ld-linux.so.2 (0x70000000)

...
Program received signal SIGSEGV, Segmentation fault.
0x7063947c in hide_panel () from /usr/lib/libpanel.so.5
gdb) bt
#0  0x7063947c in hide_panel () from /usr/lib/libpanel.so.5
#1  0x706254b8 in ?? () from
/usr/lib/python2.4/lib-dynload/_curses_panel.so
#2  0x706254b8 in ?? () from
/usr/lib/python2.4/lib-dynload/_curses_panel.so
Previous frame identical to this frame (corrupt stack?)

It seems that only programs using panel library cause
segfaults (all other demos run fine except ncurses.py),
sorry for a mistake in a last post.

loewis: I'm not sure I understand second point. What excatly
should be changed in setup.py?

----------------------------------------------------------------------

Comment By: Matt Fleming (splitscreen)
Date: 2006-04-09 20:46

Message:
Logged In: YES 
user_id=1126061

Cannot reproduce on Gentoo. All the files in the Demo/curses
directory run fine.

----------------------------------------------------------------------

Comment By: Martin v. Löwis (loewis)
Date: 2006-04-09 20:29

Message:
Logged In: YES 
user_id=21627

I can't reproduce any of this on Debian;
Demo/curses/ncurses.py runs fine. Can you please
1. run ldd on _curses.so, and report the output, and
2. edit setup.py, removing the lines that deal with ncursesw,
3. atler_: produce a gdb backtrace on the time of the crash,
4: vnainar: please report what you mean by "does not work".
Does it erase your hard disk? turn off the machine? Paint
things blue instead of red?

----------------------------------------------------------------------

Comment By: Jan Palus (atler_)
Date: 2006-04-09 20:06

Message:
Logged In: YES 
user_id=1497957

I confirm the problem. Every program using curses library
segfaults and there's only one error before it happens:

...
import curses # directory /usr/share/python2.4/curses
import curses # precompiled from
/usr/share/python2.4/curses/__init__.pyc
dlopen("/usr/lib/python2.4/lib-dynload/_curses.so", 2);
import _curses # dynamically loaded from
/usr/lib/python2.4/lib-dynload/_curses.so
import curses.wrapper # precompiled from
/usr/share/python2.4/curses/wrapper.pyc
import curses.panel # precompiled from
/usr/share/python2.4/curses/panel.pyc
dlopen("/usr/lib/python2.4/lib-dynload/_curses_panel.so", 2);
import _curses_panel # dynamically loaded from
/usr/lib/python2.4/lib-dynload/_curses_panel.so
Traceback (most recent call last):
  File "ncurses.py", line 273, in ?
    curses.wrapper(demo_panels)
  File "/usr/share/python2.4/curses/wrapper.py", line 49, in
wrapper
_curses.error: nocbreak() returned ERR

I'm running Linux (PLD) with Python 2.4.3 and ncurses 5.5.
With Python 2.4.2 everything worked fine.

----------------------------------------------------------------------

Comment By: nomind (vnainar)
Date: 2006-04-06 15:38

Message:
Logged In: YES 
user_id=1493752

Sorry my original post was incomplete. I am running
slackware 10.2 (linux kernel 2.6).The python library was
tested with ncurses 5.4 and ncurses 5.5( the latest
release). All  programs run OK with 2.4.1.As I said ,the 
curses demo that comes with the Python distributions runs OK
with 2.4.1 but 
not with 2.4.3 - I have both on my machine


----------------------------------------------------------------------

Comment By: Martin v. Löwis (loewis)
Date: 2006-04-05 08:16

Message:
Logged In: YES 
user_id=21627

What do you mean by "do not work"? What operating system and
what curses implementation are you using?

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1464056&group_id=5470


More information about the Python-bugs-list mailing list