Sometimes, depending on hardware, I have a crash when deleting an instance of FileWatcher.
It seems to happen if I have overlapped operations during DestroyWatch method.
I fixed it by replacing CancelIO by CancelIOEx in DestroyWatch (and, bonus, I could then remove the 5ms sleep.)
CancelIo—this function only cancels operations issued by the calling thread for the specified file handle.
CancelIoEx—this function cancels all operations issued by the threads for the specified file handle.
I think we may have operation from different threads in your lib...
Original report by Guillaume BOTTESI (Bitbucket: gbottesi, GitHub: gbottesi).
Hi!
Sometimes, depending on hardware, I have a crash when deleting an instance of FileWatcher. It seems to happen if I have overlapped operations during DestroyWatch method.
I fixed it by replacing CancelIO by CancelIOEx in DestroyWatch (and, bonus, I could then remove the 5ms sleep.)
Here is how it looks like :
This is quite a random bug and I don't really have a way to reproduce (well other than my complete soft here which I can't really give you).
Reading MSDN : https://msdn.microsoft.com/en-us/library/windows/desktop/aa365683%28v=vs.85%29.aspx
It's said :
I think we may have operation from different threads in your lib...