Your getter method is recursively calling itself, because
self.myArray
is translated by the compiler to
[self myArray]
This causes a stack overflow (!) eventually.
Inside a setter or getter method of a property, you have to access the associated instance variable instead, e.g.
- (NSArray *)myArray
{
return ([_myArray count] == 0) ? nil : _myArray;
}