My application crashes as soon as I call [[ASIHTTPRequest alloc] initWithURL:url]; on my iPod Touch 1G. It has no issue on iOS 4.x.
The error I see is Error Domain=ASIHTTPRequestErrorDomain Code=10 UserInfo=0x368790 "NSRangeException"
and the backtrace I get from a crash manager system I have implemented is
backtrace: (
"0 MayasDUp 0x0007f21b -[SWCrashManager backtrace] + 18",
"1 MayasDUp 0x0007ece1 sighandler + 144",
"2 libSystem.B.dylib 0x3049e7eb _sigtramp + 26",
"3 MayasDUp 0x0005128b -[ASIHTTPRequest buildPostBody] + 850"
)
I even placed the [[ASIHTTPRequest alloc] initWithURL:url] call alone, without performing anything else like setting post variables and starting the connection. The crash still happens.
I've placed breakpoints and log NSLogs inside ASIHTTPRequest but nothing useful came out.
Has anyone had a similar issue?
You probably have something running on the main thread that is taking over 10 seconds. Are you doing synchronous http requests? You must use:
if you're on the main thread.