how to debug -[NSAutoreleasePool dealloc]: Exception ignored
how to debug -[NSAutoreleasePool dealloc]: Exception ignored
- Subject: how to debug -[NSAutoreleasePool dealloc]: Exception ignored
- From: Barry Wilson <email@hidden>
- Date: Mon, 22 Jan 2007 19:06:05 -0800
Greetings,
I am seeing this message in the console:
*** -[NSAutoreleasePool dealloc]: Exception ignored while releasing
an object in an autorelease pool: *** -[_NSZombie forward::] not
overridden!
Can anyone give me an idea how to debug this? Is it an indication of
a real problem?
-Barry Wilson
*******************
Some background which may or may not be relevant:
I'm not new to Cocoa programming but this is the first time I have
really tried to go behind NSDocumentController's back when creating a
new document.
The application I am working on doesn't create new empty documents,
it just imports from another set of files into a document. From that
point forward it behaves normally as any NSDocument subclass would.
But I want to reserve the possibility to create a new empty document
for a later release.
To try and keep things brief, I have overridden
applicationShouldOpenUntitledFile and also
applicationDidFinishLaunching.
In the former I check a preference which (for now) tells it to not
create a new document. In the latter after a check of the same
preference I try to create a new document; import data into it and
then display it. Since it is not well defined what an empty document
would look like I cannot simply let a new document get displayed and
then import data into it afterwards.
In my code I assume that makeUntitledDocumentOfType returns an
autoReleased document and that the NSDocumentController's addDocument
will retain the document. Nothing I have seen in the documentation or
headers gives me a clue. Could my assumptions have something to do
with the above console message or do I look elsewhere?
- (IBAction)import:(id)sender
{
MyFolderSelector *selectPanel = [MyFolderSelector newCustomSelector];
if ([selectPanel selectImportFolder])
{
MyDocument *aDocument = nil;
NSError *outError = nil;
// create a new document and import into it
aDocument = [self makeUntitledDocumentOfType:[self defaultType]
error:&outError];
if (aDocument != nil && outError == nil)
{
if ([aDocument importFromFolder:[selectPanel selectedPath]
error:&outError] && outError == nil)
{
[self addDocument:aDocument];
[aDocument makeWindowControllers];
[aDocument showWindows];
return;
}
}
[self presentError:outError];
}
}
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden