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
Memory screen: "Review recent data (offline)" fails in debug builds with "used after being disposed" #10103
Run DevTools from source in debug mode (e.g. flutter run -d chrome in packages/devtools_app).
Connect it to a running app (I used a Dart CLI app) and open the Memory screen.
Stop the app.
On the "Disconnected" overlay, click "Review recent data (offline)".
Expected
The Memory screen shows the data recorded before the disconnect.
Actual
A loading spinner is shown forever. The same steps work on the Performance screen.
issue.mov
Console errors:
Error loading offline data for memory
A ValueNotifier<HeapSample?> was used after being disposed.
new EventChartController (event_chart_controller.dart:65)
MemoryChartPaneController.init (chart_pane_controller.dart:39)
MemoryController._initializeData (memory_controller.dart:130)
Failed assertion: memory_controller.dart:109 '_initialized.isCompleted': is not true.
This only reproduces in debug builds. In release builds (e.g. the DevTools bundled with Dart) the offline view loads, because the "used after being disposed" check is an assert.
Cause
On disconnect, MemoryController.prepareOfflineScreenData passes its live objects (diff, profile, chart.data, trace) instead of serialized data. Then disposeConnectedControllers() disposes the controller, and MemoryChartPaneController.dispose() also disposes chart.data. So the offline Memory controller is created with already-disposed objects. In debug builds, loadData throws and initialized never completes.
Activity
maheshrijal commentedon Dec 3, 2026
I'd like to work on this. Have a local fix openeing a pr a shortly