J'ai rencontré un étrange problème
J'utilise une connexion NSURLConnection pour effectuer des requêtes URL.
il fonctionne bien sur le simulateur
mais il se plante sur l'ipad2 5.0
J'ai essayé sur iPad1 5.01 ,ipad2 4.33,ipad2 5.01, ça a bien marché.
crash sur l'ipad2 5.0
Je ne suis pas sûr du problème
il semble que quelque chose ne va pas avec
[NSURLConnection(Loader) _resourceLoadLoop :]
Je pensais que le délégué de NSURLConnection pouvait être détruit avant que NSURLConnection ne fasse son travail.
J'ai donc conservé le délégué, mais je me plante toujours.
Quelqu'un sait-il ce qui peut causer ce problème ?
journal du crash :
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