Application Error in NSURLConnection

I am trying to figure out what causes this crash. I created and gave the application to our testers, but we cannot reproduce it reliably. Sometimes it happens...

Thread 0 Crashed:
0   libobjc.A.dylib                0x000027da objc_msgSend + 18
1   Foundation                     0x00032896 -[NSURLConnection(NSURLConnectionReallyInternal) sendDidFinishLoading] + 62
2   Foundation                     0x00032818 _NSURLConnectionDidFinishLoading + 72
3   CFNetwork                      0x00010dd8 URLConnectionClient::_clientDidFinishLoading(URLConnectionClient::ClientConnectionEventQueue*) + 160
4   CFNetwork                      0x00004ad4 URLConnectionClient::ClientConnectionEventQueue::processAllEventsAndConsumePayload(XConnectionEventInfo<XClientEvent, XClientEventParams>*, long) + 96
5   CFNetwork                      0x000049c4 URLConnectionClient::processEvents() + 64
6   CFNetwork                      0x00004976 URLConnection::multiplexerClientPerform(RunLoopMultiplexer*) + 30
7   CFNetwork                      0x000048f4 MultiplexerSource::perform() + 120
8   CFNetwork                      0x00004872 MultiplexerSource::_perform(void*) + 2
9   CoreFoundation                 0x00055f1e __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 6
10  CoreFoundation                 0x00027ba0 __CFRunLoopDoSources0 + 376
11  CoreFoundation                 0x00027444 __CFRunLoopRun + 224
12  CoreFoundation                 0x00027270 CFRunLoopRunSpecific + 224
13  CoreFoundation                 0x00027178 CFRunLoopRunInMode + 52
14  GraphicsServices               0x000045ec GSEventRunModal + 108
15  GraphicsServices               0x00004698 GSEventRun + 56
16  UIKit                          0x0000411c -[UIApplication _run] + 396
17  UIKit                          0x00002128 UIApplicationMain + 664
18  myapp                          0x000020d8 main (main.m:14)
19  myapp                          0x0000208c start + 32

Any advice would be greatly appreciated. The application is built in Xcode 3.2.4 using the SDK 4.1.

Greeting...

+3
source share
2 answers

Ben has sound advice. Enable NSZombieEnabled to enable.

I can tell you almost 100% confidence that it is crashing because you have a nil object when a delegate tries to send him a message.

, , , , , autorelease. Autorelease , , , . , .

+1

NSZombieEnabled , . ?

+2

Source: https://habr.com/ru/post/1768908/


All Articles