【问题标题】:Application crashing in the iPad but working fine in iPad simulator应用程序在 iPad 中崩溃但在 iPad 模拟器中工作正常
【发布时间】:2010-06-11 04:04:10
【问题描述】:

我正在用 cocos2d 编写游戏。在 iPad 模拟器中,应用程序运行良好。 当我在 iPad 上运行应用程序时。

但是通过在终端中给出以下消息而崩溃。我在我的代码中使用 2048x2048 CCSpriteSheets。

我使用 Instruments 工具时内存突然增加到 32MB,然后崩溃。它在 CCSpriteFrameCache 崩溃。 程序已加载。

target remote-mobile /tmp/.XcodeGDBRemote-6258-64
Switching to remote-macosx protocol
mem 0x1000 0x3fffffff cache
mem 0x40000000 0xffffffff none
mem 0x00000000 0x0fff none
continue
The program is not being run.
The program is not being run.

谢谢。

【问题讨论】:

    标签: cocoa-touch cocos2d-iphone ipad


    【解决方案1】:

    您是否在内存中加载了比 iPad 允许的更多的纹理?在内存不足之前,您只能加载大约 3 或 4 个 32 位 2048x2048 PNG。

    【讨论】:

    • 我在一个场景中使用 3 * (2048x2048) 精灵表和 1 (1024 x 1024) 精灵表。但是,我在加载下一张之前删除了精灵表。不过,我有问题吗?谢谢你。
    猜你喜欢
    • 2013-03-02
    • 1970-01-01
    • 2012-10-25
    • 1970-01-01
    • 2016-07-07
    • 2023-03-12
    • 2011-12-26
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多