By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,675 Members | 2,255 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,675 IT Pros & Developers. It's quick & easy.

curses mystical error output

P: n/a
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(row, 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
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?


May 2 '07 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.