flutter
flutter copied to clipboard
Killed isolate still holding files it created on windows
Go to this repo for a reproducible demo. Build and run the app:
Tap "start isolate". It generates a tmp file path on main thread and passes it to a new isolate, which then creates the file and writes data to it periodically.
Wait a few secs and tap "stop isolate". The running isolate should be killed and main thread gets notifed and then tries to delete the tmp file. On macOS / iOS / Android, the tmp file can be successfully deleted like this:
But on windows, it 100% failed with:
the process cannot access the file because it is being used by another process. errno = 32)

The killed isolate seems to still hold the tmp file and prevent other processes from accessing it.
flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.7.3, on Microsoft Windows [Version 10.0.22621.1105], locale en-US)
[✓] Windows Version (Installed version of Windows is version 10 or higher)
[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.1)
[✓] Chrome - develop for the web
[✓] Visual Studio - develop for Windows (Visual Studio Enterprise 2022 17.4.4)
[✓] Android Studio (version 2022.1)
[✓] VS Code (version 1.75.1)
[✓] Connected device (3 available)
[✓] HTTP Host Availability
• No issues found!