Solved [TC 10.52rc1] cm_exit 1 shows the instance # [2] in the Title of the TC window

Bug reports will be moved here when the described bug has been fixed

Moderators: white, Hacker, petermad, Stefan2

Post Reply
User avatar
Elwin_Ransom
Junior Member
Junior Member
Posts: 38
Joined: 2022-07-31, 18:14 UTC
Location: Perelandra

Solved [TC 10.52rc1] cm_exit 1 shows the instance # [2] in the Title of the TC window

Post by *Elwin_Ransom »

After restarting the 64-bit version of TC 10.52rc1 with cm_exit 1, the instance number [2] appears in the title of TC window.

— This happens all the time on my working copy of TC with many plugins installed.
— On a clean copy of TC without plugins, it happens much less often.
— On the 32-bit version, it doesn't happen — the window title remains clean after restarting.
Last edited by Elwin_Ransom on 2022-10-10, 22:53 UTC, edited 1 time in total.
User avatar
petermad
Power Member
Power Member
Posts: 14739
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: [TC 10.52rc1] cm_exit 1 shows the instance # [2] in the Title of the TC window

Post by *petermad »

I have seen it happen occasionally on 64bit TC on Windows 7
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50b4 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: [TC 10.52rc1] cm_exit 1 shows the instance # [2] in the Title of the TC window

Post by *ghisler(Author) »

Unfortunately this cannot always be avoided. TC has to call the ShellExecuteEx command while it is still running, so the new instance may be there faster than TC can close itself.
Author of Total Commander
https://www.ghisler.com
User avatar
white
Power Member
Power Member
Posts: 4594
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Re: [TC 10.52rc1] cm_exit 1 shows the instance # [2] in the Title of the TC window

Post by *white »

ghisler(Author) wrote: 2022-10-10, 13:23 UTC Unfortunately this cannot always be avoided.
Unless you add a parameter to set the instance number and always set the instance number of the restarted TC to the same instance number of the currently running TC.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: [TC 10.52rc1] cm_exit 1 shows the instance # [2] in the Title of the TC window

Post by *ghisler(Author) »

That would be strange if instance 3 restarted and the other instances had been closed in the meantime...
Author of Total Commander
https://www.ghisler.com
Fla$her
Power Member
Power Member
Posts: 2244
Joined: 2020-01-18, 04:03 UTC

Re: [TC 10.52rc1] cm_exit 1 shows the instance # [2] in the Title of the TC window

Post by *Fla$her »

ghisler(Author) wrote: 2022-10-10, 13:23 UTCUnfortunately this cannot always be avoided. TC has to call the ShellExecuteEx command while it is still running, so the new instance may be there faster than TC can close itself.
If you can't even fix it, then the point in restarting in this way with resident additions tied to the process disappears altogether. It's better to use scripts.
Overquoting is evil! 👎
User avatar
white
Power Member
Power Member
Posts: 4594
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Re: [TC 10.52rc1] cm_exit 1 shows the instance # [2] in the Title of the TC window

Post by *white »

ghisler(Author) wrote: 2022-10-10, 13:43 UTC That would be strange if instance 3 restarted and the other instances had been closed in the meantime...
You can check for that too.
User avatar
Elwin_Ransom
Junior Member
Junior Member
Posts: 38
Joined: 2022-07-31, 18:14 UTC
Location: Perelandra

Re: [TC 10.52rc1] cm_exit 1 shows the instance # [2] in the Title of the TC window

Post by *Elwin_Ransom »

Anyway, I would prefer to use scripts if there is no way to avoid the instance number in the title bar.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: [TC 10.52rc1] cm_exit 1 shows the instance # [2] in the Title of the TC window

Post by *ghisler(Author) »

I found a better solution: Start the new instance only once the old window has been destroyed. It may make the restart a bit slower, but there will be no problem with instance numbers.
Author of Total Commander
https://www.ghisler.com
Fla$her
Power Member
Power Member
Posts: 2244
Joined: 2020-01-18, 04:03 UTC

Re: [TC 10.52rc1] cm_exit 1 shows the instance # [2] in the Title of the TC window

Post by *Fla$her »

ghisler(Author) wrote: 2022-10-10, 18:34 UTCI found a better solution
I would say the only true one. Or do you distinguish a window from a process?
Overquoting is evil! 👎
User avatar
petermad
Power Member
Power Member
Posts: 14739
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: [TC 10.52rc1] cm_exit 1 shows the instance # [2] in the Title of the TC window

Post by *petermad »

history.txt wrote:10.10.22 Fixed: CM_EXIT with restart parameter now waits with launching a new instance until the window has been deleted (32/64)
Confirmed fixed in TC 10.52rc2 - I have not been able to provoke a new instance number with cm_Exit 1 :-)
Last edited by petermad on 2022-10-10, 23:07 UTC, edited 1 time in total.
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50b4 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
Elwin_Ransom
Junior Member
Junior Member
Posts: 38
Joined: 2022-07-31, 18:14 UTC
Location: Perelandra

Re: [TC 10.52rc1] cm_exit 1 shows the instance # [2] in the Title of the TC window

Post by *Elwin_Ransom »

Very nice. Thanks for the fix.
Post Reply