1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

v16 - cls corrupts output stream

Discussion in 'Support' started by Ian Davids, Nov 19, 2014.

  1. Ian Davids

    Joined:
    Nov 19, 2014
    Messages:
    9
    Likes Received:
    0
    I have a nervous habit of running cls periodically. When running inside take command (not once I detach tcc from TC) If I type cls or cls /c it seems to corrupt the current display placing my cursor at the top of the buffer but not clearing the TC display. I suppose this makes sense as TC is displaying the output while TCC has cleared its buffer, but it is very annoying when it happens.

    Is there any way to avoid this odd screen artifact and keep them in sync?
    Thanks
     
  2. Rod Savard

    Joined:
    May 26, 2008
    Messages:
    481
    Likes Received:
    3
    Weird, I've never experienced that behavior (and I use CLS a lot)
     
  3. rconn

    rconn Administrator
    Staff Member

    Joined:
    May 14, 2008
    Messages:
    9,860
    Likes Received:
    83
    I've never seen (or heard) of anything like that before. A CLS or CLS /S just calls the Windows console APIs to clear the screen, so you'd either have to have something going wrong inside Windows or in your video driver. (Or have another app attached to your console that's blocking or rewriting the screen.)
     
  4. Christian Albaret

    Joined:
    Jul 1, 2008
    Messages:
    154
    Likes Received:
    1
    It happens to me from time to time that CLS leaves a few parts of a few lines, usually close to the top of the display. Seems more likely to happen when there is a lot of output and/or when the computer is busy and/or when I configure the console to a very large number of lines (20,000+). Typing ENTER and getting the prompt as far down as the spurrious text, then executing CLS again usually clears the display for good. CLS/C seems to have less this problem (I aliased to this). Some time ago, I tried to understand if the spurrious text was really remaining in the console, or if it was a discrepancy between the console and TCMD — don't remember if I came to a conclusion.
    On a total, it only affects a rather cosmetic point (after CLS, you anticipate the display should be blank except for the prompt, it is not as if real output were corrupted) during an interactive session.
     
  5. Charles Dye

    Charles Dye Super Moderator
    Staff Member

    Joined:
    May 20, 2008
    Messages:
    3,307
    Likes Received:
    39
    I suggest, as a troubleshooting technique, scrolling down (e.g. by rolling the mouse wheel) until the spurious text is offscreen, the scrolling back up and seeing whether it reappears.

    If forcing a redraw this way makes the incorrect text disappear, then it was correctly erased from the console buffer, but not correctly redrawn on-screen. This might be a video driver issue -- try updating.
     
  6. TEA-Time

    Joined:
    Jun 2, 2008
    Messages:
    282
    Likes Received:
    1
    Detaching the console from TCMD and looking at it standalone would be a good way to check too.
     
  7. Christian Albaret

    Joined:
    Jul 1, 2008
    Messages:
    154
    Likes Received:
    1
    I believe I also did the trick with scrolling.
    It is not so likely to be a problem of an outdated video driver, as the computers in my company are replaced every 2 or 3 years, and some departments produce 3D software. Anyway, I would have to ask the IT department for updating, which would require a more serious problem.
    As said, it doesn't happen often enough for me to bother.
     
  8. Ian Davids

    Joined:
    Nov 19, 2014
    Messages:
    9
    Likes Received:
    0
    Yes when I newline to the bottom of the screen or scroll it clears it up but it's quite annoying. I'm just wondering if anyone else has found a solution as it drives me somewhat bonkers when it happens.

    I am also using the 64 bit version for the first time. Don't think that's related. I have never seen this in TCC before (I was on 15.x for the last year+)
     

Share This Page