数据格式化程序暂时不可用
我的 iPad 应用程序遇到了一个问题,即我需要一次从服务器下载 10,000 多个图像。我成功下载了 8000 多张图像,但之后我遇到了类似“程序收到信号:“0”的异常。 数据格式化程序暂时不可用,将在“继续”后重试。 (加载共享库“/Developer/usr/lib/libXcodeDebuggerSupport.dylib”时发生未知错误) (gdb)”在调试器中。我测试了内存管理。内存管理没有问题。但我仍然得到了异常。请帮助我。
提前致谢, 塞卡尔·贝塔拉姆。
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
使用数据格式化程序,以便调试器可以将对象表示为不仅仅是指针或整数值(例如,数据格式化程序允许调试器向您显示
NSNumber
的基础值,或者内部的元素NSArray 等)。有时——我不确定为什么——它们会停止工作。无论如何,数据格式化程序无法工作这一事实并不是问题的根源。如果没有看到任何代码(例如如何下载和/或存储图像),诊断问题并不容易。在 Google 上进行一番研究后,发现 iPhone OS 上的程序在使用过多资源(不一定只是内存)时会收到信号 0。您无法阻止 iPhone 操作系统在需要时杀死您的程序。
有几个问题:
你是否陷入困境?您的代码可能不会保留对任何数据/URL/图像的引用,但自动释放池可能会。在紧循环情况下,有时建议在循环开始时创建一个新的自动释放池,并在底部释放它。例如:
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 anNSArray
, 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 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:
这是我上面提到的代码,
对于 (int i=0;i<10000;i++)
{
printf("\n 生成图像............:%d",i);
我++;
我是直接下载的。
This is my code which I mentioned above,
for (int i=0;i<10000;i++)
{
printf("\n generating images..............:%d",i);
i++;
I was downloading them directly.