Page 1 of 1

bug: lbaction causes launch of 'referenced' applications

Posted: Sat Jul 26, 2014 12:35 am
by nathanael
During the start of LB6 (but not if i start indexing by hand) each application used by an applescript in a lbaction gets started. A simple lbaction with an "on run" handler containing "tell application "DEVONthink Pro..." triggers the start of DEVONthink shortly after I start LaunchBar. Note: LBAssociatedApplication is com.apple.Safari in that case, not DEVONthink. The "on run" handler doesn't get executed at that point btw (a "display dialog" is not shown).

This problem happens with all applications, an lbaction to switch my Skype status for example triggers the launch of Skype. I'm on 6.1 nightly.

Re: bug: lbaction causes launch of 'referenced' applications

Posted: Sat Jul 26, 2014 12:37 am
by nathanael
the lbaction is installed to ~/Library/Application Support/Launchbar/Actions btw.

Re: bug: lbaction causes launch of 'referenced' applications

Posted: Sat Jul 26, 2014 1:24 am
by nathanael
also happens in LB 6.0.2

Re: bug: lbaction causes launch of 'referenced' applications

Posted: Mon Jul 28, 2014 2:35 pm
by manfred
We are looking into this issue!

Re: bug: lbaction causes launch of 'referenced' applications

Posted: Mon Jul 28, 2014 2:43 pm
by nathanael
thank you! please let me know if I can be of any assistance.
You can find the DEVONthink-based example here:
https://dl.dropbox.com/s/g72gjc1nktwpvwd/index.html
another example for Skype is this one:
https://dl.dropbox.com/s/u1819x24juz7sj1/index.html
(this one triggers the launch of Skype - I think the DEVONthink one is a better example though, as the Skype example contains com.skype.skype as LBAssociatedApplication, the DEVONthink example doesn't reference DEVONthink in that way).
Both lbactions aren't mine, I downloaded them from a link somewhere in the forum (or maybe from a github repo somewhere).

Re: bug: lbaction causes launch of 'referenced' applications

Posted: Mon Jul 28, 2014 2:59 pm
by manfred
Great, thanks for the links!

Re: bug: lbaction causes launch of 'referenced' applications

Posted: Tue Jul 29, 2014 10:20 am
by marco
Thanks for the links to the actions to reproduce this.
We found the problem: When indexing Actions, LaunchBar analyzes the action’s Info.plist to find out which kinds of arguments an Action accepts (essentially, text and/or files). For AppleScripts, LaunchBar also checks which handlers are implemented because e.g. accepting a text argument means that the script must implement a handler named “handle_string”. It seems like asking the system about which handlers a given AppleScript implements, any apps used by the script get launched (as is the case when the script is compiled in AppleScript Editor).

This additional check wasn’t documented and could lead to inconsistencies between the Action’s Info.plist and its script, so we’ll simply remove that in an upcoming LaunchBar version, which will then fix the issue of launching apps every time such an Action is (re–)indexed.