-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Compiler crashes when Future is created and awaited later (during debug) #53637
Comments
I have the same problem |
The same issue:
|
The same trouble, but the error is a little different. It always works when you hover over a variable at a breakpoint (in the Future) to look at it. I also tried to repeat the problem in a simple test, but it didn't work out. This started happening quite recently after the update. Unhandled exception: #0 int._handleFormatError (dart:core-patch/integers_patch.dart:126:5) Flutter (Channel stable, 3.13.6, on macOS 14.0 23A344 darwin-arm64, locale en-RU) [✓] Android toolchain - develop for Android devices (Android SDK version 33.0.0) [✓] Xcode - develop for iOS and macOS (Xcode 15.0) [✓] Chrome - develop for the web [✓] Android Studio (version 2022.1) [✓] VS Code (version 1.82.3) |
Maybe same here? Dart-Code/Dart-Code#4776 But my code doesn't have any futures at that point (but indeed had some At that specific point in the video, there were no async code executed (at least on my code base). |
Likely related to #53382 |
cc @derekxu16 |
If I run the following Flutter app on an Android emulator using Flutter 3.13.7, set a breakpoint to pause at
|
Thanks @derekxu16 |
I am developing an Android app with Flutter. This afternoon, I started to receive this error:
Compiler crash
After some debugging, I found out that this crash only happened when I had the debugger on and I created a Future that was only awaited in a later moment of the code. Check this:
If the debugger pauses between the creation of the
anymalsFuture
and its latter await, the compiler will crash. For example, if I put a breakpoint in the linecompleteName = userData['completeName'];
, the crash will happen somewhat 5 seconds after the pause, or when I mouse hover any variable. I am using Android Studio and when I mouse hover any name, the IDE will try to search that name value (if it is a variable) or its documentation (if it is a class/function). Either way, Dart crashes instantly.If I just awaited that future from the beggining, everything runs normally. I tried to reproduce that with a simple
Future.delayed
, but no crash occured. This is the_updateOwnedAnymals
:And the
Anymal.createFromSerial
is below. Actually, this is supposed to be a constructor. I'm aware that this code is awful; by the time I wrote it I was very newbie. Even so, I don't believe it is so bad that it would crash the compiler.Unfortunately, this is a comercial software so I won't be able to share much more than this. I hope this report could be useful.
dart info
#### General infoProject info
Process info
The text was updated successfully, but these errors were encountered: