'Expanded string is too large' when invoking external tool

Discussion of bugs and problems found in Altap Salamander. In your reports, please be as descriptive as possible, and report one incident per report. Do not post crash reports here, send us the generated bug report by email instead, please.
Oli

'Expanded string is too large' when invoking external tool

Post by Oli »

I have added a third-party diff tool in my User Menu and in the Arguments section, I typed:
"$(FileToCompareActive)" "$(FileToCompareInactive)"

...then, when I try to invoke it, I often get the following dialog:

---------------------------
Error
---------------------------
Expanded string is too large.
---------------------------
[OK]
---------------------------

Granted, the string being built is 379 characters long (in this particular case), due to the depth of both paths in the file system:

Code: Select all

"G:\Program Files\Compare It!\wincmp3.exe" "G:\Documents and Settings\Oli\My Documents\basic\org.dyndns.opendemogroup.optimizer\src\org\dyndns\opendemogroup\optimizer\GenericGenerationalGeneticAlgorithm.java" "G:\Documents and Settings\Oli\My Documents\workspace\org.dyndns.opendemogroup.optimizer\src\org\dyndns\opendemogroup\optimizer\GenericGenerationalGeneticAlgorithm.java"
...although copy/pasting the same string in Windows' Start/Run dialog truncates after 260 characters, it DOES work when I paste the string in a Command Shell.

That makes me think MAX_PATH is needlessly getting in the way, at least on my operating system. Speaking of which, this was reproduced on both Windows XP and Windows 2003.

I guess I'll work around this using SUBST or something in the meantime...

- Oli
Petr Solin
ALTAP Staff
ALTAP Staff
Posts: 1112
Joined: 08 Dec 2005, 09:13
Location: Novy Bor, Czech Republic
Contact:

Post by Petr Solin »

There is a limit of MAX_PATH (260) characters. And yes, it can be changed to much bigger number (I think 32768 characters) on XP. I'll make some experiments with it and will patch this in some future version (I'll try 2.52).
User avatar
mdruiter
Posts: 263
Joined: 22 Feb 2006, 15:33
Location: Amsterdam, The Netherlands
Contact:

Re:

Post by mdruiter »

Petr Solin wrote:I'll make some experiments with it and will patch this in some future version (I'll try 2.52).
Too bad it did not work out yet. To WinMerge two files with long full paths (both 138 characters), I still have to move them closer to the root. :(
Petr Solin
ALTAP Staff
ALTAP Staff
Posts: 1112
Joined: 08 Dec 2005, 09:13
Location: Novy Bor, Czech Republic
Contact:

Re: 'Expanded string is too large' when invoking external tool

Post by Petr Solin »

I'm working on it right now, it will be fixed in the first preview build of 2.53.
Post Reply