gpt4 book ai didi

iOS NSURLConnection _resourceLoadLoop 崩溃

转载 作者:可可西里 更新时间:2023-11-01 06:16:51 26 4
gpt4 key购买 nike

我遇到了一个奇怪的问题

我正在使用 NSURLConnection 做一些 URL 请求

在模拟器上运行良好

但它在 ipad2 5.0 上崩溃

我在 iPad1 5.01、ipad2 4.33、ipad2 5.01 上试过,都很好

只是在 ipad2 5.0 上崩溃

我不确定是什么问题

好像有问题

[NSURLConnection(Loader) _resourceLoadLoop:]

我想也许 NSURLConnection 的委托(delegate)可能会在 NSURLConnection 完成它的工作之前被销毁

所以我保留了委托(delegate),但仍然崩溃

有谁知道是什么导致了这个问题?

崩溃日志:

Date/Time:       2012-02-14 23:31:47.416 +0800
OS Version: iPhone OS 5.0 (9A334)
Report Version: 104

Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0x000049de
Highlighted Thread: 3

Thread 0 name: Dispatch queue: com.apple.libdispatch-manager
Thread 0:
0 libsystem_kernel.dylib 0x31e973b4 kevent + 24
1 libdispatch.dylib 0x316a6f74 _dispatch_mgr_invoke + 708
2 libdispatch.dylib 0x316a6c92 _dispatch_mgr_thread + 30

Thread 1:
0 libsystem_kernel.dylib 0x31ea7cd4 __workq_kernreturn + 8
1 libsystem_c.dylib 0x30d2730a _pthread_wqthread + 610
2 libsystem_c.dylib 0x30d2709c start_wqthread + 0

Thread 2 name: WebThread
Thread 2:
0 libsystem_kernel.dylib 0x31e97010 mach_msg_trap + 20
1 libsystem_kernel.dylib 0x31e97206 mach_msg + 50
2 CoreFoundation 0x371c441c __CFRunLoopServiceMachPort + 120
3 CoreFoundation 0x371c3154 __CFRunLoopRun + 876
4 CoreFoundation 0x371464d6 CFRunLoopRunSpecific + 294
5 CoreFoundation 0x3714639e CFRunLoopRunInMode + 98
6 WebCore 0x347ac128 _ZL12RunWebThreadPv + 396
7 libsystem_c.dylib 0x30d2cc16 _pthread_start + 314
8 libsystem_c.dylib 0x30d2cad0 thread_start + 0

Thread 3 name: com.apple.NSURLConnectionLoader
Thread 3:
0 libsystem_kernel.dylib 0x31e97010 mach_msg_trap + 20
1 libsystem_kernel.dylib 0x31e97206 mach_msg + 50
2 CoreFoundation 0x371c441c __CFRunLoopServiceMachPort + 120
3 CoreFoundation 0x371c3154 __CFRunLoopRun + 876
4 CoreFoundation 0x371464d6 CFRunLoopRunSpecific + 294
5 CoreFoundation 0x3714639e CFRunLoopRunInMode + 98
6 Foundation 0x31ab0bc2 +[NSURLConnection(Loader) _resourceLoadLoop:] + 302
7 Foundation 0x31ab0a8a -[NSThread main] + 66
8 Foundation 0x31b4459a __NSThread__main__ + 1042
9 libsystem_c.dylib 0x30d2cc16 _pthread_start + 314
10 libsystem_c.dylib 0x30d2cad0 thread_start + 0

Thread 4 name: WebCore: CFNetwork Loader
Thread 4:
0 libsystem_kernel.dylib 0x31e97010 mach_msg_trap + 20
1 libsystem_kernel.dylib 0x31e97206 mach_msg + 50
2 CoreFoundation 0x371c441c __CFRunLoopServiceMachPort + 120
3 CoreFoundation 0x371c3154 __CFRunLoopRun + 876
4 CoreFoundation 0x371464d6 CFRunLoopRunSpecific + 294
5 CoreFoundation 0x3714639e CFRunLoopRunInMode + 98
6 WebCore 0x347d569e _ZN7WebCoreL15runLoaderThreadEPv + 122
7 libsystem_c.dylib 0x30d2cc16 _pthread_start + 314
8 libsystem_c.dylib 0x30d2cad0 thread_start + 0

Thread 5 name: com.apple.CFSocket.private
Thread 5:
0 libsystem_kernel.dylib 0x31ea7570 __select + 20
1 CoreFoundation 0x371c866a __CFSocketManager + 726
2 libsystem_c.dylib 0x30d2cc16 _pthread_start + 314
3 libsystem_c.dylib 0x30d2cad0 thread_start + 0

Thread 6 name: WebCore: LocalStorage
Thread 6:
0 libsystem_kernel.dylib 0x31ea7068 __psynch_cvwait + 24
1 libsystem_c.dylib 0x30d2cf2e _pthread_cond_wait + 634
2 libsystem_c.dylib 0x30d2ccaa pthread_cond_wait + 34
3 JavaScriptCore 0x3382040e WTF::ThreadCondition::timedWait(WTF::Mutex&, double) + 54
4 WebCore 0x3490b494 WTF::PassOwnPtr<WebCore::LocalStorageTask> WTF::MessageQueue<WebCore::LocalStorageTask>::waitForMessageFilteredWithTimeout<bool ()(WebCore::LocalStorageTask*)>(WTF::MessageQueueWaitResult&, bool (&)(WebCore::LocalStorageTask*), double) + 52
5 WebCore 0x3490b44a WebCore::LocalStorageThread::threadEntryPointCallback(void*) + 106
6 libsystem_c.dylib 0x30d2cc16 _pthread_start + 314
7 libsystem_c.dylib 0x30d2cad0 thread_start + 0

Unknown thread crashed with ARM Thread State:
r0: 0x0000499a r1: 0x00000000 r2: 0x35fca80d r3: 0x00000000
r4: 0x0014bf50 r5: 0x3e4ce540 r6: 0x00115030 r7: 0x00000000
r8: 0x001d5a60 r9: 0x000000fb r10: 0x2fe5a688 r11: 0x305b1913
ip: 0x00067a2d sp: 0x2fe5a688 lr: 0x00067a49 pc: 0x30878f4e
cpsr: 0x60000030

最佳答案

当崩溃日志显示“突出显示的线程:”时,它可能仍然是一个不同的线程。不确定。

除了线程 0(主线程)之外的所有线程似乎都在等待或陷阱中停止。由于线程 0 是唯一一个看起来处于事件状态的线程,因此它是崩溃的真正根源。

由于线程 0 在底部确实有 main() 或 UIApplication,堆栈可能已损坏,或者它在某些使用非标准方式构建堆栈帧的系统函数中。

关于iOS NSURLConnection _resourceLoadLoop 崩溃,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9287125/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com