$ /Applications/TotalFinder.app/Contents/MacOS/TotalFinder
2014-08-13 10:00:25.399 TotalFinder[4830:507] agent v1.6.6 started (TotalFinder)
2014-08-13 10:00:25.400 TotalFinder[4830:507] Unable to acquire lock TotalFinder. Another instance of /Users/daddy/Library/Application Support/.TotalFinderAgent.lock Agent is running => exit
$ /Applications/TotalFinder.app/Contents/MacOS/TotalFinder
2014-08-13 10:01:41.855 TotalFinder[4845:507] agent v1.6.6 started (TotalFinder)
2014-08-13 10:01:44.043 TotalFinder[4845:507] requesting injection into com.apple.finder[4826]
2014-08-13 10:01:44.591 TotalFinder[4845:507] the Finder process is terminated - nothing to do
TF-1.6.3 and TF-1.6.5 working fine - reinstalled TF-1.6.3.
Very strange… I have also just experienced this. I just upgraded to TF 1.6.6 and all was working just fine until I logged out then back in again. Now I see the same error messages when running from Terminal.
Ok, guys. I have found the problem. It was introduced in 1.6.6. It will be fixed in 1.6.7.
Historically TotalFinder (and TotalTerminal) do not hook into Finder binary immediately after injection request. They give binary some time (typically 2 seconds) because of some edge-case situations for example when binary has been just lunched during startup and is busy doing window restoration or similar init operation it is not good to mess around with TotalFinder swizzling at this point.
This has been working pretty well, but there were two issues:
some applescript utilities expect TotalFinder to be ready after issuing injection event (not eventually after few seconds)
the delay was effective every time, even for injection into already running binary
In 1.6.6 I decided to make injection event instant and implement this delay logic in TotalFinder.app (agent) which is responsible for sending injection events when you launch it (or relaunch it). And also to make it smarter: agent should check how old the app is and apply delay only if the app was just launched few moments ago. This would solve both #1 and #2.
This should be working fine. But for delay I did one technical mistake. I was caching NSRunningApplication instance to reuse it later. This is not working properly. When timer fired, the instance was already in some bad state and reported that process has been terminated (but it was not).
The solution is not to cache NSRunningApplication instances, but cache plain old process identifiers and lookup NSRunningApplication instance dynamically.
I tested it myself under clean 10.8, 10.9 and 10.10 systems. But I would be glad if you guys could test it too. TotalFinder should launch after installation and after next system reboot.
My conclusion is that the bug was there all the time, but it got exposed when I changed the code. For example 1.6.6 works fine under 10.8. It simply does not expose same behaviour as under 10.9 and 10.10.
TF-1.6.7 again working as usual, that means simply great, on my Mountain Lion, Mavericks and Yosemite Beta installations.
Thanks, Antonin, for your restless work and quick response.
Tom