To reproduce:
1. In Configuration->Misc enter new Alias: testhang
2. Use Choose command dialog, go to usercmd.ini section, press New..., enter em_testhang
3. In next window define "Command:", put there the same: em_testhang
4. After saving this, go to Total Commander's command line, and execute either alias testhang or command em_testhang -> TC interface is locked, only way to close TC is a Task Manager.
I suggest to show an error when user tries to create em_ command which executes itself, and also an error if such command or alias to it executed from commandline/button/menu etc (will help if user edited wincmd and usercmd.ini manually).
Hang on executing usercommand defined to itself
Moderators: Hacker, petermad, Stefan2, white
Hang on executing usercommand defined to itself
Donate for Ukraine to help stop Russian invasion!
Ukraine's National Bank special bank account:
UA843000010000000047330992708
Ukraine's National Bank special bank account:
UA843000010000000047330992708
- ghisler(Author)
- Site Admin
- Posts: 50550
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Sorry, it's practically impossible to catch all such problems. You could make chains of 100 commands calling themselves in a loop. But you should be able to abort with ESC.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
Exactly and this is why YOU Doctor Shark should use the thing between your ears and not blame TC for your mistakesghisler(Author) wrote:Sorry, it's practically impossible to catch all such problems. You could make chains of 100 commands calling themselves in a loop. But you should be able to abort with ESC.

You could at least make a basic check when user adds such command in Configuration (step 3 in my example): if user entered in Command field the same text as the user command name, then don't make OK button active.ghisler(Author) wrote:Sorry, it's practically impossible to catch all such problems. You could make chains of 100 commands calling themselves in a loop.
Either it didn't work or I didn't wait long enough with my example from first post.ghisler(Author) wrote:But you should be able to abort with ESC.
Donate for Ukraine to help stop Russian invasion!
Ukraine's National Bank special bank account:
UA843000010000000047330992708
Ukraine's National Bank special bank account:
UA843000010000000047330992708