objective-cxmlnslogxcode4.4llvm-4.0

Apple LLVM compiler 4.0 freeze xcode and app when print XML (NSLog)


I update for xcode 4.4 (with Apple LLVM compiler 4.0) and since then when i try to print XML in console the xcode and app (in simulator) block user interaction...and i need wait 30seconds or more until finish (i can't do nothing)

i´m using AFNetworking and TBXML, but the problem isn't in parse because if i remove the parse the problem continue.

So i try NSOperationQueue,NSBlockOperation, grand dispatch central ... and nothing, still freeze.

Is because XML is too big??? (...i need print XML to debug and test things)

1º The Request and print XML

- (void) doRequestPOST:(NSString*)URL params:(NSString*)params withSuccess:(void(^)(BOOL,id))successBlock{

(....)

AFHTTPRequestOperation *op = [sharedAPI HTTPRequestOperationWithRequest:request success:^(AFHTTPRequestOperation *operation, id responseObject) {

            NSString* xml = [[NSString alloc] initWithData:responseObject encoding:NSUTF8StringEncoding];

            //>>>>>PROBLEM HERE<<<<< if i remove next line (nslog) the problem does not occur
            NSLog(@"\n\nResponse \nURL :\n%@\nXML :\n%@\n \n",operation.request.URL,xml);
            [xml release];

            TBXML * tbxml = [TBXML newTBXMLWithXMLData:responseObject error:nil];
            [self saveCookiesFromHTTPHeaderFields:[operation response] withTBXML:tbxml.rootXMLElement];

            if (successBlock) {
                successBlock(TRUE,responseObject);
            }
}

2º Will ask for request and parse response from "successBlock(TRUE,responseObject);"

[self doRequestPOST:stringURL params:nil withSuccess:^(BOOL success, id response) {

        if (success) {

            //will parse response

            [self.dictionaryCategoryContents setObject:[Parser parseVodContent:response] forKey:idCategory];
            if (responseBlock){
                responseBlock (YES,[dictionaryCategoryContents objectForKey:idCategory]);
            }

        }else {

            if (responseBlock){
                responseBlock (NO,response);
            }
        }
    }];

Solution

  • This issue seems to be fixed by 4.4.1 released on 8/7/2012.