Invalid attach tabs list

May 20, 2008
453
2
#1
Code:
TCC  20.11.40 x64   Windows 10 [Version 6.3.14393]
TCC Build 40   Windows 10 Build 14393
If I right click on the session tab bar and select 'Attach tabs' from the menu, the list of sessions I can attach includes prior TCC sessions that have been exited. Selecting one of those sessions results in this error:

upload_2017-2-20_12-12-27.png

Tim
 

rconn

Administrator
Staff member
May 14, 2008
10,614
97
#2
Interesting bug / behavioral change, but it's in Windows, not in TCC. Conhost is holding on to the window (same issue as another thread about closing TCC). It works in Windows 7, but not in (at least recent) Windows 10. I suspect it's one of the changes Microsoft made in the console to support the Linux environment; I'll trace through what CMD is doing and try to replicate it.
 

rconn

Administrator
Staff member
May 14, 2008
10,614
97
#3
I finally found a workaround (included in 20.11.43, already uploaded) that will close the controlling conhost when TCC is closed. (Windows would eventually reuse the conhost sessions, but it could take a while and use up a lot of memory.)

Of course, the workaround only affects TCC sessions -- the numerous conhost sessions created & left hanging by other Windows apps (like Visual Studio) are still going to be with you, at least until you update to a more recent Windows 10 version.
 
#4
Of course, the workaround only affects TCC sessions -- the numerous conhost sessions created & left hanging by other Windows apps (like Visual Studio) are still going to be with you, at least until you update to a more recent Windows 10 version.
Would someone please be more precise about this Win10 version stuff? I'll get a new computer soon, probably from Dell. Will it have a sufficiently new Win10? If not, will Windows update bring me up to a sufficiently new Win10? If not, how do I update to a sufficiently new Win10?
 
May 20, 2008
453
2
#5
It doesn't quite work yet with build 43. If I detach the TCC tab and then type the exit command, it hangs and doesn't close the TCC window. While it is hung, the TCC session appears in the list of tabs that can be attached, though attempting to attach it has the same invalid handle message in AttachConsole.

Also, while the detached TCC session is hung on exit, it changes to conhost in the tasklist.
upload_2017-3-6_17-51-26.png
 

rconn

Administrator
Staff member
May 14, 2008
10,614
97
#6
Would someone please be more precise about this Win10 version stuff? I'll get a new computer soon, probably from Dell. Will it have a sufficiently new Win10? If not, will Windows update bring me up to a sufficiently new Win10? If not, how do I update to a sufficiently new Win10?
The Windows Creators Update (which is scheduled for April) does not have the dangling conhost bug. You can get the preview now, or wait until it's officially released.
 

rconn

Administrator
Staff member
May 14, 2008
10,614
97
#7
It doesn't quite work yet with build 43. If I detach the TCC tab and then type the exit command, it hangs and doesn't close the TCC window. While it is hung, the TCC session appears in the list of tabs that can be attached, though attempting to attach it has the same invalid handle message in AttachConsole.
Not reproducible here (Windows 10 build 15048). And that's a sufficiently obscure thing to be doing that I'm not going to spend any effort on it when Microsoft will be updating everybody soon.

Do you have a TCEXIT?
 
May 20, 2008
453
2
#10
Awesome! 20.11.46 fixes the issue; tested on both Win10x64 and Win7x86. I did another edge case test. Before closing the detached session, I opened the attach tabs dialog to see the session in the list. Once the dialog/list was displayed, I then exited in the detached tab. Clicking ok back in the attach dialog briefly showed another tab that immediately disappeared. But, no errors. Yeah!
 
May 20, 2008
453
2
#11
I should add: This release fixed some other Win7x86 issues also. The desktop icon is now created by the installer. Before, it appeared and disappeared. Now, it stays. I can start TCMD from the shortcut and don't have to start TCC first and then start TCMD and attach the first session. And, finally, registration worked and no longer crashes. Good release. Thanks.