Page 1 of 1

Crash in Help if macro has lots of keys assigned

Posted: Thu 09 Jan, 2014 10:41
by cyberwolf
I discovered that if i have a macro that has a lot of keys assigned to the same command then when i call help and search for "!Macro:Viewer!" (which shows the macros assigned to the viewer) then FAR crashes, before that it occupies a lot of memory (over 2Gb memory even though FAR usually uses less than 40mb).

I think the problem comes from the fact that the help tries to display the keys before the description but the line containing the keys is way longer than the help window itself.

Here's an example of a macro that crashes (based on the lua used by MultiView plugin):

Code: Select all

Macro {
area="Viewer";
key="AltEnd AltHome AltDown AltLeft AltRight AltUp CtrlAltLeft CtrlAltRight CtrlJ CtrlR CtrlSpace Multiply Space";
description="test macro"
action=function()
end;
}
The workaround is to modify the macro and break up the "key" part in smaller parts so the "key" text doesn't become too long.

P.S. i didn't test in other areas (for example for Editor or Shell), but i think the same problem is present regardless of the macro's area setting.

Re: Crash in Help if macro has lots of keys assigned

Posted: Thu 09 Jan, 2014 12:41
by Shmuel
cyberwolf wrote:Here's an example of a macro that crashes
To be precise, it is the help viewer that crashes, since it makes a wrong assumption about lengths of macro keys.

Re: Crash in Help if macro has lots of keys assigned

Posted: Fri 10 Jan, 2014 11:27
by Shmuel

Re: Crash in Help if macro has lots of keys assigned

Posted: Fri 10 Jan, 2014 11:38
by cyberwolf
Thanx, i didn't know exactly where and how to report the bug that's why i used the forum.

P.S. i forgot to say that the bug is in FAR 3 but you got it from the description.