I've just discovered that my Aperture Edit-plugin crashes when the user selects a photo in Faces instead of in a project. I was wondering if anyone else is seeing the same problem and if there's a known workaround. I've filed a bugreport for this as well: rdar://9261565
Steps to Reproduce:
- Select 1 photo in Faces.
- Open an Edit plugin
- My plugin uses this code to get an editable image id:
NSArray *selectedImages = [_editManager selectedVersionIds];
This is ok. It returns 1 id:
Printing description of selectedImages:
<CFArray 0x118790090 [0x7fff70c8cee0]>{type = immutable, count = 1, values = (
0 : <CFString 0x11253a610 [0x7fff70c8cee0]>{contents = "n0v94HgtT3iMqcATfNj0EA"}
)}
Then it gets the editable image using this line of code:
NSArray *editableImages = [_editManager editableVersionsOfVersions:selectedImages requestedFormat:kApertureImageFormatTIFF8 stackWithOriginal:YES];
Expected Results:
We should get 1 image back.
Actual Results:
The plugin crashes:
2011-04-09 10:26:32.849 Aperture[1050:903] HIToolbox: ignoring exception '*** -[NSCFArray initWithObjects:count:]: attempt to insert nil object at objects[0]' that raised inside Carbon event dispatch
(
0 CoreFoundation 0x00007fff868517b4 __exceptionPreprocess + 180
1 libobjc.A.dylib 0x00007fff87c770f3 objc_exception_throw + 45
2 CoreFoundation 0x00007fff867fb507 -[__NSPlaceholderArray initWithObjects:count:] + 407
3 CoreFoundation 0x00007fff86807911 +[NSArray arrayWithObject:] + 49
4 Aperture 0x0000000100297e4a 0x0 + 4297686602
5 CoreFoundation 0x00007fff8682696c __invoking___ + 140
6 CoreFoundation 0x00007fff8682683d -[NSInvocation invoke] + 141
7 CoreFoundation 0x00007fff86842711 -[NSInvocation invokeWithTarget:] + 49
8 CoreFoundation 0x00007fff8682398c ___forwarding___ + 860
9 CoreFoundation 0x00007fff8681fa68 _CF_forwarding_prep_0 + 232
10 Impression 0x000000012723ce36 -[BCWMImpression finishSave] + 694
11 Impression 0x000000012723cb73 -[BCWMImpression save:] + 1555
12 AppKit 0x00007fff872bee9a -[NSApplication sendAction:to:from:] + 95
13 ProKit 0x0000000100eeaa10 -[NSProApplication sendAction:to:from:] + 100
14 Aperture 0x00000001004dcc13 0x0 + 4300065811
15 AppKit 0x00007fff872bedf9 -[NSControl sendAction:to:] + 94
16 AppKit 0x00007fff8734a76b -[NSCell trackMouse:inRect:ofView:untilMouseUp:] + 1715
17 AppKit 0x00007fff8737b2aa -[NSButtonCell trackMouse:inRect:ofView:untilMouseUp:] + 555
18 AppKit 0x00007fff87349215 -[NSControl mouseDown:] + 624
19 AppKit 0x00007fff8726334f -[NSWindow sendEvent:] + 5409
20 AppKit 0x00007fff87198a86 -[NSApplication sendEvent:] + 4719
21 ProKit 0x0000000100eeb674 -[NSProApplication sendEvent:] + 1634
22 Aperture 0x00000001004eaf10 0x0 + 4300123920
23 AppKit 0x00007fff873a4c8a -[NSApplication _realDoModalLoop:peek:] + 509
24 AppKit 0x00007fff873a27d5 -[NSApplication runModalForWindow:] + 129
25 Aperture 0x0000000100296cf4 0x0 + 4297682164
26 Aperture 0x000000010002ce38 0x0 + 4295151160
27 AppKit 0x00007fff872bee9a -[NSApplication sendAction:to:from:] + 95
28 ProKit 0x0000000100eeaa10 -[NSProApplication sendAction:to:from:] + 100
29 Aperture 0x00000001004dcc13 0x0 + 4300065811
30 AppKit 0x00007fff872e341e -[NSMenuItem _corePerformAction] + 365
31 AppKit 0x00007fff872e3188 -[NSCarbonMenuImpl performActionWithHighlightingForItemAtIndex:] + 121
32 AppKit 0x00007fff87567279 -[NSMenu _internalPerformActionForItemAtIndex:] + 35
33 AppKit 0x00007fff87418f77 -[NSCarbonMenuImpl _carbonCommandProcessEvent:handlerCallRef:] + 136
34 AppKit 0x00007fff872c595c NSSLMMenuEventHandler + 321
35 HIToolbox 0x00007fff86b047f7 _ZL23DispatchEventToHandlersP14EventTargetRecP14OpaqueEventRefP14HandlerCallRec + 1002
36 HIToolbox 0x00007fff86b03d46 _ZL30SendEventToEventTargetInternalP14OpaqueEventRefP20OpaqueEventTargetRefP14HandlerCallRec + 395
37 HIToolbox 0x00007fff86b21a81 SendEventToEventTarget + 45
38 HIToolbox 0x00007fff86b50c35 _ZL18SendHICommandEventjPK9HICommandjjhPKvP20OpaqueEventTargetRefS5_PP14OpaqueEventRef + 387
39 HIToolbox 0x00007fff86b7da0a SendMenuCommandWithContextAndModifiers + 56
40 HIToolbox 0x00007fff86b7d9c2 SendMenuItemSelectedEvent + 101
41 HIToolbox 0x00007fff86b7d8d2 _ZL19FinishMenuSelectionP13SelectionDataP10MenuResultS2_ + 150
42 HIToolbox 0x00007fff86c86a69 _ZL19PopUpMenuSelectCoreP8MenuData5PointdS1_tjPK4RecttjS4_S4_PK10__CFStringPP13OpaqueMenuRefPt + 1618
43 HIToolbox 0x00007fff86c86dc2 _HandlePopUpMenuSelection7 + 665
44 AppKit 0x00007fff87415f29 _NSSLMPopUpCarbonMenu3 + 3710
45 AppKit 0x00007fff874162d9 -[NSCarbonMenuImpl _popUpContextMenu:withEvent:forView:withFont:] + 239
46 ProKit 0x0000000100f7e632 -[NSProCarbonMenuImpl _popUpContextMenu:withEvent:forView:withFont:] + 405
47 ProKit 0x0000000100edcb0b -[NSMenu(ProAdditions) _popUpContextMenu:withEvent:forView:withFont:] + 558
48 Aperture 0x00000001001c1219 0x0 + 4296806937
49 AppKit 0x00007fff8726406f -[NSWindow sendEvent:] + 8769
50 ProKit 0x0000000100f0d6c8 -[NSProWindow sendEvent:] + 236
51 AppKit 0x00007fff87198a86 -[NSApplication sendEvent:] + 4719
52 ProKit 0x0000000100eeb674 -[NSProApplication sendEvent:] + 1634
53 Aperture 0x00000001004eaf10 0x0 + 4300123920
54 AppKit 0x00007fff8712f4da -[NSApplication run] + 474
55 ProKit 0x0000000100eec76a NSProApplicationMain + 268
56 Aperture 0x0000000100002ad9 0x0 + 4294978265
57 Aperture 0x0000000100002918 0x0 + 4294977816
58 ??? 0x0000000000000001 0x0 + 1
)
Thanks,
Steven
Blue Crowbar Software
http://bluecrowbar.com/
Twitter: @bluecrowbar
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Aperture-dev mailing list (Apertu...@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/aperture-dev/aperture-dev%2Bgarchive-9674%40googlegroups.com
This email sent to aperture-dev+...@googlegroups.com