bug: lbaction causes launch of 'referenced' applications

General discussions about LaunchBar
Post Reply
nathanael
Posts: 6
Joined: Fri Jul 25, 2014 11:10 pm

bug: lbaction causes launch of 'referenced' applications

Post by nathanael » Sat Jul 26, 2014 12:35 am

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.

nathanael
Posts: 6
Joined: Fri Jul 25, 2014 11:10 pm

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

Post by nathanael » Sat Jul 26, 2014 12:37 am

the lbaction is installed to ~/Library/Application Support/Launchbar/Actions btw.

nathanael
Posts: 6
Joined: Fri Jul 25, 2014 11:10 pm

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

Post by nathanael » Sat Jul 26, 2014 1:24 am

also happens in LB 6.0.2

manfred
Objective Development
Objective Development
Posts: 561
Joined: Sat Jul 31, 2010 9:47 am
Location: Vienna
Contact:

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

Post by manfred » Mon Jul 28, 2014 2:35 pm

We are looking into this issue!

nathanael
Posts: 6
Joined: Fri Jul 25, 2014 11:10 pm

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

Post by nathanael » Mon Jul 28, 2014 2:43 pm

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).

manfred
Objective Development
Objective Development
Posts: 561
Joined: Sat Jul 31, 2010 9:47 am
Location: Vienna
Contact:

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

Post by manfred » Mon Jul 28, 2014 2:59 pm

Great, thanks for the links!

marco
Objective Development
Objective Development
Posts: 64
Joined: Mon Jul 28, 2014 3:00 pm
Location: Vienna, Austria

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

Post by marco » Tue Jul 29, 2014 10:20 am

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.

Post Reply