加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

iPhone应用程序在从Xcode启动时崩溃,但不是从iPhone启动

发布时间:2020-12-14 18:10:15 所属栏目:百科 来源:网络整理
导读:我有一个应用程序在iPhone上崩溃,但只有当它通过 Xcode启动时. 我可以在iPhone控制台日志中看到应用程序收到内存警告,然后有一些奇怪的事件,如下所示: Sun Jul 11 00:03:43 Matts-iPhone com.apple.launchd[1] (UIKitApplication:com.mycom.myapp[0x3f60][5
我有一个应用程序在iPhone上崩溃,但只有当它通过 Xcode启动时.

我可以在iPhone控制台日志中看到应用程序收到内存警告,然后有一些奇怪的事件,如下所示:

Sun Jul 11 00:03:43 Matts-iPhone com.apple.launchd[1] (UIKitApplication:com.mycom.myapp[0x3f60][5591]) <Notice>: (UIKitApplication:com.mycom.myapp[0x3f60]) Bug: launchd_core_logic.c:3270 (24132):0
Sun Jul 11 00:03:43 Matts-iPhone com.apple.debugserver-48[5590] <Warning>: 1 [15d6/1403]: error: ::read ( 6,0x3809f4,1024 ) => -1 err = Bad file descriptor (0x00000009)
Sun Jul 11 00:03:43 Matts-iPhone com.apple.launchd[1] (UIKitApplication:com.mycom.myapp[0x3f60][5591]) <Notice>: (UIKitApplication:com.mycom.myapp[0x3f60]) Bug: launchd_core_logic.c:2688 (24132):10
Sun Jul 11 00:03:43 Matts-iPhone com.apple.launchd[1] (UIKitApplication:com.mycom.myapp[0x3f60][5591]) <Notice>: (UIKitApplication:com.mycom.myapp[0x3f60]) Working around 5020256. Assuming the job crashed.
Sun Jul 11 00:03:43 Matts-iPhone com.apple.launchd[1] (UIKitApplication:com.mycom.myapp[0x3f60][5591]) <Warning>: (UIKitApplication:com.mycom.myapp[0x3f60]) Job appears to have crashed: Segmentation fault
Sun Jul 11 00:03:43 Matts-iPhone SpringBoard[40] <Warning>: Application 'Phone' exited abnormally with signal 9: Killed
Sun Jul 11 00:03:45 Matts-iPhone SpringBoard[40] <Warning>: Application 'myapp' exited abnormally with signal 11: Segmentation fault

但是,当我从手机启动应用程序(而不是通过Xcode)时,它按预期工作. (在发布期间有一个内存警告.我知道它运行正常,但它恢复并且不会崩溃).

这使得调试其他问题变得特别困难.

我偶然发现了一些iOS错误吗?

有任何想法吗?

解决方法

在我的情况下,我忘记了我仍然有“NSZombiesEnabled”环境变量集,这从Xcode启动时增加了实际内存使用量(导致崩溃).直接从Springboard启动时,未设置该环境变量,并且应用程序使用的内存较少.

它对于调试非常有用……直到你的内存耗尽并忘记它在那里:)

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读