Under The Microscope

About Audio Hijack Pro And Security Update 2004-06-07

So Audio Hijack Pro (prior to 1.3.1) and Security Update 2004-06-07 don’t get along, and I imagine more then a few people are wondering why. The short answer is, the behavior of LaunchServices changed. The long answer is as follows.

Whenever you click “Hijack” in Audio Hijack Pro, one of the first things it has to do, is figure out what to hijack. If you selected a bookmark file, say “CarTalk.rm”, it asks the system who it’s owner is, gets the answer of “RealPlayer” back, and goes about hijacking RealPlayer. This is done using the LaunchServices call LSGetApplicationForURL.

Now, because there are so many application formats on OS X (Carbon file, Carbon package, Cocoa, mach-o file, AppleScripts, shell scripts, etc), even if you select RealPlayer directly, Audio Hijack Pro asks the system who the owner is anyway to be sure, and gets the answer “RealPlayer” right back as it should.

Until Security Update 2004-06-07 that is. After the Security Update, using LSGetApplicationForURL to figure out what the owner of RealPlayer, or iTunes, or any other application is, now has a tendency to return “NULL” (although sometimes it works, which is odd, but I haven’t researched that much yet). This seems to be a side-effect of the changes to the LaunchServices application “registry” that were made in the update.

So versions of Audio Hijack Pro prior to 1.3.1 would get NULL back from LSGetApplicationForURL, and promptly throw up an “Application Not Found” error message. Which is decent error handling for when it was originally written, but not so anymore. The fix put into place in 1.3.1 is, when AHP gets NULL back, it figures the target must be an application, and tries to launch it (and if it isn’t, you’ll just get a Can Not Launch error message).

As a side note, the bug only affected Audio Hijack Pro 1. Nicecast, Audio Hijack 2 and Audio Hijack Pro 2 are designed such that the you explicitly set a target application, and a target file separately. Which avoids the “figure out what application to use” issue (among other things).

Comments for this post have been closed. Thanks for reading!


Our Software