-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Compiler crash: Iterables do not have same length #53453
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
Comments
@burekas7 Did this happen when evaluation an explicit expression during debugging or when hovering expressions in the editor? Also was this part of a hot-reload cycle (i.e. was the code "recently" modified) ? |
+1 , got same error when hovering on the expressions in VS CODE editor , using Dio package to debug the responses . sdk: ">=2.19.2 <4.0.0" flutter doctor • No issues found!` |
@heshesh2010 Do you have any idea what expression was? |
same |
+1 here having a similar issue :
this generate a debugger crash :
|
This seems to originate from a bad encoding of the arguments passed to the expression compiler - at least I can recreate the crash by creating such a bad message. I'm still not still sure the where in the tool chain this encoding is created, though. Likely related to #53382 |
cc @jensjoha |
@johnniwinther I think they should have correct length. However the code in |
Yeah it reproduces quite trivially with the following test: Regression testimport 'dart:developer';
import 'package:observatory/models.dart' show InstanceKind;
import 'package:observatory/service_io.dart';
import 'package:test/test.dart';
import 'service_test_common.dart';
import 'test_helper.dart';
void testFunction() {
List<dynamic> v = <dynamic>[1, 2, '3'];
debugger();
print("v = $v");
}
var tests = <IsolateTest>[
hasStoppedAtBreakpoint,
(Isolate isolate) async {
final result = await isolate.evalFrame(0, '''v.length''');
print(result);
final instance = result as Instance;
expect(instance.valueAsString, equals('3'));
expect(instance.kind, equals(InstanceKind.int));
},
];
main(args) => runIsolateTests(args, tests, testeeConcurrent: testFunction); And if I put |
In my case i was having this problem using for each to desserialize a json response that was inside a list, when a change it to a "for in" it stopped to crash |
Does anyone know if this bug was fixed? Should I need to update the dart sdk version? |
The issue has been fixed in the Dart repository and is available in the lastest dev release. It will be in the the next beta and stable releases. |
@johnniwinther I see you said this 3 weeks ago, so I made sure to update to new flutter & dart versions released after your comment. (@mraleph tagging you as you authored the fix 3 weeks ago) I still experience this issue with these updates that were released sept 27th (about 2 weeks after your comment).
|
It seems you're on flutter stable meaning you don't get the dev releases of dart. |
As was mentioned above, |
@shawnAshton next stable release means Dart 3.2. |
@shawnAshton @mraleph Please push the latest release on the stable branch. I am stuck nothing is working, my timelines are disturbed because of this error. |
@kashiflab When the stable release with the fix will be ready for use? |
Stable release is in the final rounds of testing and preparations for release. You could switch to Flutter beta channel if you want the fix already today. |
I bring good news guys, today I was looking for the problem and came across this topic. |
Flutter 3.13.2
environment:
sdk: '>=3.1.0 <4.0.0'
After a specific dio 'post' call I'm getting this error:
The text was updated successfully, but these errors were encountered: