Description
When running flutter analyze, if the underlying dart language-server subprocess exits prematurely (e.g., due to an internal analyzer bug, circular dependency cycles, or memory limits), the command runner crashes with _Exception-c8e8a6fa rather than exiting gracefully.
This is because analyze_once.dart throws a generic Exception which bubbles up to the global zoned error handler, triggering a tool crash report.
Steps to Reproduce
- Force a crash or early exit in the Dart language-server process (e.g., by sending a kill signal or triggering a known Dart VM/analyzer crash during
flutter analyze).
- Observe that the Flutter tool crashes with a crash report prompt rather than exiting gracefully.
Expected Behavior
The tool should print:
Error: analysis server exited with code <exitCode> and output: <logs>
and exit cleanly with a non-zero code, without displaying the "Oops; flutter has exited unexpectedly" dialog or uploading a crash report.
Description
When running
flutter analyze, if the underlyingdart language-serversubprocess exits prematurely (e.g., due to an internal analyzer bug, circular dependency cycles, or memory limits), the command runner crashes with_Exception-c8e8a6farather than exiting gracefully.This is because
analyze_once.dartthrows a genericExceptionwhich bubbles up to the global zoned error handler, triggering a tool crash report.Steps to Reproduce
flutter analyze).Expected Behavior
The tool should print:
Error: analysis server exited with code <exitCode> and output: <logs>and exit cleanly with a non-zero code, without displaying the "Oops; flutter has exited unexpectedly" dialog or uploading a crash report.