繁体   English   中英

iPhone 游戏在 memory 警告后崩溃,并显示消息“数据格式化程序暂时不可用,将在“继续”后重试”

[英]iPhone game is crashing after memory warning with message “ Data Formatters temporarily unavailable, will re-try after a 'continue' ”

我正处于开发 iPhone 游戏的最后阶段,我正在处理似乎与 memory 相关的崩溃。

当我多次加载游戏关卡(10 到 15 次)时,它只会在设备上发生。 我在第 8 次左右收到一些 memory 警告,如果我继续加载相同的级别,它最终会在控制台上崩溃并显示以下消息:

Program received signal:  “0”.
Data Formatters temporarily unavailable, will re-try after a 'continue'. (Unknown error loading shared library  
"/Developer/usr/lib/libXcodeDebuggerSupport.dylib")

一些谷歌搜索告诉我这个消息通常意味着应用程序已经用完了 memory。

我在仪器下运行该应用程序,但它没有检测到任何 memory 泄漏,并且每次加载关卡时,总分配量保持在 1.5Mb 左右(实时字节和总字节)达到 5.4Mb 不到一秒。 这似乎并不多,因为泄漏的测试应用程序在同一设备(iPhone 3GS)上分配超过 30Mb 之前没有崩溃。 我是乐器新手,所以也许我遗漏了一些东西。

几天来我一直在与这个错误作斗争,如果有人能指出我正确的方向,我将非常感激。

Yes, your searching was right " this message usually means the app has run out of memory " Please read memory management documentation from apple and release your objects properly if where you getting memory leaks.It will reducing memory warnings as well as your code will work美好的。 When you allocating simultaneously objects when new level loading it will indirectly premises you allocating objects but you not able to delloc properly, it means that you creating new memory for new object but still old object is in memory. 在这种情况下,您为什么不收到 memory 警告?

将 Instruments 签入 Activity Monitor 工具。 您会在任何给定时间找到正确的 RAM 消耗量。 Allocations 工具并不是 RAM 使用情况的真正指标。 但是,它将有助于查找已分配但未释放的内容。 在 Allocations 中使用 heapshots 来找出泄漏的地方。

http://www.friday.com/bbum/2010/10/17/when-is-a-leak-not-a-leak-using-heapshot-analysis-to-find-undesirable-memory-growth/

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM