IPhone SendDelegateMessage failed to return after waiting 10 Secs
deadlock, iphone, objective-c
Solution
As it says: you take too long ;D web view to english: " i called a delegate and it takes too long and I can't continue displaying HTML or running JS"
don't block the web view or it will complain after a while...
so doing a synchronous request? on the main thread? never do that
Better way:
- webView:... {
dispatch_async(dispatch_get_global_queue(0,0), ^{
//DO LONG RUNNING IN BG
dispatch_sync(dispatch_get_main_queue(), ^{
//update UI
}
}
}
Problem
I keep getting the following message from my iPhone 3.0 when trying to convert a large NSData object into base64Encoding for http transmission : ``` void SendDelegateMessage(NSInvocation*): delegate failed to return after waiting 10 seconds. main run loop mode: kCFRunLoopDefaultMode ``` If you were not using the touch screen for this entire interval (which can prolong this wait), please file a bug. I am using synchronous request and touch screen will be frozen with only UIProgressView displaying status while uploading data. Anyone have any good idea how to resolve this problem ?