robertwijas / UISS

UIAppearance Stylesheets
MIT License
1.23k stars 80 forks source link

Crash. #9

Closed caiguo37 closed 11 years ago

caiguo37 commented 11 years ago

Log: objc[56776]: cannot form weak reference to instance (0xbfffd768) of class NSStackBlock

Line 112 of class UISSVariablesPreprocessor cause this crash.

__block __weak ResolveBlock resolveBlock = ^(NSString *n) {
    if ([unresolved.allKeys containsObject:n]) {
        id value = [unresolved objectForKey:n];
        [unresolved removeObjectForKey:n];

        [self setVariableValue:value forName:n withResolveBlock:resolveBlock];
    }

    return [weakSelf getValueForVariableWithName:n];
};

After remove __weak,the crash disapplear,but the compiler start to complain retain cycle.

iOSDevil commented 11 years ago

same here, iOS 5.1