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

Take Command crashes with TELNET

Discussion in 'Support' started by gschizas, Sep 13, 2011.

  1. gschizas

    Joined:
    May 30, 2008
    Messages:
    81
    Likes Received:
    0
    When opening telnet.exe (the standard Windows' telnet client), it's quite often (not *all* times, but there seems to be a pattern) that, when exiting telnet, TCMD.EXE crashes (TCMD window goes to white and closes). This does not happen if you detach the related TCC (or cmd) tab.

    This is probably some TELNET problem, rather than a TCMD problem, but the fact remains that all of TCMD closes. I've tried the same pattern with Console2 (an open source project with similar functionality as TCMD shell), and it crashed as well.

    I think the pattern is opening telnet to some (open) port, but of a protocol that doesn't echo back (I'm using RDP for my example).

    From tcc.exe (standalone)

    (my input is in red, special stuff in green)


    C:\Users\GSchizas>telnet localhost 3389

    (screen clears)

    (Ctrl+])

    Welcome to Microsoft Telnet Client
    Escape Character is 'CTRL+]'
    Microsoft Telnet>q


    Same thing in tcc.exe under tcmd shell


    C:\Users\GSchizas>telnet localhost 3389

    (screen clears)

    (Ctrl+])

    (screen clears again!)

    q(blindly)

    (TCMD closes)



    I have attached Visual Studio to TCMD.EXE, TCC.EXE and TELNET.EXE before this happens but there wasn't anything meaningful in the output (just a series of program exits with code 0). I've also tried it without plugins (same result).

    TCMD 13.0.19 x64 on Windows 7 SP1 64-bit
     
  2. rconn

    rconn Administrator
    Staff Member

    Joined:
    May 14, 2008
    Messages:
    10,090
    Likes Received:
    85
    This is a known Windows bug -- the crash is actually occurring in conhost, not TCMD (or Console2). The Microsoft Telnet app is changing the console buffer after it starts (which certainly isn't necessary; I suspect the developer just thought it would be "cool"). That will confuse TCMD (which has no way of knowing that a console app has switched to a different buffer). But conhost *really* doesn't like it (and crashes) when a hidden console app switches its buffer.

    The only workarounds are either to (1) run Telnet in a stand-alone console window, or preferably (2) switch to another Telnet app (like Putty).

    (Or you could wait for Microsoft to fix conhost and/or Telnet, but it might be a looooooonnnnnggg wait ...)
     
  3. gschizas

    Joined:
    May 30, 2008
    Messages:
    81
    Likes Received:
    0
    I supsected as much...

    Unfortunately PuTTY is not console based. Any idea where I could find a console telnet replacement? (or, do you have one under wraps? :))

    Thanks anyway :)
     
  4. gschizas

    Joined:
    May 30, 2008
    Messages:
    81
    Likes Received:
    0
    I'm an idiot. I never knew about plink (which is indeed console based - although it doesn't seem to handle ANSI escape sequences very well)
     
  5. Rod Savard

    Joined:
    May 26, 2008
    Messages:
    481
    Likes Received:
    3
    If this is solely a telnet/conhost bug, why does it not crash when run independently (not attached to TCMD)?
     
  6. Charles Dye

    Charles Dye Super Moderator
    Staff Member

    Joined:
    May 20, 2008
    Messages:
    3,372
    Likes Received:
    40
    Because when it's run independently, the console window isn't hidden.
     
  7. Rod Savard

    Joined:
    May 26, 2008
    Messages:
    481
    Likes Received:
    3
    Gotcha, thanks...
     
  8. vefatica

    Joined:
    May 20, 2008
    Messages:
    8,129
    Likes Received:
    33
    On Tue, 13 Sep 2011 16:42:31 -0400, gschizas <> wrote:

    |Unfortunately PuTTY is not console based. Any idea where I could find a console telnet replacement? (or, do you have one under wraps? :))

    There's good old Kermit ... about as full-featured as will ever be. But I can't
    comment on the last twelve years of its development (or lack of development).
     
  9. rconn

    rconn Administrator
    Staff Member

    Joined:
    May 14, 2008
    Messages:
    10,090
    Likes Received:
    85
    Because conhost only crashes if the console is hidden when the buffer is
    changed. You rarely run a stand-alone TCC console hidden!
     
  10. dbartt

    Joined:
    May 29, 2008
    Messages:
    36
    Likes Received:
    0
    There is TTERMPRO from hp.vector.co.jp/authors/VA002416/teraterm.html. It
    hasn't been updated since 1999 but version 2.3 for Win 95/NT does work under
    current Windows versions.

    Dennis
     

Share This Page