You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
flutter_tool crash handler should not report multiple crashes for a single process #178318
While debugging #178317, it became clear that it's possible for multiple crash events to be sent for a single process while the tool's shutdown hooks are executing.
Once the root error handler in the tool encounters an exception, it reports the crash to our crash analytics service before running all registered shutdown hooks. Once these shutdown hooks complete, the tool exits.
However, since the shutdown hooks can be asynchronous, it's possible for additional exceptions to be thrown due to the introduction of asynchronous gaps. In the referenced issue, the original exception was thrown from a file watcher callback that was processing files after a flutter pub get, resulting in exceptions being thrown from the same location repeatedly while the tool was shutting down. This caused the root error handler to be invoked repeatedly, causing multiple crash reports to be sent for a single process and the shutdown hooks to be invoked again. Eventually, the tool is able to exit successfully, but only after reporting multiple crashes.
In order to prevent the root error handler from attempting to report additional crashes while executing the shutdown hooks, we should prevent the error handler from being reentrant and return from the handler immediately if we're already in the process of shutting down the tool due to an exception.
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.
Activity
[ Tool ] Only process a single unhandled tool exception
[ Tool ] Only process a single unhandled tool exception (#178335)
[ Tool ] Only process a single unhandled tool exception (flutter#178335)
[ Tool ] Only process a single unhandled tool exception (flutter#178335)
[CP-stable][ Tool ] Only process a single unhandled tool exception (#…
[CP-beta][ Tool ] Only process a single unhandled tool exception (#17…
[ Tool ] Only process a single unhandled tool exception (flutter#178335)
github-actions commentedon Nov 26, 2025
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.[ Tool ] Only process a single unhandled tool exception (flutter#178335)
[ Tool ] Only process a single unhandled tool exception (flutter#178335)
[ Tool ] Only process a single unhandled tool exception (#178335)