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
[tool_crash] _TypeError (Null check operator used on a null value) in ResidentHandlers.debugDumpFocusTree #192934
In Flutter 3.47.3 crash telemetry, ResidentHandlers.debugDumpFocusTree threw an unhandled _TypeError: Null check operator used on a null value (28 crashes in the first 7 days post-release).
Stack Trace
ResidentHandlers.debugDumpFocusTree at package:flutter_tools/src/resident_runner.dart:628
TerminalHandler._commonTerminalInputHandler at package:flutter_tools/src/resident_runner.dart:1832
TerminalHandler.processTerminalInput at package:flutter_tools/src/resident_runner.dart:1937
Cause
In package:flutter_tools/src/resident_runner.dart:
Future<bool> debugDumpFocusTree() async {
if (!supportsServiceProtocol ||!isRunningDebug) {
returnfalse;
}
for (finalFlutterDevice? device in flutterDevices) {
finalList<FlutterView> views =await device!.vmService!.getFlutterViews();
for (final view in views) {
finalString data =await device.vmService!.flutterDebugDumpFocusTree(
isolateId: view.uiIsolate!.id!,
);
logger.printStatus(data);
}
}
returntrue;
}
Force unwrapping view.uiIsolate!.id! (or device!.vmService!) throws a null check operator exception if view.uiIsolate is null (e.g. before the isolate finishes initializing or during teardown). Note that debugDumpLayerTree has the identical pattern.
Proposed Fix
Guard view.uiIsolate?.id and device?.vmService with null checks before invoking service extension methods.
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
[flutter_tools] Guard against null vmService and uiIsolate in debugDu…
[beta] [flutter_tools] Guard against null vmService and uiIsolate in …
[stable] [flutter_tools] Guard against null vmService and uiIsolate i…
Sync CHANGELOG.md from stable (flutter#195337)
[flutter_tools] Guard against null vmService and uiIsolate in debugDu…
Sync CHANGELOG.md from stable (flutter#195337)
github-actions commentedon Oct 30, 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.