Code by Kevin
   


About
Code by Kevin: Programming, code, business, and other pursuits

Your Host
Kevin Walzer, software developer.

Home

Subscribe to RSS Feed
Get a syndicated feed of my weblog.

Archives
2010
2009
2008
2007
2006

Categories
Business
Software
General

        home
Tue, 20 Oct 2009

Tk-Cocoa and input managers

I now have no doubt that my Tk-Cocoa applications are "real" Cocoa applications: they are susceptible to input managers.

An input manager is an arbitrary Cocoa extension that loads into every running Cocoa application (because it loads into the Mac's Objective-C runtime). Originally designed to allow for alternate methods of text input, it is now more commonly used to inject code into any or all Cocoa applications. While this is most frequently done to add functionality to a specific application, it can pose a security risk for your system by allowing the injection of malicious code into the Cocoa runtime. Even if it doesn't do that, input managers can also have unintended side effects on random Cocoa applications.

I got a bug report about such an unintended side effect over the weekend. An application user mentioned to me that Manpower was crashing. After reviewing some crash logs provided by the user, I found a reference to an input manager installed on the user's system, along with the error message "GC capability mismatch." ("GC capability" refers to whether an application was compiled with garbage collection--a method of automated memory management--or not; Tk-Cocoa makes use of GC, but many Cocoa applications do not.)

This is an example of an unintended side effect. Neither Manpower nor Tk-Cocoa itself had anything to do with the input manager in question, but because the input manager was exposed to every application that makes use of the Cocoa runtime, this conflict caused Manpower to crash. I advised the user that, as with AppleScript osax extensions, the only solution is to uninstall the input manager.

So, if you're experiencing crashes with any of my applications, input manager conflicts are something else to look for. Ah, the brave new world of Cocoa!

[/software] permanent link