开发者

app is crashing due to tiny_malloc_from_free_list

Am working on an iPhone app,everything was going fine until I faced this crash, tiny_malloc_from_free_list. I am not sure why this crash is happening all of a sudden.Tried to google it but seems there aint enough suggestions to fix this one. Please suggest any ideas how I can fix this problem.

Thanks, Manoj

for reference here are some methods:

-(void) fetchProfileData
{

    // Implemented ASIHTTP Request APIs 
    NSURL *url = [[NSURL URLWithString:SERVICE_NAME_PROFILEMANAGER] autorelease];

    ASIHTTPRequest *request = [ASIHTTPRequest requestWithURL:url];
    [request setValidatesSecureCertificate:NO];
    [request setUsername:[[LoginManager sharedInstance] userName]];
    [request setPassword:[[LoginManager sharedInstance] passWord]];
    [request setDelegate:self];
    [self.view addSubview:autheticateIndicator];
    [autheticateIndicator startAnimating];
    [authenticationLabel setHidden:NO];
    [request startAsynchronous];
}

- (void)requestFinished:(ASIHTTPRequest *)request
{
    NSData *responseData = [request responseData];              
    NSString *theXml = [[NSString alloc] initWithData:responseData encoding:NSASCIIStringEnco开发者_运维技巧ding];
    [NSThread detachNewThreadSelector:@selector(parseXML:) toTarget:self withObject:theXml];
    [autheticateIndicator stopAnimating];
    [theXml release];
}

-(void) parseXML:(NSString *)xmlData
{
    NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
    [profilePersonnelNumber removeAllObjects];

    //  Load and parse the string data
    tbxml = [[TBXML tbxmlWithXMLString:xmlData] retain];

    //  If TBXML found a root node, process element and iterate all children
    if (tbxml.rootXMLElement) {
        [self traverseElement:tbxml.rootXMLElement];
    }

    if ([profilePersonnelNumber count] > 0 ) {

        NSDictionary *dict = [profilePersonnelNumber objectAtIndex:0];

        if ([dict objectForKey:@"PersonnelNumber"])
            {
                [array release];
                array = [[NSMutableArray arrayWithObjects:[dict valueForKey:@"PersonnelNumber"], nil] retain];

                NSMutableString * result = [[NSMutableString alloc] init];
                for (NSObject * obj in array)
                {
                    [result appendString:[obj description]];
                    [[LoginManager sharedInstance] personnelNumber:[obj description]];
                }                   
                [result release];
            }
    }

    [tbxml release];
    [pool release];

    //TODO: Uncomment this part, must required

    if ([profilePersonnelNumber count] > 0) {
        UITabBarController *controller = self.tabBarController;
        [self presentModalViewController:controller animated:YES];
    }
}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜