I'm developing iphone app. Yesterday I updated my xcode to to newest version and clean build folders (deleted it), then created new class (nothing special):
@interface EnemyFactory : NSObject {
}
+(Enemy *)properReferenceForName: (NSString *) name;
@end
Implementation is trivial and not important. What is happening now: I've got sth like this:
Enemy *tempEnemy = [EnemyFactory properReferenceForName:@"enemyname"];
But code never reaches function properReferenceForName. I've got EXC_BAD_ACCESS with stack like this:
0 0x02a95e2b in realizeClass
1 0x02a96dad in _class_getNonMetaClass
2 0x02a90eb0 in _class_initialize
3 0x02a961f6 in prepareForMethodLookup
4 0x02a8f6c9 in lookUpMethod
5 0x02a8f836 in _class_lookupMethodAndLoadCache
6 0x02a9dad3 in objc_msgSend
7 0x0000595d in -[GameLayer newEnemy:] at GameLayer.m:368
Before update. Xcode gives no warning or error. Symbols are declared. What is interesting though is that: everything goes fine, when I debug step by step whole invocation... I'm stuck with it for 8 hours.
Update 1:
[[EnemyFactory alloc] init]
throws the same error
Update 2:
When I do this:
[EnemyFactory alloc]
in some master class during initialization everything goes in flying colours.