-
Notifications
You must be signed in to change notification settings - Fork 340
Closed
Labels
in debuggingRelates to the debug adapter or process of running debug sessionsRelates to the debug adapter or process of running debug sessionsis bugrelies on sdk changesSomething that requires changes in the Dart/Flutter SDK to ship before it will become availableSomething that requires changes in the Dart/Flutter SDK to ship before it will become available
Milestone
Description
Reported on StackOverflow: https://stackoverflow.com/q/73921614/25124
import 'dart:typed_data';
void main() {
Uint8List inputBytes = Uint8List.fromList(List.filled(100000000, 0));
print(''); // Breakpoint here
}We send a getObject() request but there's no offset/length s presumably it's trying to send the entire list back which is huge. It's possible being a Uint8List complicates things, but a normal List (List.filled(100000000, 0)) has issues too.
<== {
"jsonrpc": "2.0",
"method": "streamNotify",
"params": {
"streamId": "Debug",
"event": {
"type": "Event",
"kind": "PauseBreakpoint",
// ...
"topFrame": {
// ...
"vars": [
{
"type": "BoundVariable",
"name": "inputBytes",
"value": {
"type": "@Instance",
// ...
"identityHashCode": 0,
"kind": "List", // We know it's a list
"id": "objects/1",
"length": 100000000 // And its length
},
"declarationTokenPos": 20,
"scopeStartTokenPos": 39,
"scopeEndTokenPos": 142
}
],
"index": 0
}
}
}
}
==> {
"jsonrpc": "2.0",
"id": "40",
"method": "getObject",
"params": {
"isolateId": "isolates/2007599444226843",
"objectId": "objects/1"
}
}
For Uint8List the kind is Uint8List but it still has a length, and the kinds that provide lists are documented in https://github.com/dart-lang/sdk/blob/master/runtime/vm/service/service.md#instance (string, map, and various lists).
Metadata
Metadata
Assignees
Labels
in debuggingRelates to the debug adapter or process of running debug sessionsRelates to the debug adapter or process of running debug sessionsis bugrelies on sdk changesSomething that requires changes in the Dart/Flutter SDK to ship before it will become availableSomething that requires changes in the Dart/Flutter SDK to ship before it will become available