views:

264

answers:

0

Hi, My iphone application is crashing on iPhone 3G with iOS4 device with some of the logs as below:

9   libobjc.A.dylib                 0x00006504 objc_exception_throw + 104
10  CoreFoundation                  0x000a3e08 -[NSObject(NSObject) doesNotRecognizeSelector:] + 92
11  CoreFoundation                  0x000a32a4 ___forwarding___ + 500
12  CoreFoundation                  0x00032c48 _CF_forwarding_prep_0 + 40
13  CoreFoundation                  0x0001f96a -[NSObject(NSObject) copy] + 10
14  Foundation                      0x00046002 -[NSError localizedDescription] + 46
15  CVCrDVR                         0x0000d302 -[WebServiceConnector connection:didFailWithError:] (WebServiceConnector.m:117)
16  Foundation                      0x000407d6 -[NSURLConnection(NSURLConnectionReallyInternal) sendDidFail:] + 130
17  Foundation                      0x00040710 _NSURLConnectionDidFail + 80
18  CFNetwork                       0x000dcb54 URLConnectionClient::_clientDidFailWithError(__CFError*, URLConnectionClient::ClientConnectionEventQueue*) + 668
19  CFNetwork                       0x0000650c URLConnectionClient::ClientConnectionEventQueue::processAllEventsAndConsumePayload(XConnectionEventInfo<XClientEvent, XClientEventParams>*, long) + 324
20  CFNetwork                       0x000068bc URLConnectionClient::ClientConnectionEventQueue::processAllEventsAndConsumePayload(XConnectionEventInfo<XClientEvent, XClientEventParams>*, long) + 1268
21  CFNetwork                       0x000062c8 URLConnectionClient::processEvents() + 92

Another log:

0   libobjc.A.dylib                 0x000034f8 objc_msgSend + 24
1   CoreFoundation                  0x00001d4a CFRetain + 54
2   CFNetwork                       0x000b5038 _CFNetworkErrorCopyLocalizedDescriptionWithHostname + 52
3   CFNetwork                       0x000dc908 URLConnectionClient::_clientDidFailWithError(__CFError*, URLConnectionClient::ClientConnectionEventQueue*) + 80
4   CFNetwork                       0x0000650c URLConnectionClient::ClientConnectionEventQueue::processAllEventsAndConsumePayload(XConnectionEventInfo<XClientEvent, XClientEventParams>*, long) + 324
5   CFNetwork                       0x000068bc URLConnectionClient::ClientConnectionEventQueue::processAllEventsAndConsumePayload(XConnectionEventInfo<XClientEvent, XClientEventParams>*, long) + 1268
6   CFNetwork                       0x000062c8 URLConnectionClient::processEvents() + 92

I am unable to figure out what is the cause of error. We are testig on 3GS and iPod touch devices with iOS4 and 3.1.3 as well and the app works fine on them. I googled and came across sites which say the NSError localizedDescription is known to cause crashes.

The logs seem to point to NSURLConnection delegate method connectionDidFailWithError which is as below:

- (void)connection:(NSURLConnection *)connection didFailWithError:(NSError *)error{
    if(commonSettings.backgroundSupported && appDelegate.bgTask != UIBackgroundTaskInvalid){

        [app endBackgroundTask:appDelegate.bgTask];
        appDelegate.bgTask = UIBackgroundTaskInvalid;
    }
    statusCode = [error code];

    statusMessage = [error localizedDescription];

    [self.delegate connectionDidFail:self]; 

}

Any help on how to find the cause of the crashes would be great.

Thanks and Regards,

Hetal