Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

tabs auto closing on startup in take cmd 34

Jan
51
0
I am a long time user of take command, since the early 90's.
I have a TCMD.INI file that I copy from my current tcmd to the next, now from tcmd 33 to tcmd 34. I put this in "C\ProgramData\JP Software\Take Command 34"
In this file I define 8 tabs.

This has worked for years.
Oddly, when I start tcmd 34, I can see all the tabs open, and then they're auto closed, leaving only 1 when tcmd 34 finishes its startup. I tried a repair install and that didn't work. I tried uninstalling and reinstalling and that didn't work. I defined a 9th tab, and this did not change this unwanted behavior.
For now, I'm continuing to use tcmd 33, which works fine for me.

Why are my tcmd tabs opening and then automatically closing upon startup?
What do I have to do to stop this?
 
It's unclear from your description whether the tab windows are closing because TCMD is closing them prematurely, or because the console apps are closing & TCMD is closing the tab window because there's no app left.

Please send your TCMD.INI and TCSTART (if any) to [email protected].

Are the console apps that were in the tab windows closed, or are they still on the desktop after the tab is closed? (Or still hidden after the tab is closed?) You can add the "TabClosePrompt=YES" option to the TCMD section of your TCMD.INI. That will make TCMD display a popup window with the exit code of the console session when a tab window is closed.

Do you have anything in the Windows Event log?

If the tab windows are TCC sessions, can you add to your TCEXIT (or create one if you don't have one already) that does something like a MSGBOX so you can see if the TCC session is exiting?
 
Last edited:
The console apps from take command 34 are all closed and gone. This does not affect those from take command 33.
I looked at the windows event log, but it's too confusing for me.
I added TabCloseProompt to my INI file
I see Process <5 digit #> exit code <long #> just before each tab closes
I don't have a TCEXIT. Would would be the exact command I could add to the newly created one?
 
The exit code for TCC should be a number 0 - 255. If it's something else then something is seriously wrong.

When you say the console apps are all gone - you looked in Task Manager and there aren't any TCC sessions running?

Regarding TCEXIT - just put in something like "PAUSE Exiting TCC". That will at least show whether TCC is exiting normally or if something is crashing it (like a third-party code injection).
 
Interestingly, now I'm getting a different exit message:
Process 57028 exit code 259
Process 57692 exit code 259
Process 55365 exit code 259
Process 43612 exit code 259
Process 51124 exit code 259
Process 57655 exit code 259
Process 50416 exit code 259
Process 55352 exit code 259

In task manager, I see Take Command and one instance of tcc. This matches what I see, as take command 34 remains open with 1 tab running tcc. I do not see a pause message, so these windows are crashing. When I "X" out take command with it's one tab running tcc, I do not see a pause message from tcc when it's closed. I do see pause messages when I type "exit" in tcc.

When I open Take Command v 33, I see more in task manager

Also, I have no issues with Take Command versions 32, 31, 30, 29 and 28, all of which are install on my computer.
There's something about v34 that's not happy. Whatever code is being injected, it would be injected on all earlier versions and not crash them. And if something injected is crashing tcc, why does it leave one tab running tcc open?
 
<smacking hand on forehead>
Oh, you mean using cmd.exe. Duh
I did that by adding another tab to take command 34, and I got the same result.
I tried using windows explorer to start several stand alone tcc's, and that worked. If that helps
 
I don't know if this will help. But ...
I am able to use vim from within a take command v33 tab running tcc, without it distorting the text upon exiting vim.
I am not able to do this from take command v34. When I try, using the one open tab running tcc, tcc prompt is not placed at the bottom of the screen, but somewhere in the beginning of a middle row, and the rest of that row still contains the text that was there before I started vim.
 
What do your tab definitions look like? If they contain "/C" then whatever shell is specified is quite likely to close automatically.
 
My TCMD.INI is exactly the same across all take commad versions on my computer, from v 28 to 34. Only v 34 is not working as expected.

There is no "/C" in my definitions, FWIW.
 
Can you post your tab definitions so we can try to reproduce the problem?
 
FWIW, exit code 259 (STILL_ACTIVE) is what you'd get if you called GetExitCodeProcess() and the process hasn't terminated.

Also FWIW, I've found mention of this happening on older CPUs that don't support POPCNT. Is your CPU old?
 
No. It's about 3 yrs old, has AMD Ryzen 9 5950X CPU and Windows 11 23H2. Win 11 24H2 is too buggy for me to install now.
 
I can reproduce this. I copied sections [Tab1] through [Tab9] from @drrob1's INI file to mine (I had no [TabN] sections) and edited the paths to make them realistic. When I started TCMD34, all the extra tabs exited. When I ran d:\tc33\tcmd.exe @d:\tc34\tcmd.ini all the extra tabs did not exit. From the bottom up I commented the [TabN] sections, one at a time, and tested ... same behavior ... OK in TCMD33, not OK in TCMD34. From here, it looks like a bug in starting anything specified with a [TabN] section.
 
I created a couple dozen startup tabs and started TCMD 50 times. I saw two failures where a tab window closed immediately after opening. Tracked that down to a Windows console API bug that appears to be a timing error inside Windows. (The API doesn't reliably recognize a valid console handle if the console was just created.)

Not sure if this is what is causing your problem, but please download this test build and let me know what happens:

 
The test build helped.

Edit: P.S., I composed this an hour ago and forgot to press "post reply".
 
Back
Top