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
[Flutter 3.3+] App fatally crashes when using CachedNetworkImage #110715
Comments
Can a member of the Flutter team symbolize this crash report? @mraleph |
This comment was marked as duplicate.
This comment was marked as duplicate.
This comment was marked as outdated.
This comment was marked as outdated.
The bot is currently dead, I am trying to fix it. That being said the actual crash has occurred in the generated code, so we will not be able to symbolize it ourselves. We need @josh-burton to try doing symbolization himself. If possible we would need to see a piece of code that can reproduce the crash. If that is not possible then we need at the very least to see disassembly around top frame PC where the crash occurs (6231ac). You should be able to obtain it with |
crash from #110715 (comment) symbolized using symbols for
|
Same issue here. In my case, the app is not crashing but the image wont load. |
I've managed to produce a sample app that reproduces the issue: https://github.com/josh-burton/flutter_3_3_crash The app must be run in profile mode then press the 'Start' button and it will crash. The crash seems to be caused by a strange combination of using CachedNetworkImage and CachedNetworkImageProvider, and defining an error listener on the CachedNetworkImageProvider. |
@josh-burton thanks! please put some open-source LICENSE of your choice (MIT, BSD, GPL, etc) in the repo, otherwise we can't clone the repo and look at the code. |
Sure, done. |
I can reproduce the crash on Labeling for further investigation logs
flutter doctor -v
|
Thanks @josh-burton. Crash happens inside Bug reduces to: import 'dart:async';
@pragma('vm:never-inline')
Stream<Object> bug1(void Function()? f, void Function() g) async* {
try {
g();
throw 'error';
} catch (e) {
f?.call();
}
}
@pragma('vm:never-inline')
Future<Object> bug2(void Function()? f, void Function() g) async {
try {
g();
throw 'error';
} catch (e) {
f?.call();
}
return '';
}
void main(List<String> arguments) async {
print(await bug1(null, () {}).toList());
print(await bug1(() {}, () {}).toList());
print(await bug2(null, () {}));
print(await bug2(() {}, () {}));
} Here type propagation infers that Assigning to @alexmarkov |
@mraleph Hi! If this bug related with Dart, is there an issue for it in dart repository? |
@arteminthesky No, this issue by itself is enough: it's assigned and we are working on a fix, WIP CL is here. We don't always bother to create an issue in the Dart repository for Dart bugs. |
@mraleph thank you for your response. Just wanted to know where we can track progress on this task. So, will track here |
The fix landed in Dart SDK (dart-lang/sdk@f38a280). It should be rolled into Flutter in a few days. |
CP requested: dart-lang/sdk#49923 |
@itsjustkevin It looks like the fix was rolled to Flutter engine (in flutter/engine@cdfe707) but got reverted (in flutter/engine@6e1c88f). The fix was not rolled to flutter/flutter yet, so we should probably keep the issue open for now. |
@alexmarkov this might be a side effect of the roll tooling as I did not close this manually. Let me look into this. |
The fix rolled into Flutter in 4930444. |
In order to compute type, ParameterInstr::ComputeType() uses environment index to get a LocalVariable from LocalScope, assuming that environment index matches a variable index in the scope. This is only true for direct parameters (which are not copied in prologue). This change limits use of LocalVariable type for ParameterInstr corresponding to direct parameters. Note that it only affects Parameter instructions used in catch block entries, as ParameterInstr in function entry always corresponds to a direct parameter. TEST=runtime/tests/vm/dart/regress_flutter110715_il_test.dart Fixes flutter/flutter#110715 Change-Id: I68d423860928d7e65143844522e3006d9ccfcf66 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/257441 Commit-Queue: Alexander Markov <alexmarkov@google.com> Reviewed-by: Slava Egorov <vegorov@google.com>
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of |
When running my app with Flutter 3.3 I am seeing fatal crashes.
This appears to happen on a screen that uses CachedNetworkImage, but I don't think the issue is with that library.
Code sample
Logs
Flutter Doctor:
The text was updated successfully, but these errors were encountered: