Re: MacSoftware update causes my application to hang
Re: MacSoftware update causes my application to hang
- Subject: Re: MacSoftware update causes my application to hang
- From: Balaram Barange <email@hidden>
- Date: Mon, 11 Dec 2006 05:30:49 +0000 (GMT)
Hi All,
Thanks for the reply.
I have examined my process using the Thread Viewer.It gave me some insight to the problem, what I have found out is that my application hangs when I tried to check the server reachability using the method. SCNetworkRechabilityByName.
The following was the stack trace.
mach_msg_trap
_lookup_all_secure
_lookup_all
gailooupd
getaddrinfo:
__SCNetworkRechabilityGetFlags:
SCNetworkRechabilityGetFlags:
SCNetworkRechabilityByName:
MyserverReachabilitycheckmethod:
myHTTPRequestProcessMethod:
......
And its hangin here no changes in the stact trace after this.
it hangs here now if a quit the software update, so after 4-5 minute my application resumes.
so my conclusion says when it try to look for SCNetworkRechabilityGetFlags in SCNetworkRechabilityByName method. it hangs here if the software update is running.
I have no clues why?
Thanks
Bala
j o a r <email@hidden> wrote:
On 9 dec 2006, at 13.19, Balaram Barange wrote:
> My application is sync application which sync a
> calendar server with ical using the sync services.
> What I have analyzed that my application hangs when it
> reads data from http stream (with the server)and the
> software update is running.
Two things:
1) You should use threads / asynchronous API:s when performing
network I/O in a GUI application. NSURLConnection / NSURLDownload are
good candidates for this. My suggestion would be that you spend your
time on investigating switching to a better API for your downloading
needs. I haven't used Synch Services, so I don't know what type of
restrictions it imposes on your design though.
2) I seriously doubt that Software Update could cause a HTTP download
in your application to hang and never return. If you have a very slow
connection, perhaps it could timeout? If you're not using an API that
provides you with proper control and error handling, that's perhaps
something that might be difficult to detect.
As always, if you think you've found a bug, reproduce it in a small
sample project, and submit it with a bug report to Apple.
j o a r
Send instant messages to your online friends http://uk.messenger.yahoo.com
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden