0

When I ran my app I got this type of crash message:

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

I dont know how to debug this type of error. Can anyone help me?

UPDATE:

Got Error Here:

+ (void)runRequests
{
    // Should keep the runloop from exiting
    CFRunLoopSourceContext context = {0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL};
    CFRunLoopSourceRef source = CFRunLoopSourceCreate(kCFAllocatorDefault, 0, &context);
    CFRunLoopAddSource(CFRunLoopGetCurrent(), source, kCFRunLoopDefaultMode);

    BOOL runAlways = YES; // Introduced to cheat Static Analyzer
    while (runAlways) {
        NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
        CFRunLoopRunInMode(kCFRunLoopDefaultMode, 1.0e10, true);//in this line i got error
        [pool drain];
    }

    // Should never be called, but anyway
    CFRunLoopRemoveSource(CFRunLoopGetCurrent(), source, kCFRunLoopDefaultMode);
    CFRelease(source);
}
Gavin
  • 8,204
  • 3
  • 32
  • 42
vivek bhoraniya
  • 1,526
  • 2
  • 17
  • 36
  • 1
    Do what the message states. – rmaddy Mar 14 '14 at 05:27
  • to know in which line app is crashing follow this ... on the left panel of Xcode you can see breakpoint option at the top. go to it now at the bottom you can see "+" button click on it and select "Add allexecption breakpoint". this will help you to know in which line app crashes. only thing you have to do is enable breakpoint – Charan Giri Mar 14 '14 at 07:33
  • if you know in which line app crashes it will be easy to fix it – Charan Giri Mar 14 '14 at 07:34
  • I have comment in my code at line which is crashing – vivek bhoraniya Mar 14 '14 at 08:02

1 Answers1

0

you are using free() or dealloc() on some object which is not allocated. basically you have issues with memory management. Share some code or check your self by commenting the lines where you are releasing the memory.

Manish Agrawal
  • 10,958
  • 6
  • 44
  • 76