Weird printing and Core Data crash
Weird printing and Core Data crash
- Subject: Weird printing and Core Data crash
- From: Andrew Merenbach <email@hidden>
- Date: Mon, 13 Mar 2006 14:34:45 -0800
Hi, all. I have a program that constructs a summary, in a text view,
of the contents of two table views--then prints the generated text
view. I keep getting crashes, however, when the print dialog comes
up. It appears that to be something within one of my methods, which
is implemented in a custom NSArrayController subclass (but I was
getting a crash even when it was an independent method):
/* begin code -- we want an array of strings, which will be joined
elsewhere, from a table view */
- (NSArray *)combinedContentsArray {
NSMutableArray *rowStrings = [[NSMutableArray allocWithZone:[self
zone]] init];
NSEnumerator *e = [[self arrangedObjects] objectEnumerator];
id proxyObj;
while (proxyObj = [e nextObject])
[rowStrings addObject:[proxyObj valueForKey:@"contents"]];
return [rowStrings autorelease];
}
/* end code */
Here's what the debugger says:
#0 0xfffeff20 in objc_msgSend_rtp
#1 0x928c3b88 in NSPopAutoreleasePool
#2 0x93689354 in -[NSApplication run]
#3 0x93779e68 in NSApplicationMain
#4 0x00017fac in main at main.m:13
The enumerated entities in the array controller all contain a
"contents" string attribute.
Replacing the return value of my above code with an arbitrary
[NSArray arrayWithArray:...] causes the problem to go away, thus
isolating it (I hope) to within the method somewhere.
Many thanks,
Andrew
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden