bug-ncurses
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: mvwprintw


From: Bob Rossi
Subject: Re: mvwprintw
Date: Mon, 3 Apr 2006 15:07:19 -0400
User-agent: Mutt/1.5.9i

On Mon, Apr 03, 2006 at 02:53:19PM -0400, Bob Rossi wrote:
> On Mon, Apr 03, 2006 at 02:24:01PM -0400, Thomas Dickey wrote:
> > On Mon, 3 Apr 2006, Bob Rossi wrote:
> > 
> > >>>Hi Thomas,
> > >>>
> > >>>Sorry I haven't got to the bottom of this yet. Hopefully I'll find the
> > >>>problem today. Since the debug doesn't seem to be helping to much here,
> > >>>what's the lowest level function I should be debugging to determine why
> > >>>my screen is getting corrupted?
> > >>
> > >>hmm - go back to my last explanation.  The screen is being corrupted
> > >>because either ncurses or some other code is writing bad data.  If it is
> > >>ncurses, you should be able to see it by tracing the low-level function
> > >>PutAttrChar(), which is actually doing the output to the screen.  The
> > >>trace you sent should have showed PutAttrChar(), but did not.
> > >>
> > >>I'd see why it did not, and fix that (perhaps I misread the trace-level).
> > >>Then see if PutAttrChar() is getting bad data, or making it bad - there's
> > >>one call to PUTC() in tty_update.c which is doing the work.
> > >
> > >OK, I'll do that. As a side note, is ncurses smart enough to only output
> > >to the terminal the info that has changed, instead of the whole screen?
> > 
> > that's what it tries to do - it has an array curscr which records what it 
> > last put on the screen, makes a newscr (the changed screen) from stdscr 
> > and other windows.  But if another program - or another function - writes 
> > to the screen, it can be confused.
> 
> I've also verified via a breakpoint that tty_update.c
>  269  PUTC(CHDEREF(ch), SP->_ofp);    /* macro's fastest... */
> does get called for normal char's like 'a', but not for arrow movements.

Finally. Some more info. The GoTo function looks like a prime suspect to
me. When I hit the right arrow, and I don't get corruption, the
variables in GoTo look like,
  (tgdb) p SP->_curscol
  $1 = 13
  (tgdb) p SP->_cursrow
  $2 = 59
  (tgdb) p row
  $3 = 59
  (tgdb) p col
  $4 = 13

When I'm in GoTo because I hit the right arrow, and I will get
corruption the variables look like,

  (tgdb) p  SP->_curscol
  $9 = 13
  (tgdb) p SP->_cursrow
  $10 = 59
  (tgdb) p row
  $11 = 59
  (tgdb) p col
  $12 = 14

After ncurses calls tty_update.c:854 _nc_flush();
I see the corruption. What do you think? My fault writing data to
stdout or ncurses corruption?

Thanks,
Bob Rossi





reply via email to

[Prev in Thread] Current Thread [Next in Thread]