Obtenga ilustraciones de iTunes para la canción actual con ScriptingBridge

He estado tratando de descubrir cómo obtener la obra de arte de iTunes para la canción que se está reproduciendo actualmente con el puente de secuencias de comandos. He llegado a un punto en el que funciona para algunas canciones, pero para otras, obtengo un SIGABRT. No estoy seguro de cuál podría ser el problema, por lo que cualquier ayuda sería muy apreciada. Esto es lo que tengo hasta ahora:

iTunesApplication * iTunes = [SBApplication applicationWithBundleIdentifier:@"com.apple.iTunes"];
NSImage *songArtwork;
iTunesTrack *current = [iTunes currentTrack];
iTunesArtwork *artwork = (iTunesArtwork *)[[[current artworks] get] lastObject];
if(artwork != nil)
  songArtwork = [artwork data];
else
  songArtwork = [NSImage imageNamed:@"Image.tiff"];

NSMenuItem *artworkMenuItem = [[NSMenuItem alloc] initWithTitle:@"" action:NULL keyEquivalent:@""];
[songArtwork setSize:NSMakeSize(128, 128)];
[artworkMenuItem setImage:songArtwork];
[Menu insertItem:artworkMenuItem atIndex:0];

I para algunas canciones funciona, y muestra la obra de arte muy bien en el elemento del menú, pero para otras me sale un SIGABRT en la línea:

[songArtwork setSize:NSMakeSize(128, 128)];

La salida de la consola es la siguiente:

2011-08-12 23:13:20.094 SongViewer[2146:707] -[NSAppleEventDescriptor setSize:]:     unrecognized selector sent to instance 0x102827f70
2011-08-12 23:13:20.095 SongViewer[2146:707] An uncaught exception was raised
2011-08-12 23:13:20.096 SongViewer[2146:707] -[NSAppleEventDescriptor setSize:]: unrecognized selector sent to instance 0x102827f70
2011-08-12 23:13:20.097 SongViewer[2146:707] (
0   CoreFoundation                      0x00007fff86f11986 __exceptionPreprocess + 198
1   libobjc.A.dylib                     0x00007fff8b04cd5e objc_exception_throw + 43
2   CoreFoundation                      0x00007fff86f9d5ae -[NSObject doesNotRecognizeSelector:] + 190
3   CoreFoundation                      0x00007fff86efe803 ___forwarding___ + 371
4   CoreFoundation                      0x00007fff86efe618 _CF_forwarding_prep_0 + 232
5   SongViewer                          0x0000000100002a83 -[IPMenulet awakeFromNib] + 4483
6   CoreFoundation                      0x00007fff86f089e1 -[NSObject performSelector:] + 49
7   CoreFoundation                      0x00007fff86f08962 -[NSSet makeObjectsPerformSelector:] + 274
8   AppKit                              0x00007fff8d9d9c27 -[NSIBObjectData nibInstantiateWithOwner:topLevelObjects:] + 1245
9   AppKit                              0x00007fff8d9d01b9 loadNib + 322
10  AppKit                              0x00007fff8d9cf6b6 +[NSBundle(NSNibLoading) _loadNibFile:nameTable:withZone:ownerBundle:] + 217
11  AppKit                              0x00007fff8d9cf5d1 +[NSBundle(NSNibLoading) loadNibFile:externalNameTable:withZone:] + 141
12  AppKit                              0x00007fff8d9cf514 +[NSBundle(NSNibLoading) loadNibNamed:owner:] + 364
13  AppKit                              0x00007fff8dc42355 NSApplicationMain + 398
14  SongViewer                          0x0000000100001882 main + 34
15  SongViewer                          0x0000000100001854 start + 52
)
2011-08-12 23:13:20.098 SongViewer[2146:707] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NSAppleEventDescriptor setSize:]: unrecognized selector sent to instance 0x102827f70'
*** First throw call stack:
(
0   CoreFoundation                      0x00007fff86f11986 __exceptionPreprocess + 198
1   libobjc.A.dylib                     0x00007fff8b04cd5e objc_exception_throw + 43
2   CoreFoundation                      0x00007fff86f9d5ae -[NSObject doesNotRecognizeSelector:] + 190
3   CoreFoundation                      0x00007fff86efe803 ___forwarding___ + 371
4   CoreFoundation                      0x00007fff86efe618 _CF_forwarding_prep_0 + 232
5   SongViewer                          0x0000000100002a83 -[IPMenulet awakeFromNib] + 4483
6   CoreFoundation                      0x00007fff86f089e1 -[NSObject performSelector:] + 49
7   CoreFoundation                      0x00007fff86f08962 -[NSSet makeObjectsPerformSelector:] + 274
8   AppKit                              0x00007fff8d9d9c27 -[NSIBObjectData nibInstantiateWithOwner:topLevelObjects:] + 1245
9   AppKit                              0x00007fff8d9d01b9 loadNib + 322
10  AppKit                              0x00007fff8d9cf6b6 +[NSBundle(NSNibLoading) _loadNibFile:nameTable:withZone:ownerBundle:] + 217
11  AppKit                              0x00007fff8d9cf5d1 +[NSBundle(NSNibLoading) loadNibFile:externalNameTable:withZone:] + 141
12  AppKit                              0x00007fff8d9cf514 +[NSBundle(NSNibLoading) loadNibNamed:owner:] + 364
13  AppKit                              0x00007fff8dc42355 NSApplicationMain + 398
14  SongViewer                          0x0000000100001882 main + 34
15  SongViewer                          0x0000000100001854 start + 52
)
terminate called throwing an exception(gdb) 

¡Si alguien tiene alguna idea de lo que podría estar mal, por favor avíseme!

Respuestas a la pregunta(2)

Su respuesta a la pregunta