flutter / devtools

Performance tools for Flutter
https://flutter.dev/docs/development/tools/devtools/
BSD 3-Clause "New" or "Revised" License
1.54k stars 314 forks source link

When disconnected, connectedState.value.connected is still true. #7808

Open polina-c opened 2 months ago

polina-c commented 2 months ago

To repro:

  1. Connect devtools to counter app on android emulator
  2. Open memory chart (with enabled android chart)
  3. Kill the emulator
  4. See exception

Code:

        try {
          await _memoryTracker.pollMemory();
        } catch (e) {
          print('Error polling memory: $e');
          if (serviceConnection.serviceManager.connectedState.value.connected) {
            rethrow;
          }
        }

Video:

https://github.com/flutter/devtools/assets/12115586/0c6d1904-6f9d-4942-922d-8d0fd89ea6ed