pointer being freed was not allocated

Posted by kudorgyozo on Stack Overflow See other posts from Stack Overflow or by kudorgyozo
Published on 2010-05-05T07:35:15Z Indexed on 2010/05/05 7:38 UTC
Read the original article Hit count: 222

Filed under:
|
|
|
|

Hello i have the following error:

malloc: * error for object 0x2087000: pointer being freed was not allocated * set a breakpoint in malloc_error_break to debug

I have no idea what object that is. I don't know how to find it. Can anybody explain to me how (and where) to use malloc_history. I have set a breakpoint in malloc_error_break but i couldn't find out what object is at that address. I receive this after removing an object from an nsmutablearray and popping a view controller manually. If I comment out the line [reviewUpload.images removeObject: self.reviewUploadImg] it doesn't give me the error but of course it's not useful for me like that.

- (void) removeImage
{
    debugLog(@"reviewUploadImg %@", self.reviewUploadImg);
    debugLog(@"reviewUpload %@", self.reviewUpload);
    debugLog(@"reviewUploadImg thumb %@", self.reviewUploadImg.thumb);
    [reviewUpload.images removeObject: self.reviewUploadImg];
    [self.navigationController popViewControllerAnimated:TRUE];
}

© Stack Overflow or respective owner

Related posts about iphone

Related posts about objective-c