Repository navigation
Description
Crash Report Context
- Flutter Version: Flutter 3.47.1 stable
- Volume: 354 crashes (16.9% share of Top 10 crashes in Flutter 3.47.1)
- Signature:
ProcessException at _ProcessImpl._start at dart:io-patch/process_patch.dart-81ce53bf - Error Message:
ProcessException: An Application Control policy has blocked this file (at ../../runtime/bin/process_win.cc:579)
Command: ...\flutter\bin\cache\dart-sdk\bin\dartaotruntime.exe ... frontend_server_aot.dart.snapshot ...
Stack Trace
_ProcessImpl._start (dart:io-patch/process_patch.dart:411)
Process.start (dart:io-patch/process_patch.dart:42)
LocalProcessManager.start (package:process/src/interface/local_process_manager.dart:42)
ErrorHandlingProcessManager.start.<anonymous closure> (package:flutter_tools/src/base/error_handling_io.dart:1284)
_run (package:flutter_tools/src/base/error_handling_io.dart:1052)
ErrorHandlingProcessManager.start (package:flutter_tools/src/base/error_handling_io.dart:1282)
DefaultResidentCompiler._compile (package:flutter_tools/src/compile.dart:1000)
DefaultResidentCompiler._recompile (package:flutter_tools/src/compile.dart:877)
_RecompileRequest._run (package:flutter_tools/src/compile.dart:451)
_CompilationRequest.run (package:flutter_tools/src/compile.dart:424)
DefaultResidentCompiler._handleCompilationRequest (package:flutter_tools/src/compile.dart:928)
Root Cause Analysis
On Windows systems with security policies such as Smart App Control (SAC), Windows Defender Application Control (WDAC), or AppLocker enabled, the operating system blocks untrusted, unrecognized, or unsigned binaries from executing. When Process.start or Process.run attempts to spawn dartaotruntime.exe (e.g. for frontend server compilation), the Win32 CreateProcessW call fails with error code 4551 (ERROR_APPLICATION_CONTROL_POLICY_BLOCK) or 1260 (ERROR_ACCESS_DISABLED_BY_POLICY).
In flutter_tools, ErrorHandlingProcessManager catches ProcessException and routes it to _handleWindowsException. However, _handleWindowsException does not recognize error codes 4551 or 1260 (or general policy/application control block exceptions). As a result, no clean ToolExit message is produced and the raw ProcessException is rethrown, crashing flutter_tools with an unhandled exception crash report.
Proposed Resolution
Handle Windows error codes 4551 (ERROR_APPLICATION_CONTROL_POLICY_BLOCK) and 1260 (ERROR_ACCESS_DISABLED_BY_POLICY) in _handleWindowsException within ErrorHandlingProcessManager, producing an informative ToolExit explaining that Windows Smart App Control / Application Control or Group Policy blocked execution and providing guidance to check Windows Security / App & browser control settings or unblock the Flutter/Dart binaries.
Activity
[flutter_tools] Gracefully handle Windows Application Control and sec…
[stable] [flutter_tools] Gracefully handle Windows Application Contro…
github-actions commentedon Sep 11, 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.