SUMMARY: Curses dumping core on OSF/1 3.0

From: Janet Jackson <janet_at_uniwa.uwa.edu.au>
Date: Wed, 12 Apr 95 15:49:25 +0800

> I'm trying to get ncftp 2.0.2 working on OSF/1 3.0.
> Ncftp 2.x uses curses to implement a full-screen mode.
> After calling your PAGER to view a file, it has you press Return,
> then calls wrefresh() to redisplay the main (non-pager) screen.
> At this point, it SEGVs.
...
> signal Segmentation fault at [wnoutrefresh:184 ,0x3ff80277ac0]
> Source not available
> (dbx) where
> > 0 wnoutrefresh(0x140000318, 0x0, 0x140027580, 0x1, 0x140006dc8) ["../
> ../../../../src/usr/ccs/lib/libcurses/wnoutrfrsh.c":184, 0x3ff80277ac0]
> 1 wrefresh(0x140027580, 0x1, 0x140006dc8, 0x14001da50, 0x12002761c) [
> "../../../../../src/usr/ccs/lib/libcurses/wrefresh.c":67, 0x3ff802715a4]
> 2 RestoreScreen(pressKey = 1) ["Win.c":130, 0x120027618]

People suggested the following potential solutions:

1. Peter Greinig <pjg_at_butlins.co.uk> said that DEC UK had made his company
   a patch for what sounds like the same problem. We have logged a call
   to our local DEC people asking about it, but haven't yet heard anything.
   (They wanted to test the offending code: perhaps sending them
   ncftp-2.0.2.tar.Z.uu was a mistake:-)

   The full text of Peter's message follows my signature.

2. Use ncurses (latest version in ftp://ftp.netcom.com/pub/zm/zmbenhal/ncurses).
   This is a freely distributable implementation of System V style curses.
   However it has not yet been ported to OSF/1, and I don't intend to try
   at this stage. (Also suggested by Peter Greinig.)

3. Steve Madsen <smadsen_at_cs.muohio.edu> suggested commenting out the
   offending code.

   I have ifdefed out the entire body of RefreshScreen() in Win.c,
   by putting #ifndef __osf__ around the existing #ifdef USE_CURSES.
   The whole thing has to be ifdefed out because there are two calls to
   wnoutrefresh(), one in wrefresh() and one in UpdateScreen(), and if
   you remove the first one, the second one crashes.

   Making RefreshScreen() a nullop doesn't seem to affect the operation
   of ncftp! (I guess if you had a pager that left the screen in a mess,
   it might, but it's ok with both "less" and OSF/1 "more".)

   Fortunately, none of the other calls to wnoutrefresh() in ncftp cause the
   crash, at least not in my tests. It's only a problem if touchwin() has
   been done first. This tallies with what Peter says (see below).

BTW I am now onto ncftp 2.0.3.

Many thanks to those who replied.

Janet Jackson
<janet_at_uniwa.uwa.edu.au>

For correspondence not related to UWA work:
----------------------------------------------
Janet Jackson <janet_at_dialix.oz.au>
56 Kennedy Street, Maylands WA 6051, Australia
Phone/Fax +61 9 272 5061

U N I X A N D O P E N S Y S T E M S
   Configuration Technical Writing
     Networking Troubleshooting
Software Development Training
----------------------------------------------

------- Start of Peter's message

        We've had a very similar problem with an in-house application
(running under OSF/1 3.2 - but the libraries should be the same),
which we managed to pin down to the touchoverlap curses function.
This appears to have a nasty memory allocation bug, which doesn't
raise its head until later on (e.g. in a wnoutrefresh call).

        We did spend a long time persuading DEC that this was a
*big* problem to us until the problem eventually got escalated to
the USA. After waiting ages DEC here in the UK finally got the curses
sources over from the states and fixed the problem in about five
minutes! We received a new copy of the library module toucholap.o
which once replaced in the libcurses.so library corrected the problem.

        Since this was only fixed for us about a week ago I don't
suppose the fix will be on general release yet - I presume that
your local DEC office will be able to get it from DEC UK though.
License agreements prohibit me sending you the fix direct!

        One final thing... there is a curses implementation called
ncurses which comes with the Linux distribution, but we haven't tried
it yet.

        Hope the above is of some use...

        Peter Greinig <pjg_at_butlins.co.uk>
        Butlins Holidays Ltd.

------- End of Peter's message
Received on Wed Apr 12 1995 - 03:51:52 NZST

This archive was generated by hypermail 2.4.0 : Wed Nov 08 2023 - 11:53:45 NZDT