gtoolkit icon indicating copy to clipboard operation
gtoolkit copied to clipboard

AbstractFileReference>>#deleteAll crashes the VM on Windows when a GtFileWatcherEventLoop / GtFileWatcher is active

Open svenvc opened this issue 1 year ago • 1 comments

AbstractFileReference>>#deleteAll crashes the VM on Windows when a GtFileWatcherEventLoop / GtFileWatcher is active.

Here are two snippets (just DoIt is enough):

(FileLocator home / 'MyDir') in: [ :myDir | 
	myDir ensureCreateDirectory.
	myDir watcher.
	myDir deleteAll ]

and

dir := (FileLocator imageDirectory / 'xxx') resolve.
dir ensureCreateDirectory.
watcher := dir watcher.
dir deleteAll

while the following work:

(FileLocator home / 'MyDir') ensureCreateDirectory; deleteAll

and

((FileLocator temp / 'MyDir' / 'MyFile.txt') ensureCreateFile; parent) deleteAll

Note: this is Windows specific, this works on macOS and Linux.

svenvc avatar Jul 19 '24 08:07 svenvc

https://github.com/notify-rs/notify/issues/403

svenvc avatar Jul 19 '24 12:07 svenvc

This is fixed as of v1.0.1451. There are multiple changes and refactorings that have happened in filewatcher, but the important part for this bug was an upgrade of the notify crate to 8.0.0 (https://github.com/notify-rs/notify/issues/624 was the root cause).

hellerve avatar Jan 15 '25 22:01 hellerve

Thank!

svenvc avatar Jan 16 '25 07:01 svenvc