簡體   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