【发布时间】:2011-12-24 06:01:55
【问题描述】:
我正在做一个像照片浏览器这样的应用程序,就像 iTOuch 上的“照片”一样。我使用第三方库:https://github.com/kirbyt/KTPhotoBrowser 当我多次滚动照片时,应用程序崩溃了。 日志显示收到内存警告。
然后我用instrument检查内存(我选择Memory-Allocation)。
我跟踪“所有分配”的实时字节数和总字节数。 但是,Live Bytes 永远不会超过 5 MB,而 Total Bytes 会超过 100 MB。
应用运行时,Live Bytes 为 3.97MB,整体为 125.48MB。
我觉得Live Bytes是目前使用的内存,好像有点贵。
为什么应用仍然崩溃? Xcode 4.2 4D199,Lion 10.7.2(11c74),iTouch ios5.0.1 beta2。 下面是截图,仪器配置是默认的。
有什么想法吗?
崩溃日志是这样的:
Nov 8 16:54:42 unknown SpringBoard[15] : Received memory warning.
Nov 8 16:54:43 unknown com.apple.launchd[1] : (UIKitApplication:com.apple.mobilephone[0xcb31]) Exited: Killed: 9
Nov 8 16:54:43 unknown com.apple.launchd[1] : (UIKitApplication:com.freebit.minimumcloud.ios[0xf787]) Exited: Killed: 9
Nov 8 16:54:43 unknown UserEventAgent[12] : jetsam: kernel termination snapshot being created
Nov 8 16:54:43 unknown SpringBoard[15] : Application 'Min.Cloud' exited abnormally with signal 9: Killed: 9
Nov 8 16:54:44 unknown SpringBoard[15] : Application 'FaceTime' exited abnormally with signal 9: Killed: 9
Nov 8 16:54:45 unknown kernel[0] : launchd[481] Builtin profile: container (sandbox)
Nov 8 16:54:45 unknown kernel[0] : launchd[481] Container: /private/var/mobile/Applications/301E2A00-F1B6-4E88-ACF4-8EBEFB92B9DA [69] (sandbox)
Nov 8 16:54:45 unknown librariand[459] : client connection is invalid: Connection invalid
Nov 8 16:54:45 unknown ReportCrash[480] : Saved crashreport to /Library/Logs/CrashReporter/LowMemory-2011-11-08-165445.plist using uid: 0 gid: 0, synthetic_euid: 0 egid: 0
Nov 8 16:54:49 unknown sandboxd[483] : MinimumCloud(481) deny file-write-data /private/var/mobile/Library/Mobile Documents/*********
Nov 8 16:54:50 unknown MinimumCloud[481] : file://localhost/private/var/mobile/Library/Mobile%20Documents/*******/Documents/
Nov 8 16:54:50 unknown sandboxd[483] : MinimumCloud(481) deny file-write-create /file:
Nov 8 16:54:50 unknown MinimumCloud[481] : ubiquityContainerURL=/private/var/mobile/Library/Mobile Documents/******/Documents
Nov 8 16:54:50 unknown sandboxd[483] : MinimumCloud(481) deny file-write-create /file:
Nov 8 16:54:50 unknown MinimumCloud[481] : mystorageSymLink=/var/mobile/Applications/301E2A00-F1B6-4E88-ACF4-8EBEFB92B9DA/Library/htdocs/MyStorage
Nov 8 16:54:51 unknown wifid[27] : WiFi:[342435291.518957]: Disable WoW requested by "spd"
【问题讨论】:
-
请包括崩溃日志的相关部分
-
您应该提供崩溃的所有相关行,而不是完整的转储。
-
@UPT,我不知道在哪里导致崩溃,因此相关行在哪里。
标签: ios memory-management