Take Command crashes with TELNET

May 30, 2008
80
0
Gerakas, Greece
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
 

rconn

Administrator
Staff member
May 14, 2008
12,344
149
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 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 ...)
 
May 30, 2008
80
0
Gerakas, Greece
This is a known Windows bug

I supsected as much...

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).

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 :)
 
May 30, 2008
80
0
Gerakas, Greece
Unfortunately PuTTY is not console based.

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)
 
May 26, 2008
537
4
If this is solely a telnet/conhost bug, why does it not crash when run independently (not attached to TCMD)?
 
May 20, 2008
11,400
99
Syracuse, NY, USA
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).
 
May 29, 2008
36
0
> Unfortunately PuTTY is not console based. Any idea where I could find a console
> telnet replacement? (or, do you have one under wraps? )

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
 
Similar threads
Thread starter Title Forum Replies Date
S Take Command crashes for aliases with length > 1015 Support 1
I TCC crashes on gosub after long command line Support 0
Dmitry L. Kobyakov How to? How to remove the record of the old version of the Take Command? Support 5
D Can alias pass parameters to for command? Support 3
samintz How to? Search for %(command) in Help? Support 1
T VIEW only works from command line Support 14
rconn News Take Command / TCC / CMDebug / TCC-RT v28 Released Support 0
T Take Command 28: Lua reports version 5.4.0 (5.4.3 expected) Support 0
Jay Sage WAD Possible Bug With OPTION Command With @FILE Support 5
rconn News Take Command / TCC / CMDebug / TCC-RT 27.01.24 uploaded Support 0
J Take command does not start on Windows 10 Support 3
vefatica `Back quotes` - command line vs. batch file Support 5
Jay Sage WAD Failure of Alias Command with /Z Option Support 14
Phileosophos Is there any way to open the Take Command options dialog from the command line? Support 8
Phileosophos Command-line Editing Shortkeys That Fail Support 6
fpefpe How to? free (internal) command Support 0
rconn News Take Command / TCC / CMDebug / TCC-RT 27.01.23 uploaded Support 0
T How to? retain command history across reboot? Support 6
rconn News Take Command / TCC / CMDebug / TCC-RT v27.01 Build 22 Uploaded Support 0
Jay Sage Bug With Flow Control and/or Command Grouping Support 2
GermanDirk How to? EVENTLOG Command with simple User Rights not functional Support 4
Jay Sage Take Command Is Too Fast! Support 4
Jay Sage Comparison of IF with Command Group and IFF Support 6
D Open Windows 10 Photos app from command line Support 11
rconn News Take Command / TCC / CMDebug / TCC-RT 27.0.21 uploaded Support 0
rconn News Take Command / TCC / CMDebug / TCC-RT 27.0.20 uploaded Support 0
U Can not get/start Take Command gui Support 1
rconn News Take Command / TCC / CMDebug / TCC-RT 27.0.19 Support 0
S Increasing Font Point Size in Command Tabs Support 2
mfarah Fixed The DATE command produces the wrong error message. Support 1
vefatica Command name mix-up Support 3
FreezerBurnt "Missing SETLOCAL" when initializing Visual Studio Command Prompt. Support 9
E How to? Closing desktop created by DESKTOP command Support 10
rconn News Take Command / TCC / CMDebug / TCC-RT v27.0.18 Support 0
K Take Command fox XP? Support 7
Joe Caverly Documentation Replace internal command with LIBRARY command Support 0
fpefpe How to? command echo in title line/bar Support 2
U Command help on file names Support 5
vefatica Command line DO with no closing parenthesis? Support 9
vefatica Command history search is off Support 7
H How to? How can I say "if the command separator is not ~ then setdos /C~" Support 8
N Command execution slows down in TCC Prompt after a while Support 6
R Long commands retrieved from command history have blank line when wrapped Support 20
jpeni Take Command Language Examples Support 1
rconn News Take Command / TCC / CMDebug / TCC-RT 26.02.41 Uploaded Support 0
fpefpe winfr command Support 4
Dmitry L. Kobyakov Fixed The SETARRAY /R command works incorrectly with cyrillic files Support 2
M Selecting test "off by one" problem in Take command Support 4
Dmitry L. Kobyakov Documentation Error in the Help: the WINDOW command Support 0
R How to? Open Take Command at current folder Support 7

Similar threads