Page 1 of 1

File Comparator: Cannot Send Message To Plugin

Posted: 07 Nov 2015, 18:40
by therube
File Comparator:
Cannot send message to File Comparator plugin.
Ensure 'Load plugin on Altap Salamander start' option is set in File Comparator configuration.
Now I do NOT have that set.
(Don't ask me, why? Just always been that way, & everything has always been fine, so no need to change ;-).)

I have a little batch file I use that calls, fcremote.exe, MI_COMPARE.BAT (Media Info Compare):

Code: Select all

:: MediaInfo _ command_com line COMPARATOR with CALL to Salamander's File Comparator

@echo	off
path	%PATH%;C:\DEV\CODECS\MediaInfo_CL\;


echo	FILE 1:  >  %OUT1%
echo	%1  >> %OUT1%
echo.   >> %OUT1%
echo	FILE 2:  >  %OUT2%
echo	%2  >> %OUT2%
echo.   >> %OUT2%

:: originally, the above echo were not there, & if for some reason the MI failed,
::       like from a too long PATH, kind of thing
::    both the files ending up with nothing in them, so they would compare as
::    "equal", & they "were", except it was comparing against "nothing" instead
::    of actually returned valid results of the MI command
:: anyhow, MI does have exit codes; 0=success, 1=failure, but for some reason
::    depending on, not sure, file order (which one "first") or whatever, again
::    valid result may not have been given
:: with the echo's, at the least there will be some diffs to the files, so the
::    compare, while still not of relevant data, at least will "not compare" &
::    so will point out diffs, & then it's like, ah, what's going on here
:: so at least you know something is up, instead of "falsely" being told, oh,
::    your files compare, exactly [wrong]

C:\DEV\CODECS\MediaInfo_CL\MediaInfo_CL.exe  %1  >>  %OUT1%
:: if	errorlevel 1 echo FILE 1: MEDIAINFO DETECTED FAILURE,  %1  >>  %OUT1%
:: set	errorlevel=

C:\DEV\CODECS\MediaInfo_CL\MediaInfo_CL.exe  %2  >>   %OUT2%
if	errorlevel 1 echo FILE 2: MEDIAINFO DETECTED FAILURE,  %2  >>  %OUT2%
:: for some reason, these (TWO) errorlevel checks were not always returning
:: expected results, so i changed to the 'echo' method (above) which "forces"
:: diffs into %OUT_%, so a failure won't compare equally

"C:\Altap Salamander 306\plugins\filecomp\fcremote.exe"  %OUT1%   %OUT2%

Now 99% of the time, everything works fine, but every so often, I run into that "Cannot send" message.
And with that, 99% of the time, I'll go into Plugins Manager, File Comparator, Test, & with only that things again work fine, 99% of the time.
And then there is 1% of the time, where i have to go through that a number of times, or maybe fully close Salamander & restart it before it works as expected.

Note that I only run into this when using my batch file (& fcremote.exe), not when using File Comparator directly in Salamander.
Salamander is virtually always open. System rarely restarts, but does sleep.
Now while I may, I do, initiate my batch file (via Send To:) from within Salamander, more often it is initiated from outside of Salamander, usually from Everything Search Engine (but in all cases, Salamander had already been open).

Not really concerned, but I have run into, enough... Just thought I'd mention.