-
-
Notifications
You must be signed in to change notification settings - Fork 578
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chokidar causes app crash if removing nested directories in Node 10 in Windows #730
Comments
Progress in investigation. It is a call to watcher.close() that causes the app crash. Proof is same assertion failure if in above listed test of fs.watch after the remove at 3000ms but before the "running just fine" log insert lines
and the same if using
Apparently this only happens in Node 10, versus problem does not occur in Node 8. Verified in Node 10.1.0 versus Node 8.11.2. As mentioned above, Windows only. May have to do with Node 10 having a change of architecture, including emitting a close event from an fs.FSWatcher per https://nodejs.org/api/fs.html#fs_class_fs_fswatcher . |
Could not tell whether this is the best possible fix for issue paulmillr#730, but so far this apparently prevents crashes in some apps.
Have submitted a patch here #731. It apparently works for us, but am not hundred percent sure it is ideal. Also have submitted an issue at Node nodejs/node#21276, short sample code without chokidar. |
Better patch in #732. |
Prevent watcher.close() crashing - fix Issue #730
Using release 2.0.3 here is reproducible code.
Proof is at the end, crashes before getting to the end.
Occurs in Windows only.
Also proves probably should not blame fs.watch.
The text was updated successfully, but these errors were encountered: