Repository navigation
Closed
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work listc: crashStack traces logged to the consoleStack traces logged to the consolef: scrollingViewports, list views, slivers, etc.Viewports, list views, slivers, etc.found in release: 2.0Found to occur in 2.0Found to occur in 2.0frameworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.has reproducible stepsThe issue has been confirmed reproducible and is ready to work onThe issue has been confirmed reproducible and is ready to work onr: fixedIssue is closed as already fixed in a newer versionIssue is closed as already fixed in a newer version
Description
════════ Exception caught by image resource service ════════════════════════════════════════════════
The following NoSuchMethodError was thrown while resolving an image:
The method 'toDouble' was called on null.
Receiver: null
Tried calling: toDouble()
When the exception was thrown, this was the stack:
#0 Object.noSuchMethod (dart:core-patch/object_patch.dart:53:5)
#1 double.> (dart:core-patch/double.dart:96:31)
#2 max (dart:math-patch/math_patch.dart:45:9)
#3 _clipOffsetToScrollableRange (package:flutter/src/widgets/list_wheel_scroll_view.dart:362:19)
#4 _getItemFromOffset (package:flutter/src/widgets/list_wheel_scroll_view.dart:354:11)
...
Image provider: ScrollAwareImageProvider<dynamic>()
Image configuration: ImageConfiguration(bundle: PlatformAssetBundle#fe6d4(), devicePixelRatio: 3.0, locale: en_US, textDirection: TextDirection.ltr, size: Size(30.0, 20.0), platform: iOS)
Image key: AssetBundleImageKey(bundle: PlatformAssetBundle#fe6d4(), name: "packages/country_pickers/assets/af.png", scale: 1.0)
════════════════════════════════════════════════════════════════════════════════════════════════════
════════ Exception caught by image resource service ════════════════════════════════════════════════
The method 'toDouble' was called on null.
Receiver: null
Tried calling: toDouble()
════════════════════════════════════════════════════════════════════════════════════════════════════
════════ Exception caught by image resource service ════════════════════════════════════════════════
The method 'toDouble' was called on null.
Receiver: null
Tried calling: toDouble()
════════════════════════════════════════════════════════════════════════════════════════════════════
Application finished.
[✓] Flutter (Channel stable, v1.17.4, on Mac OS X 10.15.5 19F101, locale en-GB)
• Flutter version 1.17.4 at /users/faiyyazkhatri/StudioProjects/flutter
• Framework revision 1ad9baa8b9 (12 days ago), 2020-06-17 14:41:16 -0700
• Engine revision ee76268252
• Dart version 2.8.4
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
• Android SDK at /users/faiyyazkhatri/Library/Android/sdk
• Platform android-29, build-tools 29.0.3
• ANDROID_HOME = /users/faiyyazkhatri/Library/Android/sdk
• Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 11.5)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 11.5, Build version 11E608c
• CocoaPods version 1.9.1
[✓] Android Studio (version 4.0)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin version 47.0.2
• Dart plugin version 193.7361
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)
[✓] Connected device (1 available)
• iPhone 11 Pro Max • CFC77C34-A397-4FC3-802E-115F3A7224FA • ios • com.apple.CoreSimulator.SimRuntime.iOS-13-5 (simulator)
• No issues found!
Reacted by Juan Manuel Castillo, ljmatan, Lucian and LShuXin
Metadata
Metadata
Assignees
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work listc: crashStack traces logged to the consoleStack traces logged to the consolef: scrollingViewports, list views, slivers, etc.Viewports, list views, slivers, etc.found in release: 2.0Found to occur in 2.0Found to occur in 2.0frameworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.has reproducible stepsThe issue has been confirmed reproducible and is ready to work onThe issue has been confirmed reproducible and is ready to work onr: fixedIssue is closed as already fixed in a newer versionIssue is closed as already fixed in a newer version
Type
Projects
- StatusShow more project fieldsIssue closed with comment
Activity
darshankawar commentedon Jun 30, 2020
Hi @Faiyyaz,
Can you please provide a minimal complete reproducible code sample.
Thank you.
Faiyyaz commentedon Jun 30, 2020
This is the class of a pub named
country pickerhttps://pub.dev/packages/country_pickers and this class internally uses thelist_wheel_scroll_view.dartwhich returns the errordarshankawar commentedon Jun 30, 2020
Hi @Faiyyaz,
From what I can see, the issue is related to 3rd party plugin (country_pickers) rather than to Flutter itself. I see that you've already open similar issue against that plugin's repo. I'd suggest you follow-up with owner of that plugin.
Closing, as this isn’t an issue with Flutter itself.
If you disagree, please write in the comments,
providing your
flutter doctor -v, yourflutter run -v, yourpubspec.yamla minimal reproducible code sample that does not use 3rd party plugins,
and I will reopen it.
Thank you
didierganthier commentedon Sep 4, 2020
And don't use this plugin but I'm facing this same issue so I doubt it's related
0xPixelfrost commentedon Sep 30, 2020
Same here. The cause for this bug is, like mentioned above, the
list_wheel_scroll_view.Following code causes the crash. minScrollExtend and maxScrollExtend are both null:
double _clipOffsetToScrollableRange( double offset, double minScrollExtent, double maxScrollExtent, ) { return math.min(math.max(offset, minScrollExtent), maxScrollExtent); }I could temporary fix this by checking the line for null values like:
double _clipOffsetToScrollableRange( double offset, double minScrollExtent, double maxScrollExtent, ) { return math.min(math.max(offset, minScrollExtent ?? 0.0), maxScrollExtent ?? 0.0); }I could not check the beta and dev channels due to other bugs in the framework.
Pubspec:
bounty1342 commentedon Feb 4, 2021
@darshankawar, this is not related to any plugin but Cupertino Picker :
Please reopen !
darshankawar commentedon Feb 5, 2021
@bounty1342
This is an old and closed issue. I suggest you to open a new issue and provide
flutter doctor -vand minimal reproducible code sample.bounty1342 commentedon Feb 5, 2021
darshankawar commentedon Feb 5, 2021
@bounty1342
It wasn't a bot response, sorry, and if you read from my response, I requested latest
flutter doctor -vand a minimal reproducible code sample that shows the issue.bounty1342 commentedon Feb 18, 2021
flutter doctor -v
Issue found
minimal reproducible code sample
@darshankawar : Sorry, really thought it was. I did everything you asked for, so please reopen and take care of it.
17 remaining items
hyungtaecf commentedon May 19, 2021
I don't know if it is applicable to your context, but I mentioned my workaround here #61228, that is very simple but it took me a lot of time to find it... Now it works fine for me.
bounty1342 commentedon May 19, 2021
The issue is due to the widget having no size. (loading a Network images for example)
A placeolder with a size should avoid this issue.
rockingdice commentedon May 21, 2021
Met the same issue. Please solve it asap. I'm using CupertinoPicker and can reproduce this issue.
rockingdice commentedon May 21, 2021
FYI, I found a workaround:
Use a
FutureBuilder. You can wrap your widget into it and it will show without the exception.You might consider using a
SynchronousFutureto make it not blink.In the mean time we might expect the flutter team to fix it.
Levi-Lesches commentedon Aug 13, 2021
Now that the error has changed, I think this became a duplicate of #85867, which has less discussion. Or that is a duplicate of this, but one of them can be closed.
bleroux commentedon Nov 29, 2022
This issue is no more reproducible since Flutter 3.0.5.
Closing it as fixed by #96102 (found using
git bisect).github-actions commentedon Mar 5, 2023
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
flutter doctor -vand a minimal reproduction of the issue.