-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Crash in core library: TypeError int is not a subtype of _FutureListener<dynamic, dynamic>? #43662
Comments
cc @lrhn |
This looks like something which can happen if code attempts to remove listeners after the future has already been completed. If the state logic is correct, this cannot happen. It happens, so we probably have a bug. It's not going to be easy to find, though. The class is for internal use, and it is not validating that it's being used correctly except through assertions. Unless we can trigger the bug with assertions enabled, it'll be hard to figure out who, if any, is calling |
Since we haven't been able to reproduce this, I'll close the issue. |
I'm seeing a similar error:
At the same time, I'm seeing this
|
The stack overflow does ring a bell. I did a rewrite of Completer c = Completer<void>();
c.complete(c.future); This sets up That also means that And the first error is also reproducible as: void main() async {
var completer = Completer<void>();
await (completer
..complete(Future.delayed(Duration.zero, () => completer.future)))
.future;
} |
While scrubbing through the flutter tool crash logs I've found a few that seem to be bugs in the dart core libraries. I do not have instructions to repro this - it seems fairly rare and not that severe but does seem to indicate that the future implementation has some edge cases.
Flutter Version dev/1.23.0-4.0.pre
Dart SDK version: 2.10.0-136.0.dev (dev) (Wed Sep 16 13:30:26 2020 -0700) on "macos_x64"
The text was updated successfully, but these errors were encountered: