Apparently with iTunes 10.6.3 on Mac OS X 10.6.8, the NSIconRefImageRep that is returned by -iconfForFile: for iTunes fails to encode itself for NSCopying. As a workaround, convert it to TIFF and back before using it.
Fixes #16046
1.1 --- a/Source/ESiTunesPlugin.m Sat Jul 21 15:46:26 2012 +0200
1.2 +++ b/Source/ESiTunesPlugin.m Sat Jul 21 23:09:34 2012 +0200
1.3 @@ -566,7 +566,14 @@
1.4 MVMenuButton *button = [[MVMenuButton alloc] initWithFrame:NSMakeRect(0,0,32,32)];
1.5
1.6 //configure the popup button and its menu
1.7 - [button setImage:[[NSWorkspace sharedWorkspace] iconForFile:iTunesPath]];
1.8 +
1.9 + /* XXX Remove after 10.6: Apparently with iTunes 10.6.3 on Mac OS X 10.6.8, the NSIconRefImageRep
1.10 + * that is returned by -iconfForFile: for iTunes fails to encode itself for NSCopying. Make a copy
1.11 + * here via -TIFFRepresentation to avoid this bug.
1.12 + * rdar://11930126 http://trac.adium.im/ticket/16046
1.13 + */
1.14 + NSData *imageData = [[[NSWorkspace sharedWorkspace] iconForFile:iTunesPath] TIFFRepresentation];
1.15 + [button setImage:[[[NSImage alloc] initWithData:imageData] autorelease]];
1.16 [self createiTunesToolbarItemMenuItems:menu];
1.17
1.18 NSToolbarItem * iTunesItem = [AIToolbarUtilities toolbarItemWithIdentifier:KEY_TRIGGERS_TOOLBAR