Skip to content

[flutter_tools] Unhandled ProcessException when Windows Application Control blocks dartaotruntime.exe #191899

Closed

Description

@bkonyi

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

  1. added
    c: crashStack traces logged to the console
    team-toolOwned by Flutter Tool team
    on Aug 27, 2026
  2. added a commit that references this issue on Aug 28, 2026
    adb7760
  3. github-actions commented on Sep 11, 2026

    @github-actions

    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 -v and a minimal reproduction of the issue.

  4. locked as resolved and limited conversation to collaborators on Sep 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    c: crashStack traces logged to the consoleteam-toolOwned by Flutter Tool team

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions