You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 6, 2020. It is now read-only.
Since upgrading to 1.17 stable I have experienced crashes when images failed to load.
Investigated and found out that the reason is the new breaking changes to ImageProvider in 1.17.
The bug can be reproduced with latest version 0.7.0 by using a TransitionToImage with a AdvancedNetworkImage as provider.
If you for example use the plugin to display an image in a list with a builder and the widget is scrolled off and disposed and the image load fails - the result will be an exception.
This error will propagate... return Future.error(StateError('Failed to load $url.'));
...and if TransitionToImage has been disposed
will be registered and an unhandled error will propagate...
So loading a list of images with flaky network (or failing urls) while scrolling will produce a lot of unhandled exceptions.
I pinned down the solution to the problem to the new error handling in the 1.17.x version of ImageProvider where even the unhandled, parentless load error is handled by the ImageProvider (via a safe zone).
I was preparing a pull request from my locally modified flutter_advanced_networkimage.dart when I discovered that the master branch has already been updated to the 1.17 new version of ImageProvider (the resolve() method removed).
I have tried my app with the master branch version - and no exceptions are thrown
I would very much appreciate a release of 0.8.0 since 0.7.0 is not compatible with the latest stable Flutter release 1.17.x (and it seems like you have already done the work).
Please reach out if there is anything I can do to help.
Thank you!
The text was updated successfully, but these errors were encountered:
@mchome How confident are you of the master branch's current state?
Are there unfinished stuff in there?
It seems to work fine.
I need to do a release now, with a fix.
Not sure if I should release with master (upcoming 0.8.0 state) or a modded 0.7.0.
Thanks again.
Hello (again) and thank you for your work.
Since upgrading to 1.17 stable I have experienced crashes when images failed to load.
Investigated and found out that the reason is the new breaking changes to
ImageProvider
in 1.17.The bug can be reproduced with latest version 0.7.0 by using a
TransitionToImage
with aAdvancedNetworkImage
as provider.If you for example use the plugin to display an image in a list with a builder and the widget is scrolled off and disposed and the image load fails - the result will be an exception.
This error will propagate...
return Future.error(StateError('Failed to load $url.'));
...and if TransitionToImage has been disposed
No error handlers
_catchBadImage
will be registered and an unhandled error will propagate...
So loading a list of images with flaky network (or failing urls) while scrolling will produce a lot of unhandled exceptions.
I pinned down the solution to the problem to the new error handling in the 1.17.x version of
ImageProvider
where even the unhandled, parentless load error is handled by theImageProvider
(via a safe zone).I was preparing a pull request from my locally modified
flutter_advanced_networkimage.dart
when I discovered that the master branch has already been updated to the 1.17 new version of ImageProvider (the resolve() method removed).I have tried my app with the master branch version - and no exceptions are thrown
I would very much appreciate a release of 0.8.0 since 0.7.0 is not compatible with the latest stable Flutter release 1.17.x (and it seems like you have already done the work).
Please reach out if there is anything I can do to help.
Thank you!
The text was updated successfully, but these errors were encountered: