Mailing Lists: Apple Mailing Lists

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

EXC_BAD_ACCESS help



I've got an EXC_BAD_ACCESS error on line #2 below.


 // retainCount = 1

NSLog(@"patternCount retainCount = %d", [patternCount retainCount]);

// EXC_BAD_ACCESS on this line ...

NSLog(@"patternCount = %d", [patternCount intValue]);


patternCount is of type NSNumber* which is held inside my DataPattern object
that I've sent over YAMessageQueue (async from one thread to the main gui
thread) to a controller.


@interface DataPattern : NSObject {

...

NSNumber *patternCount;

NSNumber *otherData;

}


I believe I've got my memory management correct and that my retain counts
are good.


I've successfully sent hundreds of objects from a thread to my app's main
thread over YAMessageQueue asynchronously (and vice versa), but then every
once in a while my app crashes. Although it could be any member of my
DataPattern object that shows the EXC_BAD_ACCESS problem, the other members
of that object are fine when I debug them.


Anyone have an idea?
_______________________________________________

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



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.