Hello,
I am currently using Andrian Kosmaczewski's REST client (http://kosmaczewski.net/projects/objective-c-rest-client/), which uses NSURLConnection and NSURLRequest to access a RESTful web service. (I am currently using BASIC authentication through https.) My app currently works perfectly fine when running on iPhone 2.2.1 and 3.0 (both simulator and device), but crashes when running on 3.1 (also both simulator and device).
The error that is given in the debugger is:
Even after setting NSZombiesEnabled, this is all I am able to get from the stack trace. For this thread, as well as all other threads, the stack trade does not include anything that is part of my own code:
I have tried to create a brand new, barebones app that has none of the logic and essentually just tries to log into the web service and I am still receiving the same errors.
Here is the code chunk that instanciates and calls the wrapper. I am positive that the username, password and web service url are correct, because the behavior is correct when I run using 3.0 or 2.2.1:
Setting breakpoints as well as NSLogs, it seems that it runs through that code chunk just fine. It also goes through the Wrapper library's sendRequestTo, startConnection and didReceiveAuthenticationChallenge functions just fine. But it never reaches didReceiveResponse, didReceiveData, didFailWithError or connectionDidFinishLoading. It seems to just die off somewhere after the authentication challenge, but before a response is received.
Any pointers or advice would be greatly appreciated.
Thank you,
Huan
I am currently using Andrian Kosmaczewski's REST client (http://kosmaczewski.net/projects/objective-c-rest-client/), which uses NSURLConnection and NSURLRequest to access a RESTful web service. (I am currently using BASIC authentication through https.) My app currently works perfectly fine when running on iPhone 2.2.1 and 3.0 (both simulator and device), but crashes when running on 3.1 (also both simulator and device).
The error that is given in the debugger is:
Code:
objc[4701]: FREED(id): message release sent to freed object=0x3da1ca0
Program received signal: EXC_BAD_INSTRUCTION.
Even after setting NSZombiesEnabled, this is all I am able to get from the stack trace. For this thread, as well as all other threads, the stack trade does not include anything that is part of my own code:
Code:
#0 0x93078bfa in _objc_error
#1 0x93078c30 in __objc_error
#2 0x93077637 in _freedHandler
#3 0x00285cf5 in NSPopAutoreleasePool
#4 0x00ccce71 in URLConnectionClient::ClientConnectionEventQueue::processAllEventsAndConsumePayload
#5 0x00ccda96 in URLConnectionClient::processEvents
#6 0x00c7a7d5 in MultiplexerSource::perform
#7 0x007b78e1 in CFRunLoopRunSpecific
#8 0x007b6c48 in CFRunLoopRunInMode
#9 0x000167ad in GSEventRunModal
#10 0x00016872 in GSEventRun
#11 0x0168a003 in UIApplicationMain
#12 0x0000265a in main at main.m:14
I have tried to create a brand new, barebones app that has none of the logic and essentually just tries to log into the web service and I am still receiving the same errors.
Here is the code chunk that instanciates and calls the wrapper. I am positive that the username, password and web service url are correct, because the behavior is correct when I run using 3.0 or 2.2.1:
Code:
// Initialize the REST engine
if(engine == nil) {
engine = [[Wrapper alloc] init];
}
// Configure the connection with user input and the api key
NSString *parameters = nil;
engine.delegate = self;
engine.username = *username*
engine.password = *password*
NSURL *url = [NSURL URLWithString: *web service url*];
[engine sendRequestTo:url usingVerb: @"GET" withParameters: parameters];
Setting breakpoints as well as NSLogs, it seems that it runs through that code chunk just fine. It also goes through the Wrapper library's sendRequestTo, startConnection and didReceiveAuthenticationChallenge functions just fine. But it never reaches didReceiveResponse, didReceiveData, didFailWithError or connectionDidFinishLoading. It seems to just die off somewhere after the authentication challenge, but before a response is received.
Any pointers or advice would be greatly appreciated.
Thank you,
Huan