[TC 11.57 64-bit] AV error when starting an internal association starting an em_command calling itself

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

Moderators: petermad, Stefan2, Hacker

Post Reply
User avatar
white
Power Member
Power Member
Posts: 6941
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

[TC 11.57 64-bit] AV error when starting an internal association starting an em_command calling itself

Post by *white »

I had created an internal association calling an em_ command.

I was working too fast while changing the em_ command, and I was fooled by the Down key opening the Command Browser when editing the command field. And I ended up with the command calling itself. So had a command like em_test that executed the command em_test. When calling it via the context menu, an AV error occurred:
---------------------------
Total Commander 11.57
---------------------------
Unknown Run-Time error : 202.
Unknown Run-Time error : 202
Windows 11 Professional 10.0 (Build 26200), base: 0400000

Please report this error to the Author, with a description
of what you were doing when this error occurred!

Stack trace (x64):486D82
846FDB 845CD6 851A33 84C557 845CD6 851A33 84C557 845CD6
851A33 84C557 845CD6 851A33 84C557 845CD6 851A33 84C557

Press Ctrl+C to copy this report!
Continue execution?
---------------------------
Ja Nee
---------------------------
I found this in HISTORY.TXT:
02.09.16 Fixed: em_commands can now contain other em_commands also as the first command - added better detection of recursion where a command would call itself (32/64)
But it seems that a detection of an em_command that only has a command calling itself wasn't implemented.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 53145
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: [TC 11.57 64-bit] AV error when starting an internal association starting an em_command calling itself

Post by *ghisler(Author) »

I cannot reproduce the access violation. However, I can reproduce that Total Commander hangs in an endless loop when I define a recursive command like this:
[em_recurse]
cmd=em_recurse
I didn't expect anyone to do that. I will add more recurse detection. Here it works:
[em_recurse]
cmd=em_recurse,cm_SrcByName
Author of Total Commander
https://www.ghisler.com
User avatar
white
Power Member
Power Member
Posts: 6941
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Re: [TC 11.57 64-bit] AV error when starting an internal association starting an em_command calling itself

Post by *white »

ghisler(Author) wrote: 2026-05-10, 08:52 UTC I cannot reproduce the access violation.
Did you try with 64-bit TC?
ghisler(Author) wrote: 2026-05-10, 08:52 UTC I didn't expect anyone to do that.
I did not expect me to do it either. As I said, I made a mistake when working fast and was fooled by the undocumented function of the Down key when editing the command field.
User avatar
white
Power Member
Power Member
Posts: 6941
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Re: [TC 11.57 64-bit] AV error when starting an internal association starting an em_command calling itself

Post by *white »

10.05.26 Fixed: Prevent recursion when an em_command calls itself, e.g. usercmd.ini [em_recurse] cmd=em_recurse (32/64)
Tested OK with TC 11.57a pre1 32-bit and 64bit.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 53145
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: [TC 11.57 64-bit] AV error when starting an internal association starting an em_command calling itself

Post by *ghisler(Author) »

Please re-check with Total Commander 11.57a RC1!
Author of Total Commander
https://www.ghisler.com
User avatar
white
Power Member
Power Member
Posts: 6941
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Re: [TC 11.57 64-bit] AV error when starting an internal association starting an em_command calling itself

Post by *white »

Tested OK using TC 11.57a rc1 32-bit and 64bit.

Moderator message from: white » 2026-05-20, 12:25 UTC

Moved topic
» from TC11.x bug reports (English) to TC Fixed bugs
Post Reply