On 27 Aug 2008, at 9:13 pm, Memo Akten wrote:

At the start of the plugin (in enableExecution) I use the code:

- (void) loadCardXMLData {
        NSString *dataPath = @"/data.plist";
cardsLoadedData = [NSDictionary dictionaryWithContentsOfFile: dataPath]; // cardsLoadedData = [[NSDictionary alloc] initWithContentsOfFile: dataPath];
        if(cardsLoadedData) {
                NSLog(@"*** SUCCESSFULLY LOADED %@", dataPath);
        } else {
                NSLog(@"*** COULD NOT LOAD %@", dataPath);
        }
}

If I use the convenience route (with no release in disableExecution) I get a freeze (I need to force quit QC) as soon as I enable the plugin. If I use the alloc route (and release in disableExecution) everything works fine. Is this normal behaviour? or could it be QC related?



Just thinking aloud, but I wonder if the plug-in is being executed outside of the app's autorelease pool stack? The freeze could be because autorelease is being called but there's no pool available. You could try adding a pool to the top of the code to see if it stabilises it, e.g. on the first line of the above:

NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init];

If that turns out to be the case, you may need to move your code elsewhere within the plugin (I'm not familiar with the plug-in system in Cocoa so I'm not sure what you should be doing here) or else set up a pool on entry.

hth,

Graham
_______________________________________________

Cocoa-dev mailing list ([email protected])

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to