Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: file scan results in EX_BAD_ACCESS



Hi Mike,

I was stepping through until it hits the while loop. A breakpoint after that shows that the error appears to occur at [pool release]. After canceling the thread stack message, there is a #0 thread that reads: NSDecrementExtraRefCountWasZero., followed by 1 [NSObject release] and a gazillion [DataParser dealloc]s.

int main(int argc, char *argv[])
{
	NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
	DataParser *dp = [DataParser parserWithRecordDelim: @"\r"];
	NSString *path, *fullPath, *fileName;
	NSFileManager *NSFm;
	NSMutableArray *data;
	
	fileName = @"cleaner data.txt";
	NSFm = [NSFileManager defaultManager];
	path = @"<< path name here >>";
	fullPath = [path stringByAppendingPathComponent: fileName];
	
	data = [dp parseFileAtPath: fullPath];
	[pool release];
	
	return 0;
}

On Aug 31, 2007, at 7:16 PM, Mike Blaguszewski wrote:

On Aug 31, 2007, at 7:06 PM, Daniel Child wrote:

The only code that gets called is what you saw, however.

Have you tried stepping through your code line-by-line in the Xcode debugger? I agree with Shawn that it's pretty likely an infinite recursion problem.


--
Mike Blaguszewski / Cocoa Hacker / Ambrosia Software, Inc.




_______________________________________________

Cocoa-dev mailing list (email@hidden)

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/email@hidden

This email sent to email@hidden
References: 
 >file scan results in EX_BAD_ACCESS (From: Daniel Child <email@hidden>)
 >Re: file scan results in EX_BAD_ACCESS (From: "Shawn Erickson" <email@hidden>)
 >Re: file scan results in EX_BAD_ACCESS (From: Daniel Child <email@hidden>)
 >Re: file scan results in EX_BAD_ACCESS (From: Mike Blaguszewski <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.