In one class, I define an NSMutableArray with getters and setters:
@interface ArrayClass : NSObject {
NSMutableArray *array;
}
@property (nonatomic, strong) NSMutableArray *array;
@end
Then within the implementation file, I alloc init the mutable array:
#import "ImageUploader.h"
@implementation ArrayClass
@synthesize array;
- (id)init {
self = [super init];
if (self != nil) {
NSLog(@"ArrayClass inited");
array = [[NSMutableArray alloc] init];
}
return self;
}
@end
Then I initialize an instance of this class from another class:
ArrayClass *arrayClass = [[ArrayClass alloc] init];
[arrayClass.array addObject:image];
NSUInteger count = [arrayClass.array count];
NSLog(@"%@", count);
But when I try to add an object to the mutable array, the app crashes and Xcode 4.3 shows:

Removing the addObject call makes the app run fine. What am I doing wrong that would cause the app to crash?
This is wrong:
You want:
%@is used to specify that the argument is an object. However, an NSUInteger is a primitive value, not an object. You use%ufor unsigned ints.