Re: DiskArbitration woes
Re: DiskArbitration woes
- Subject: Re: DiskArbitration woes
- From: Ed Wynne <email@hidden>
- Date: Thu, 22 May 2008 20:16:27 -0400
On May 22, 2008, at 7:54 PM, Ron Aldrich wrote: As far as I can tell, I've registered it with the application's main run loop, which should be unblocked, for the most part.
Here's the code that sets up the DASession:
daSession = DASessionCreate(kCFAllocatorDefault); NSParameterAssert(daSession != nil);
daApprovalSession = DAApprovalSessionCreate(kCFAllocatorDefault); NSParameterAssert(daApprovalSession != nil);
daRunLoop = CFRunLoopGetCurrent(); NSParameterAssert(daRunLoop != nil);
DASessionScheduleWithRunLoop(daSession, daRunLoop, kCFRunLoopCommonModes); DAApprovalSessionScheduleWithRunLoop(daApprovalSession, daRunLoop, kCFRunLoopCommonModes);
There is, however, a modal sheet being displayed while all this is going on. Could that be preventing the DASession from processing events?
The usual suspects for handling modal sheets / dialogs all handle it with a common run loop mode, so your code should be doing the right thing to deal with this situation... unless your modal sheet isn't spinning on a common run loop mode. Also, while the call to DARegisterDiskPeekCallback is being made on the main thread, the call to DADiskClaim is not. Could this be a problem?
I wouldn't expect this to matter.
The console message you described in your earlier message happens when diskarb sends you a message and then times out waiting for a response. So the behavioral pattern I described must be happening, it may just be for a secondary reason. DiskArb has a little known, and very annoying, behavior where it will disconnect clients once they have timed out. Are you certain the timeout message is in response to the action you are associating it with? Perhaps some earlier action left your app unresponsive long enough to cause DiskArb to whine and disconnect you. Later actions would then just appear to be deaf.
-Ed
|
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden