• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Weird printing and Core Data crash
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: Weird printing and Core Data crash
      • From: mmalcolm crawford <email@hidden>
    • Re: Weird printing and Core Data crash
      • From: Shaun Wexler <email@hidden>
  • Prev by Date: Re: What framework & language is good for an old C++ mule.
  • Next by Date: Re: How to find the name of the tab view item if you have one of its sub-views(sub-sub-views)?
  • Previous by thread: Re: Can I have two modal windows?
  • Next by thread: Re: Weird printing and Core Data crash
  • Index(es):
    • Date
    • Thread