Repository navigation
Description
Steps to reproduce
Windows 10, Flutter 3.44.9 stable (also reproducible with any recent stable).
flutter create mini && cd mini && flutter run -d windows- Edit
lib/main.dart, hot reload → applied (compile "1 updated files"). - Within the same wall-clock second as that compile, edit
lib/main.dartagain
(an IDE/agent/script saving right after the reload finishes; the reload itself
takes ~300 ms) and pressr(orR) again.
Expected results
The second edit is compiled and reloaded/restarted.
Actual results
flutter run -v shows Compiling dart to kernel with 0 updated files; the app keeps
running the previous source. Waiting until the next second before saving makes it work.
Cause
ProjectFileInvalidator.findInvalidated compares statSync().modified.isAfter(lastCompiled)
(packages/flutter_tools/lib/src/run_hot.dart), where lastCompiled is a millisecond
DateTime.now() captured at the start of DevFS.update. On Windows dart:io reports
file mtimes truncated to whole seconds:
final f = File('x')..writeAsStringSync('a');
print(DateTime.now()); // 09:52:37.637611
print(f.statSync().modified); // 09:52:37.000 ← truncatedSo an edit at 09:52:37.637 after a compile that started at 09:52:37.271 has mtime
09:52:37.000, which is not isAfter(lastCompiled), and is dropped. Consecutive human
r presses rarely fall in the same second, but IDE "reload on save" and agent
tooling (edit → reload immediately) hit it constantly, and the failure is silent.
Suggested fix
Truncate lastCompiled to second precision on Windows before comparing (or compare
!updatedAt.isBefore(lastCompiledTruncatedToSecond)), or use a strictly monotone
per-file mtime snapshot instead of a wall-clock cut-off. Alternatively fix
FileStat.modified precision in dart:io on Windows (uses _wstat64 → time_t).
Logs
[ ] Performing hot restart...
[ +85 ms] Scanned through 677 files in 85ms
[ ] Compiling dart to kernel with 0 updated files
[ ] Restarted application in 349ms.
Flutter Doctor output
flutter doctor -v
[√] Flutter (Channel stable, 3.44.9, on Microsoft Windows [version 10.0.19045.6466], locale fr-FR) [545ms]
• Flutter version 3.44.9 on channel stable at C:\dev\flutter
• Upstream repository https://github.com/flutter/flutter.git
• FLUTTER_GIT_URL = https://github.com/flutter/flutter.git
• Framework revision 6b182d2c75 (12 days ago), 2026-08-05 10:04:07 -0700
• Engine revision 5a2a6a42cc
• Dart version 3.12.2
• DevTools version 2.57.0
• Feature flags: enable-web, enable-linux-desktop, enable-macos-desktop, enable-windows-desktop, enable-android, enable-ios, cli-animations, enable-native-assets, enable-swift-package-manager, omit-legacy-version-file, enable-lldb-debugging, enable-uiscene-migration
[√] Windows Version (10 Famille 64 bits, 22H2, 2009) [3,6s]
[√] Android toolchain - develop for Android devices (Android SDK version 35.0.0) [3,9s]
• Android SDK at C:\Users\corne\AppData\Local\Android\sdk
• Emulator version 32.1.15.0 (build_id 10696886) (CL:N/A)
• Platform android-36, build-tools 35.0.0
• Java binary at: C:\Program Files\Android\Android Studio1\jbr\bin\java
This is the JDK bundled with the latest Android Studio installation on this machine.
To manually set the JDK path, use: `flutter config --jdk-dir="path/to/jdk"`.
• Java version OpenJDK Runtime Environment (build 21.0.5+-12932927-b750.29)
• All Android licenses accepted.
[√] Chrome - develop for the web [176ms]
• CHROME_EXECUTABLE = C:\Program Files\BraveSoftware\Brave-Browser\Application\brave.exe
[√] Visual Studio - develop Windows apps (Visual Studio Professional 2022 17.14.25 (January 2026)) [175ms]
• Visual Studio at Z:\Microsoft Visual Studio\2022\Professional
• Visual Studio Professional 2022 version 17.14.36915.13
• Windows 10 SDK version 10.0.26100.0
[√] Connected device (3 available) [355ms]
• Windows (desktop) • windows • windows-x64 • Microsoft Windows [version 10.0.19045.6466]
• Chrome (web) • chrome • web-javascript • unknown
• Edge (web) • edge • web-javascript • Microsoft Edge 150.0.4078.105
[√] Network resources [410ms]
• All expected network resources are available.
• No issues found!
Activity
mbcorona commentedon Aug 17, 2026
Hi @pierre-cheneau, thanks for the report and the clear root-cause analysis. Confirmed in run_hot.dart — routing to the tool team.
[tool] Fix Windows hot reload mtime truncation issue (flutter#191271)
[stable] [tool] Fix Windows hot reload mtime truncation issue (#191599)
github-actions commentedon Sep 2, 2026
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of
flutter doctor -vand a minimal reproduction of the issue.