尝试下载大文件时崩溃日志

时间:2012-05-08 21:09:19

标签: iphone

我正在尝试从我们的服务器下载文件。我的代码基本上是这里列出的: Downloading a large file in iOS app

每次都会中途崩溃。当我看到控制台时,我看到了这一点:

May  8 13:48:53 unknown com.apple.launchd[1] <Notice>: (UIKitApplication:com.test) Bug: launchd_core_logic.c:3732 (25562):3
May  8 13:48:53 unknown com.apple.launchd[1] <Notice>: (UIKitApplication:com.test) Assuming job exited: <rdar://problem/5020256>: 10: No child processes
May  8 13:48:53 unknown com.apple.launchd[1] <Warning>: (UIKitApplication:com.test) Job appears to have crashed: Segmentation fault: 11
May  8 13:48:53 unknown com.apple.debugserver-64[1541] <Warning>: 1 [0605/1303]: error: ::read ( 4, 0x2809d4, 1024 ) => -1 err = Bad file descriptor (0x00000009)
May  8 13:48:53 unknown SpringBoard[15] <Warning>: Application 'TestDev' exited abnormally with signal 11: Segmentation fault: 11
May  8 13:48:53 unknown ReportCrash[1555] <Notice>: Saved crashreport to /Library/Logs/CrashReporter/LowMemory-2012-05-08-134853.plist using uid: 0 gid: 0, synthetic_euid: 0 egid: 0
> 
May  8 13:50:53 unknown SpringBoard[15] <Notice>: Posting 'com.apple.iokit.hid.displayStatus' notifyState=0
May  8 13:50:53 unknown SpringBoard[15] <Notice>: MultitouchHID: detection mode: 0->255
May  8 13:50:53 unknown UserEventAgent[12] <Warning>: DEBUG: Changing screen blanked state: 1
May  8 13:50:54 unknown kernel[0] <Debug>: [000581.599475]: AppleDPDisplay::setLCDStateGated:(0x81d1eb40) Disabling
May  8 13:50:54 unknown kernel[0] <Debug>: [000000.000174]: AppleDPDisplay::terminateLink:(0x81d1eb40) Waited 0 ms for display to disable
May  8 13:50:54 unknown kernel[0] <Debug>: [000000.000025]: AppleDPDisplay::terminateLink:(0x81d1eb40) ret=0x00000000
May  8 13:50:54 unknown kernel[0] <Debug>: [000000.000759]: AppleDPDisplay::deviceTerminated:(0x81d1eb40) device=0x952a3a80
May  8 13:50:54 unknown kernel[0] <Debug>: [000000.000117]: AppleDPDisplay::setPower:(0x81d1eb40) enable=0 ret=0x00000000
May  8 13:50:54 unknown kernel[0] <Debug>: [000000.000024]: AppleDPDisplay::setLCDStateGated:(0x81d1eb40) enable=0 ret=0x00000000

我有NSZombieEnabled,我什么都没看到。当我把它关闭时,我也会遇到同样的崩溃。

在日志中,我看到了

Count   resident pages
152534 (jettisoned) 

有什么想法?谢谢!

1 个答案:

答案 0 :(得分:0)

这似乎是Apple的bug。

来自Apple工程师的评论,源代码为launchd_core_logic(http://opensource.apple.com/source/launchd/launchd-392.36/launchd/src/launchd_core_logic.c):

            /* We have to work around one of two kernel bugs here. ptrace(3) may
         * have abducted the child away from us and reparented it to the tracing
         * process. If the process then exits, we still get NOTE_EXIT, but we
         * cannot reap it because the kernel may not have restored the true
         * parent/child relationship in time.
         *
         * See <rdar://problem/5020256>.
         *
         * The other bug is if the shutdown monitor has suspended a task and not
         * resumed it before exiting. In this case, the kernel will not clean up
         * after the shutdown monitor. It will, instead, leave the task
         * task suspended and not process any pending signals on the event loop
         * for the task.
         *
         * There are a variety of other kernel bugs that could prevent a process
         * from exiting, usually having to do with faulty hardware or talking to
         * misbehaving drivers that mark a thread as uninterruptible and
         * deadlock/hang before unmarking it as such. So we have to work around
         * that too.
         *
         * See <rdar://problem/9284889&9359725>.
         */