我遇到了问题,我已经编写了第一个即将完成的应用程序。
有一个VC(启动)带有一个按钮,可以将用户带到另一个VC的游戏中 用户可以通过单击第二个VC中的按钮返回第一个(菜单)VC。
在测试期间,我注意到当点击主页按钮然后将应用程序重新购回视图并单击PLAY按钮时,应用程序崩溃,设备重新启动。
为了尝试找出原因,我从游戏VC中删除了iAD和游戏中心。出现同样的问题但现在只有在重复主页按钮/重新聚焦/播放2-3次后才会出现。
下面是设备控制台,但我是新手,所以我不清楚。
当它崩溃时,它显示第二个VB一毫秒或部分显示它崩溃。
从网上看到的东西是使用大量内存,但我无法在代码中看到任何内容(viewdidload等)。
我运行了Analyze并且只检测到了Dead商店。
我无法在模拟器上模拟同样的问题,它只发生在设计(iPhone 3)上。我怀疑是因为Mac有更多的内存。
当我使用分析仪器时,它不显示内存中的任何峰值。
如果您需要任何其他信息,请与我们联系。到目前为止,我已经“解决”了很多问题,我等不及进入商店!!
Sep 18 13:08:38 Andys-iPhone mobile_house_arrest[178] <Error>: Max open files: 78
Sep 18 13:08:41 Andys-iPhone installd[53] <Error>: 0x2ff5e000 handle_install: Install of "/var/mobile/Media/PublicStaging/levelword.app" requested by mobile_installation_proxy
Sep 18 13:08:42 Andys-iPhone installd[53] <Error>: 0x2ff5e000 MobileInstallationInstall_Server: Installing app com.margiesparrow.wribble
Sep 18 13:08:42 Andys-iPhone installd[53] <Error>: profile not valid: 0xe8008012
Sep 18 13:08:42 Andys-iPhone installd[53] <Error>: 0x2ff5e000 install_embedded_profile: Could not install embedded profile: 0xe8008012
Sep 18 13:08:43 Andys-iPhone installd[53] <Error>: Sep 18 13:08:43 SecTrustEvaluate [leaf CriticalExtensions IssuerCommonName]
Sep 18 13:08:44 Andys-iPhone SpringBoard[76] <Warning>: Killing com.margiesparrow.wribble for termination assertion
Sep 18 13:08:45 Andys-iPhone lsd[86] <Warning>: updating identifier store
Sep 18 13:08:45 Andys-iPhone kernel[0] <Debug>: launchd[181] Builtin profile: syncdefaultsd (sandbox)
Sep 18 13:08:45 Andys-iPhone lsd[86] <Warning>: Attempting to store identifiers file
Sep 18 13:08:45 Andys-iPhone installd[53] <Error>: 0x2ff5e000 MobileInstallationInstall_Server: Staging: 0.45s; Waiting: 0.04s; Installation: 3.22s; LS Sync: 0.01s; Overall: 4.02s
Sep 18 13:08:48 Andys-iPhone lockdownd[43] <Warning>: SSSQLiteDatabase: Could not setup database: [14, /var/root/Library/com.apple.itunesstored/kvs.sqlitedb]
Sep 18 13:08:48 Andys-iPhone lockdownd[43] <Notice>: 014c4000 __copy_itunes_value_block_invoke_0: com.apple.mobile.iTunes.store/downloaded-apps -> (null)
Sep 18 13:08:48 Andys-iPhone lockdownd[43] <Warning>: SSSQLiteDatabase: Could not setup database: [14, /var/root/Library/com.apple.itunesstored/kvs.sqlitedb]
Sep 18 13:08:48 Andys-iPhone lockdownd[43] <Notice>: 014c4000 __copy_itunes_value_block_invoke_0: com.apple.mobile.iTunes.store/downloaded-apps -> (null)
Sep 18 13:08:48 Andys-iPhone mobile_assertion_agent[110] <Notice>: service_one_connection: Connection closed for client iTunes.
Sep 18 13:08:53 Andys-iPhone recentsd[186] <Notice>: 0x1dd0cf30|EAS|Note |EAS Protocol Manager set to ASProtocolUnknown
Sep 18 13:08:55 Andys-iPhone installd[53] <Error>: 0x2ff5e000 filter_attributes: Info.plist keys requested via MobileInstallationLookup/Browse in client Xcode (via mobile_installation_proxy) were not found in MobileInstallation's cache. Please file a bug requesting that these keys be added: <CFBasicHash 0x1e551bc0 [0x3a38a100]>{type = mutable set, count = 18,
entries =>
0 : <CFString 0x3a3769f4 [0x3a38a100]>{contents = "CFBundlePackageType"}
1 : <CFString 0x1e5a4360 [0x3a38a100]>{contents = "BuildMachineOSBuild"}
2 : <CFString 0x3a377a44 [0x3a38a100]>{contents = "CFBundleResourceSpecification"}
3 : <CFString 0x1e5a47d0 [0x3a38a100]>{contents = "DTPlatformBuild"}
4 : <CFString 0x3a374794 [0x3a38a100]>{contents = "DTCompiler"}
5 : <CFString 0x3a376564 [0x3a38a100]>{contents = "CFBundleSignature"}
6 : <CFString 0x3a377224 [0x3a38a100]>{contents = "DTSDKName"}
7 : <CFString 0x1e551050 [0x3a38a100]>{contents = "NSBundleResolvedPath"}
8 : <CFString 0x3a373eb4 [0x3a38a100]>{contents = "UISupportedInterfaceOrientations"}
10 : <CFString 0x3a37be84 [0x3a38a100]>{contents = "DTXcode"}
13 : <CFString 0x3a37beb4 [0x3a38a100]>{contents = "CFBundleInfoDictionaryVersion"}
16 : <CFString 0x3a379304 [0x3a38a100]>{contents = "CFBundleSupportedPlatforms"}
17 : <CFString 0x1e54fbb0 [0x3a38a100]>{contents = "DTXcodeBuild"}
18 : <CFString 0x1e5a2180 [0x3a38a100]>{contents = "UIStatusBarTintParameters"}
19 : <CFString 0x3a377e54 [0x3a38a100]>{contents = "DTPlatformVersion"}
20 : <CFString 0x3a37abf4 [0x3a38a100]>{contents = "DTPlatformName"}
21 : <CFString 0x3a37bc84 [0x3a38a100]>{contents = "CFBundleDevelopmentRegion"}
22 : <CFString 0x1e5a2010 [0x3a38a100]>{contents = "DTSDKBuild"}
}
Sep 18 13:08:58 Andys-iPhone installd[53] <Error>: 0x2ffe0000 filter_attributes: Info.plist keys requested via MobileInstallationLookup/Browse in client Xcode (via mobile_installation_proxy) were not found in MobileInstallation's cache. Please file a bug requesting that these keys be added: <CFBasicHash 0x1e577ba0 [0x3a38a100]>{type = mutable set, count = 18,
entries =>
0 : <CFString 0x3a3769f4 [0x3a38a100]>{contents = "CFBundlePackageType"}
1 : <CFString 0x1e54fbb0 [0x3a38a100]>{contents = "BuildMachineOSBuild"}
2 : <CFString 0x3a377a44 [0x3a38a100]>{contents = "CFBundleResourceSpecification"}
3 : <CFString 0x1e553e70 [0x3a38a100]>{contents = "DTPlatformBuild"}
4 : <CFString 0x3a374794 [0x3a38a100]>{contents = "DTCompiler"}
5 : <CFString 0x3a376564 [0x3a38a100]>{contents = "CFBundleSignature"}
6 : <CFString 0x3a377224 [0x3a38a100]>{contents = "DTSDKName"}
7 : <CFString 0x1e59f6c0 [0x3a38a100]>{contents = "NSBundleResolvedPath"}
8 : <CFString 0x3a373eb4 [0x3a38a100]>{contents = "UISupportedInterfaceOrientations"}
10 : <CFString 0x3a37be84 [0x3a38a100]>{contents = "DTXcode"}
13 : <CFString 0x3a37beb4 [0x3a38a100]>{contents = "CFBundleInfoDictionaryVersion"}
16 : <CFString 0x3a379304 [0x3a38a100]>{contents = "CFBundleSupportedPlatforms"}
17 : <CFString 0x1e59fb10 [0x3a38a100]>{contents = "DTXcodeBuild"}
18 : <CFString 0x1e5a2480 [0x3a38a100]>{contents = "UIStatusBarTintParameters"}
19 : <CFString 0x3a377e54 [0x3a38a100]>{contents = "DTPlatformVersion"}
20 : <CFString 0x3a37abf4 [0x3a38a100]>{contents = "DTPlatformName"}
21 : <CFString 0x3a37bc84 [0x3a38a100]>{contents = "CFBundleDevelopmentRegion"}
22 : <CFString 0x1e5a4360 [0x3a38a100]>{contents = "DTSDKBuild"}
}
Sep 18 13:08:58 Andys-iPhone com.apple.debugserver-199[188] <Warning>: debugserver-199 for armv7.
Sep 18 13:08:58 Andys-iPhone com.apple.debugserver-199[188] <Warning>: Connecting to com.apple.debugserver service...
Sep 18 13:08:58 Andys-iPhone com.apple.debugserver-199[188] <Warning>: Got a connection, waiting for process information for launching or attaching.
Sep 18 13:08:58 Andys-iPhone kernel[0] <Debug>: lockbot[176] Builtin profile: debugserver (sandbox)
Sep 18 13:08:58 Andys-iPhone com.apple.launchd[1] (UIKitApplication:com.margiesparrow.wribble[0xab5][189]) <Warning>: (UIKitApplication:com.margiesparrow.wribble[0xab5]) Spawned and waiting for the debugger to attach before continuing...
Sep 18 13:08:58 Andys-iPhone amfid[190] <Error>: Sep 18 13:08:58 SecTrustEvaluate [leaf CriticalExtensions IssuerCommonName]
Sep 18 13:08:59 Andys-iPhone kernel[0] <Debug>: launchd[189] Builtin profile: container (sandbox)
Sep 18 13:08:59 Andys-iPhone kernel[0] <Debug>: launchd[189] Container: /private/var/mobile/Applications/91C0CC2E-FD86-4606-9050-E9F17BFF0DA9 (sandbox)
Sep 18 13:08:59 Andys-iPhone com.apple.debugserver-199[188] <Warning>: Got a connection, waiting for debugger instructions.
Sep 18 13:09:02 Andys-iPhone kernel[0] <Debug>: AppleSerialMultiplexer: mux-ad(eng)::setLinkQualityMetricGated: Setting link quality metric to 50
Sep 18 13:09:10 Andys-iPhone levelword[189] <Warning>: Number of words loaded from words.txt:178694
Sep 18 13:09:20 Andys-iPhone mediaserverd[38] <Notice>: 2013-09-18 01:09:20.307416 PM [AirPlayScreenClient] ### Screen not supported on this device (iPhone2,1)
Sep 18 13:09:22 Andys-iPhone levelword[189] <Warning>: drawBackground
Sep 18 13:09:22 Andys-iPhone levelword[189] <Warning>: showLevelPopUp
Sep 18 13:09:31 Andys-iPhone profiled[78] <Notice>: (Note ) profiled: Idled.
Sep 18 13:09:31 Andys-iPhone profiled[78] <Notice>: (Note ) profiled: Service stopping.
Sep 18 13:09:33 Andys-iPhone kernel[0] <Debug>: AppleSerialMultiplexer: mux-ad(eng)::setLinkQualityMetricGated: Setting link quality metric to 100
Sep 18 13:09:55 Andys-iPhone levelword[189] <Warning>: tgvc applicationdidenterbackground
Sep 18 13:09:58 Andys-iPhone levelword[189] <Warning>: drawBackground
Sep 18 13:09:58 Andys-iPhone levelword[189] <Warning>: showLevelPopUp
Sep 18 13:10:01 Andys-iPhone UserEventAgent[13] <Notice>: jetsam: kernel termination snapshot being created
Sep 18 13:10:01 Andys-iPhone com.apple.launchd[1] (com.apple.BlueTool[69]) <Notice>: (com.apple.BlueTool) Idle-exit job was jettisoned. Will bypass throttle interval for next on-demand launch.
Sep 18 13:10:01 Andys-iPhone com.apple.launchd[1] (com.apple.BlueTool[69]) <Notice>: (com.apple.BlueTool) Exited: Killed: 9
Sep 18 13:10:01 Andys-iPhone com.apple.launchd[1] (com.apple.mobile.deleted[56]) <Notice>: (com.apple.mobile.deleted) Idle-exit job was jettisoned. Will bypass throttle interval for next on-demand launch.
Sep 18 13:10:01 Andys-iPhone com.apple.launchd[1] (com.apple.mobile.deleted[56]) <Notice>: (com.apple.mobile.deleted) Exited: Killed: 9
Sep 18 13:10:01 Andys-iPhone com.apple.launchd[1] (com.apple.xpcd.F5010000-0000-0000-0000-000000000000[92]) <Notice>: (com.apple.xpcd.F5010000-0000-0000-0000-000000000000) Exited: Killed: 9
Sep 18 13:10:01 Andys-iPhone com.apple.launchd[1] (com.apple.crashreportcopymobile[120]) <Notice>: (com.apple.crashreportcopymobile) Idle-exit job was jettisoned. Will bypass throttle interval for next on-demand launch.
Sep 18 13:10:01 Andys-iPhone com.apple.launchd[1] (com.apple.crashreportcopymobile[120]) <Notice>: (com.apple.crashreportcopymobile) Exited: Killed: 9
Sep 18 13:10:01 Andys-iPhone com.apple.launchd[1] (com.apple.assetsd[101]) <Notice>: (com.apple.assetsd) Idle-exit job was jettisoned. Will bypass throttle interval for next on-demand launch.
Sep 18 13:10:01 Andys-iPhone com.apple.launchd[1] (com.apple.assetsd[101]) <Notice>: (com.apple.assetsd) Exited: Killed: 9
Sep 18 13:10:01 Andys-iPhone com.apple.launchd[1] (com.apple.timed[16]) <Notice>: (com.apple.timed) Idle-exit job was jettisoned. Will bypass throttle interval for next on-demand launch.
Sep 18 13:10:01 Andys-iPhone com.apple.launchd[1] (com.apple.timed[16]) <Notice>: (com.apple.timed) Exited: Killed: 9
Sep 18 13:10:01 Andys-iPhone com.apple.launchd[1] (com.apple.coreservices.appleid.authentication[58]) <Notice>: (com.apple.coreservices.appleid.authentication) Idle-exit job was jettisoned. Will bypass throttle interval for next on-demand launch.
Sep 18 13:10:01 Andys-iPhone com.apple.launchd[1] (com.apple.coreservices.appleid.authentication[58]) <Notice>: (com.apple.coreservices.appleid.authentication) Exited: Killed: 9
Sep 18 13:10:01 Andys-iPhone com.apple.launchd[1] (com.apple.itunesstored[74]) <Notice>: (com.apple.itunesstored) Idle-exit job was jettisoned. Will bypass throttle interval for next on-demand launch.
Sep 18 13:10:01 Andys-iPhone com.apple.launchd[1] (com.apple.itunesstored[74]) <Notice>: (com.apple.itunesstored) Exited: Killed: 9
Sep 18 13:10:01 Andys-iPhone com.apple.launchd[1] (com.apple.mobile.assertion_agent[110]) <Notice>: (com.apple.mobile.assertion_agent) Idle-exit job was jettisoned. Will bypass throttle interval for next on-demand launch.
Sep 18 13:10:01 Andys-iPhone com.apple.launchd[1] (com.apple.mobile.assertion_agent[110]) <Notice>: (com.apple.mobile.assertion_agent) Exited: Killed: 9
Sep 18 13:10:01 Andys-iPhone com.apple.launchd[1] (com.apple.accountsd[84]) <Notice>: (com.apple.accountsd) Idle-exit job was jettisoned. Will bypass throttle interval for next on-demand launch.
Sep 18 13:10:01 Andys-iPhone com.apple.launchd[1] (com.apple.accountsd[84]) <Notice>: (com.apple.accountsd) Exited: Killed: 9
Sep 18 13:10:01 Andys-iPhone com.apple.launchd[1] (com.apple.recentsd[186]) <Notice>: (com.apple.recentsd) Idle-exit job was jettisoned. Will bypass throttle interval for next on-demand launch.
Sep 18 13:10:01 Andys-iPhone com.apple.launchd[1] (com.apple.recentsd[186]) <Notice>: (com.apple.recentsd) Exited: Killed: 9
Sep 18 13:10:01 Andys-iPhone com.apple.launchd[1] (com.apple.lsd[86]) <Notice>: (com.apple.lsd) Idle-exit job was jettisoned. Will bypass throttle interval for next on-demand launch.
Sep 18 13:10:01 Andys-iPhone com.apple.launchd[1] (com.apple.lsd[86]) <Notice>: (com.apple.lsd) Exited: Killed: 9
Sep 18 13:10:01 Andys-iPhone com.apple.launchd[1] (com.apple.mobile.installd[53]) <Notice>: (com.apple.mobile.installd) Idle-exit job was jettisoned. Will bypass throttle interval for next on-demand launch.
Sep 18 13:10:01 Andys-iPhone com.apple.launchd[1] (com.apple.mobile.installd[53]) <Notice>: (com.apple.mobile.installd) Exited: Killed: 9
Sep 18 13:10:01 Andys-iPhone com.apple.launchd[1] (com.apple.networkd_privileged[70]) <Notice>: (com.apple.networkd_privileged) Idle-exit job was jettisoned. Will bypass throttle interval for next on-demand launch.
Sep 18 13:10:01 Andys-iPhone com.apple.launchd[1] (com.apple.networkd_privileged[70]) <Notice>: (com.apple.networkd_privileged) Exited: Killed: 9
Sep 18 13:10:01 Andys-iPhone com.apple.launchd[1] (com.apple.softwareupdateservicesd[97]) <Notice>: (com.apple.softwareupdateservicesd) Idle-exit job was jettisoned. Will bypass throttle interval for next on-demand launch.
Sep 18 13:10:01 Andys-iPhone com.apple.launchd[1] (com.apple.softwareupdateservicesd[97]) <Notice>: (com.apple.softwareupdateservicesd) Exited: Killed: 9
Sep 18 13:10:01 Andys-iPhone com.apple.launchd[1] (com.apple.gamed[79]) <Notice>: (com.apple.gamed) Idle-exit job was jettisoned. Will bypass throttle interval for next on-demand launch.
Sep 18 13:10:01 Andys-iPhone com.apple.launchd[1] (com.apple.gamed[79]) <Notice>: (com.apple.gamed) Exited: Killed: 9
Sep 18 13:10:01 Andys-iPhone SpringBoard[76] <Warning>: Received memory warning.
Sep 18 13:10:01 Andys-iPhone levelword[189] <Warning>: Received memory warning.
Sep 18 13:10:02 Andys-iPhone levelword[189] <Warning>: Received memory warning.
Sep 18 13:10:02 Andys-iPhone ReportCrash[195] <Error>: libMobileGestalt copySystemVersionDictionaryValue: Could not lookup ReleaseType from system version dictionary
Sep 18 13:10:02 Andys-iPhone ReportCrash[195] <Notice>: Not saving suspended-only Jetsam log because already dumped today.
Sep 18 13:10:02 Andys-iPhone UserEventAgent[13] <Notice>: jetsam: kernel termination snapshot being created
Sep 18 13:10:02 Andys-iPhone levelword[189] <Warning>: Received memory warning.
Sep 18 13:10:10 Andys-iPhone levelword[189] <Warning>: tgvc applicationdidenterbackground
Sep 18 13:10:10 Andys-iPhone levelword[189] <Warning>: tgvc applicationdidenterbackground
Sep 18 13:10:12 Andys-iPhone ReportCrash[196] <Notice>: Not saving Jetsam log because no data from the kernel.
Sep 18 13:10:14 Andys-iPhone levelword[189] <Warning>: drawBackground
Sep 18 13:10:14 Andys-iPhone levelword[189] <Warning>: showLevelPopUp
Sep 18 13:10:17 Andys-iPhone com.apple.launchd[1] (UIKitApplication:com.apple.mobilephone[0x955][96]) <Notice>: (UIKitApplication:com.apple.mobilephone[0x955]) Exited: Killed: 9
Sep 18 13:10:17 Andys-iPhone com.apple.launchd[1] (com.apple.TextInput.kbd[50]) <Notice>: (com.apple.TextInput.kbd) Exited: Killed: 9
Sep 18 13:10:17 Andys-iPhone com.apple.launchd[1] (com.apple.tccd[93]) <Notice>: (com.apple.tccd) Exited: Killed: 9
Sep 18 13:10:17 Andys-iPhone com.apple.launchd[1] (UIKitApplication:com.margiesparrow.wribble[0xab5][189]) <Notice>: (UIKitApplication:com.margiesparrow.wribble[0xab5]) Exited: Killed: 9
Sep 18 13:10:17 Andys-iPhone com.apple.launchd[1] (UIKitApplication:com.apple.mobilemail[0x60e][99]) <Notice>: (UIKitApplication:com.apple.mobilemail[0x60e]) Exited: Killed: 9
Sep 18 13:10:17 Andys-iPhone UserEventAgent[13] <Notice>: jetsam: kernel termination snapshot being created
Sep 18 13:10:17 Andys-iPhone com.apple.debugserver-199[188] <Warning>: 1 +0.000000 sec [00bc/1303]: error: ::read ( 5, 0x2fe809fc, 18446744069414585344 ) => -1 err = Bad file descriptor (0x00000009)
Sep 18 13:10:18 Andys-iPhone backboardd[26] <Warning>: Application 'UIKitApplication:com.apple.mobilephone[0x955]' exited abnormally with signal 9: Killed: 9
Sep 18 13:10:18 Andys-iPhone backboardd[26] <Warning>: Application 'UIKitApplication:com.margiesparrow.wribble[0xab5]' exited abnormally with signal 9: Killed: 9
Sep 18 13:10:18 Andys-iPhone backboardd[26] <Warning>: Application 'UIKitApplication:com.apple.mobilemail[0x60e]' exited abnormally with signal 9: Killed: 9
Sep 18 13:10:22 Andys-iPhone ReportCrash[203] <Error>: libMobileGestalt copySystemVersionDictionaryValue: Could not lookup ReleaseType from system
version dictionary
我期待您的帮助。
亲切的问候 安迪
答案 0 :(得分:1)
“我运行了分析,只检测到了死店。”修复它们。 修复所有警告。 运行仪器,分配工具。您应该不看到内存继续增加。如果是使用快照分析:
使用仪器检查由于保留但未泄漏的内存导致的泄漏和内存丢失。后者是未使用的内存,仍然指向。在仪器上的分配工具中使用快照。
如何使用“快照”查找内存褶皱,请参阅:bbum blog
基本上有一种方法是运行仪器分配工具,获取快照,运行代码直观和另一个快照重复3或4次。这将指示在迭代期间分配但未释放的内存。
要弄清楚披露的结果,以查看个别分配。
如果您需要查看对象使用仪器的保留,释放和自动释放的位置:
在仪器中运行,在分配中设置“记录参考计数”(您必须停止记录以设置选项)。导致选择器运行,停止记录,搜索那里的ivar(datePickerView),向下钻取,你将能够看到所有保留,释放和自动释放发生的位置。
还要考虑Xcode 5,运行应用程序,选择Debug Navigator,选择Memory并观察内存发生的情况。