curses mystical error output

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • skip@pobox.com

    #1

    curses mystical error output

    I have a fairly simple curses app which is giving me this error:

    addstr() returned ERR

    I'm trapping it and continuing. I can see that *some* of my addstring calls
    succeed. This one happens to be

    screen.addstr(r ow, 39, "|")

    where row is 3. After the screen was cleared two other calls to addstr
    succeeded. What's wrong with this one? Can I get a more heplful message
    out of curses somehow? FWIW, I am running on a Mac from a Terminal.app
    window which tells me it's an xterm. I am ssh'd into a Solaris host with a
    command like

    DISPLAY=:0 ssh -C -Y -X remote-host

    I tried simplifing the ssh command down to

    ssh remote-host

    but I still get the error. I tried setting TERM to "ansi", "vt100" and
    "dumb". Ansi and vt100 failed with the same error. Curses refused to run
    on a "dumb" terminal. I tried commenting out the particular line (it's just
    drawing a boundary between the left and right halves of the window, so I can
    live without it). A later addstr call fails.

    Any suggestions? Do I need to followup addstr with some sort of periodic
    flush() call?

    Thx,

    Skip
Working...