Closed
Description
This issue was reported to me on Dart-Code's discord. I was able to reduce it to the following:
import 'dart:developer';
void main(List<String> args) {
final a = A<C>();
debugger();
}
class A<T> {
A();
}
class B<T> {
final T data;
B(this.data);
}
class C extends B<C> {
C(C data) : super(data);
}
Running this code under the debugger will pause on the debugger()
line. Trying to evaluate any expression at all (even 1
) will terminate the VM and the response looks like this:
{
"jsonrpc": "2.0",
"error": {
"code": -32000,
"message": "Bad state: The client closed with pending request \"evaluateInFrame\".",
"data": {
"full": "Bad state: The client closed with pending request \"evaluateInFrame\".",
"stack": "",
"request": {
"id": "35",
"jsonrpc": "2.0",
"method": "evaluateInFrame",
"params": {
"disableBreakpoints": true,
"expression": "1",
"frameIndex": 0,
"isolateId": "isolates/2111979752828675"
}
}
}
},
"id": "35"
}
There is no other error message information (via the VM Service or stderr/stdout) that I can get.
I'm not sure whether class C extends B<C> {
makes a lot of sense (it seems like it's impossible to call C
's constructor here, since you need to pass a C
to it) but I wouldn't expect a crash.