Hello,
[Adobe Photoshop 12.0.1, CS5 SDK, OS X 10.6.4, Xcode 3.2.4]
I'm converting my plug-in to use Cocoa but I'm experiencing crashes after my plug-in is closed (either by cancelling or when the plug-in operations have been performed).
I have now tried the Dissolve sample from the CS5 SDK which works fine in both 32 (Carbon) and 64-bit (Cocoa) mode. But when I change the 32-bit version to use Cocoa as well [1] I'm seeing similar crashes [2] after closing the plug-in. This is the same crash as reported in point 2 of http://forums.adobe.com/message/2848834 .
Is using Cocoa in 32-bit not supported and should I keep on using Carbon for 32-bit? Is there a problem with the SDK sample or Photoshop?
I also noticed that with 64-bit the plug-in doesn't seem to be unloaded (I see that global variables maintain their value upon a second call). Maybe this was done because without that behaviour 64-bit plug-ins would crash in the same way as the 32-bit ones?
[1] By unchecking usage of DissolveUIMac.cpp, enabling DissolveUIMacCocoa.cpp and changing the "#if __LP64__" in the latter source to "#if 1".
[2] Call stack:
Thread 0 Crashed: Dispatch queue: com.apple.main-thread
0 libobjc.A.dylib 0x94fb6ed7 objc_msgSend + 23
1 com.apple.AppKit 0x970b4c5f -[NSView(NSDrag) _addDragTypesTo:] + 62
2 com.apple.CoreFoundation 0x95f64718 -[NSArray makeObjectsPerformSelector:withObject:] + 600
3 com.apple.AppKit 0x970b4c5f -[NSView(NSDrag) _addDragTypesTo:] + 62
4 com.apple.AppKit 0x970b4aa6 -[NSWindow(NSDrag) _registerDragTypes:] + 121
5 com.apple.Foundation 0x94b14ad5 __NSFireDelayedPerform + 537
6 com.apple.CoreFoundation 0x95f3470b __CFRunLoopRun + 8059
7 com.apple.CoreFoundation 0x95f32094 CFRunLoopRunSpecific + 452
8 com.apple.CoreFoundation 0x95f31ec1 CFRunLoopRunInMode + 97
9 com.apple.HIToolbox 0x95815f9c RunCurrentEventLoopInMode + 392
10 com.apple.HIToolbox 0x95815d51 ReceiveNextEventCommon + 354
11 com.apple.HIToolbox 0x95815bd6 BlockUntilNextEventMatchingListInMode + 81
12 com.apple.AppKit 0x97084a89 _DPSNextEvent + 847
13 com.apple.AppKit 0x970842ca -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 156
14 com.apple.AppKit 0x9704655b -[NSApplication run] + 821
15 com.adobe.Photoshop 0x013c9bcc AWS_CUI_GetVersionComments(OpaqueWindowPtr*, adobe::q::QDocument&, adobe::q::QString&, adobe::q::QAttributeList&, adobe::q::QDocument*, adobe::q::QProject*, long) + 17597284
16 com.adobe.Photoshop 0x013ca7bc AWS_CUI_GetVersionComments(OpaqueWindowPtr*, adobe::q::QDocument&, adobe::q::QString&, adobe::q::QAttributeList&, adobe::q::QDocument*, adobe::q::QProject*, long) + 17600340
17 com.adobe.Photoshop 0x0006e05a 0x1000 + 446554
18 com.adobe.Photoshop 0x0025665f 0x1000 + 2446943
19 com.adobe.Photoshop 0x00256708 0x1000 + 2447112
20 com.adobe.Photoshop 0x00003186 0x1000 + 8582