Data Formatters temporarily unavailable

1.1k views Asked by At

I had a problem with my iPad application that is, I need to download more than 10,000 images from a server at a time. I successfully downloaded more than 8000 images, But after that I got an exception like "Program received signal: “0”. Data Formatters temporarily unavailable, will re-try after a 'continue'. (Unknown error loading shared library "/Developer/usr/lib/libXcodeDebuggerSupport.dylib") (gdb)" this in the debugger. I tested the memory management. There are no issues in memory management. But still I got the exception. Please help me.

Thanks in advance, Sekhar Bethalam.

2

There are 2 answers

0
dreamlax On

Data formatters are used so that the debugger can represent an object as more than just a pointer or integer value (for example, data formatters allow the debugger to show you the underlying value of NSNumber, or the elements inside an NSArray, etc.). Sometimes—and I'm not sure why—they just stop working. In any case, the fact that the data formatters aren't working is not the root of the issue.

Without seeing any of your code (such as how you download and/or store the images) it is not very easy to diagnose your problem. After some digging around on Google, it appears that programs on iPhone OS receive signal 0 when they are using too many resources (not necessarily just memory). There's nothing you can do to stop iPhone OS from killing your program when it wants to.

A few questions:

  • Are you trying to download 10,000 images simultaneously or sequentially? Hopefully sequentially!
  • Even though your there are no detected leaks in your code, your program may still be using too much memory. Are you keeping references to these images in an array or something similar?
  • Are you in a tight loop? Your code may not keep references to any of the data/URLs/images, but the autorelease pool might be. In tight-loop situations, it is sometimes advisable to create a new autorelease pool at the beginning of the loop, and releasing it at the bottom. For example:

    for (NSUInteger i = 0; i < 10000; i++)
    {
        NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
        // do the work to get the image. Objects are automatically added to the
        // most recently created autorelease pool in the current thread.
        [pool release];
    }
    
1
Sekhar Bhetalam On

This is my code which I mentioned above,

for (int i=0;i<10000;i++) { printf("\n generating images..............:%d",i); i++;

        UIImageView* imageView=[[UIImageView alloc]initWithFrame:CGRectMake(0, 0, spotItem.imageWidth, spotItem.imageHight)];
        NSData *receivedData = [NSData dataWithContentsOfURL:[NSURL URLWithString:@"http://sererpath/prudently/iphone/image_s/e545afbf-4e3e-442e-92f9-a7891fc3ea9f/test.png"]];
        imageView.image = [[UIImage alloc] initWithData:receivedData] ;
        //imageView.image=[UIImage imageNamed:@"1.png"];
        [spotItem.subView addSubview:imageView];
        [imageView release];



    }

I was downloading them directly.