Re: FSEventStreamCreate: BUG in libdispatch client: kevent[EVFILT_WRITE]
Re: FSEventStreamCreate: BUG in libdispatch client: kevent[EVFILT_WRITE]
- Subject: Re: FSEventStreamCreate: BUG in libdispatch client: kevent[EVFILT_WRITE]
- From: Trygve Inda <email@hidden>
- Date: Sat, 17 Jan 2015 13:28:12 -0800
- Thread-topic: FSEventStreamCreate: BUG in libdispatch client: kevent[EVFILT_WRITE]
> On Jan 17, 2015, at 2:27 PM, Trygve Inda <email@hidden> wrote:
>
>> I am getting an error in the Console when shutting down a FSEvent monitor
>> I have verified that [self prefBundlePath] points to a valid directory (a
>> prefpane bundle).
>>
>> BUG in libdispatch client: kevent[EVFILT_WRITE] delete: "No such file or
>> directory" - 0x2
>> Ideas?
>
> Not so much a Cocoa question, but: are you sure that it's the FSEventStream
> tear-down that's causing that log message?
>
> Are both of the above methods being called on the same thread?
>
> You could try removing the call to FSEventStreamUnscheduleFromRunLoop().
> FSEventStreamInvalidate() unschedules it, too.
>
> You say that the path being monitored references a valid directory. Is it the
> same directory as it was when you set up the FSEventStream? That is, have you
> moved or deleted the prefpane bundle that was there and created a new one in
> its place? If it has changed, then it's a different inode and any
> previously-opened file descriptor would not refer to the one at the path any
> more.
>
> Otherwise, can you reproduce it in a simple example program? If so, file a
> bug report with Apple.
>
> Regards,
> Ken
>
This simple app does it too:
-(void)applicationDidFinishLaunching:(NSNotification*)notification
{
FSEventStreamRef fsStream;
FSEventStreamContext fsStreamContext = {0, self, NULL, NULL, NULL};
fsStream = FSEventStreamCreate (kCFAllocatorDefault, FSMyEventCallback,
&fsStreamContext, (CFArrayRef) [NSArray
arrayWithObject:@"/Users/trygve/Library/PreferencePanes/MyPane.prefPane"],
kFSEventStreamEventIdSinceNow, 3, kFSEventStreamCreateFlagWatchRoot);
FSEventStreamScheduleWithRunLoop (fsStream, CFRunLoopGetCurrent(),
kCFRunLoopDefaultMode);
FSEventStreamStart (fsStream);
FSEventStreamStop (fsStream);
FSEventStreamInvalidate (fsStream);
FSEventStreamRelease (fsStream);
}
void FSMyEventCallback (ConstFSEventStreamRef streamRef, void
*clientCallBackInfo, size_t numEvents, void *eventPaths, const
FSEventStreamEventFlags eventFlags[], const FSEventStreamEventId eventIds[])
{
int i = 1;
}
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please 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