-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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 consolee: device-specificOnly manifests on certain devicesOnly manifests on certain devicesframeworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.team-frameworkOwned by Framework teamOwned by Framework teamtriaged-frameworkTriaged by Framework teamTriaged by Framework teamwaiting for customer responseThe Flutter team cannot make further progress on this issue until the original reporter respondsThe Flutter team cannot make further progress on this issue until the original reporter responds
Description
This happens with devicePixelAspectRatio of 3.0. The following
@override
bool hitTest(Size size, Offset position, { TextDirection textDirection }) {
assert(shape != null);
assert((Offset.zero & size).contains(position));
^^^^^^
switch (shape) {throws exception because size.dx is 55.33333333333333, while position.dx due to some previous hittest calculation is 55.333333333333314.
Given that floating point addition is not associative this might be symptom of more serious issue throughout flutter with devicePixelRatio of 3.
Stack trace:
_AssertionError._doThrowNew (dart:core/runtime/liberrors_patch.dart:40)
_AssertionError._throwNew (dart:core/runtime/liberrors_patch.dart:36)
BoxDecoration.hitTest (/Users/Matej/Projects/flutter/forked/flutter/packages/flutter/lib/src/painting/box_decoration.dart:299)
RenderDecoratedBox.hitTestSelf (/Users/Matej/Projects/flutter/forked/flutter/packages/flutter/lib/src/rendering/proxy_box.dart:1938)
RenderBox.hitTest (/Users/Matej/Projects/flutter/forked/flutter/packages/flutter/lib/src/rendering/box.dart:1914)
_RenderFlex&RenderBox&ContainerRenderObjectMixin&RenderBoxContainerDefaultsMixin.defaultHitTestChildren (/Users/Matej/Projects/flutter/forked/flutter/packages/flutter/lib/src/rendering/box.dart:2256)
RenderFlex.hitTestChildren (/Users/Matej/Projects/flutter/forked/flutter/packages/flutter/lib/src/rendering/flex.dart:925)
RenderBox.hitTest (/Users/Matej/Projects/flutter/forked/flutter/packages/flutter/lib/src/rendering/box.dart:1914)
RenderShiftedBox.hitTestChildren (/Users/Matej/Projects/flutter/forked/flutter/packages/flutter/lib/src/rendering/shifted_box.dart:78)
RenderBox.hitTest (/Users/Matej/Projects/flutter/forked/flutter/packages/flutter/lib/src/rendering/box.dart:1914)
_RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.hitTestChildren (/Users/Matej/Projects/flutter/forked/flutter/packages/flutter/lib/src/rendering/proxy_box.dart:113)
RenderBox.hitTest (/Users/Matej/Projects/flutter/forked/flutter/packages/flutter/lib/src/rendering/box.dart:1914)
_RenderStack&RenderBox&ContainerRenderObjectMixin&RenderBoxContainerDefaultsMixin.defaultHitTestChildren (/Users/Matej/Projects/flutter/forked/flutter/packages/flutter/lib/src/rendering/box.dart:2256)
RenderStack.hitTestChildren (/Users/Matej/Projects/flutter/forked/flutter/packages/flutter/lib/src/rendering/stack.dart:585)
RenderBox.hitTest (/Users/Matej/Projects/flutter/forked/flutter/packages/flutter/lib/src/rendering/box.dart:1914)
_RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.hitTestChildren (/Users/Matej/Projects/flutter/forked/flutter/packages/flutter/lib/src/rendering/proxy_box.dart:113)
RenderBox.hitTest (/Users/Matej/Projects/flutter/forked/flutter/packages/flutter/lib/src/rendering/box.dart:1914)
RenderClipRRect.hitTest (/Users/Matej/Projects/flutter/forked/flutter/packages/flutter/lib/src/rendering/proxy_box.dart:1349)
_RenderStack&RenderBox&ContainerRenderObjectMixin&RenderBoxContainerDefaultsMixin.defaultHitTestChildren (/Users/Matej/Projects/flutter/forked/flutter/packages/flutter/lib/src/rendering/box.dart:2256)
RenderStack.hitTestChildren (/Users/Matej/Projects/flutter/forked/flutter/packages/flutter/lib/src/rendering/stack.dart:585)
[✓] Flutter (Channel master, v1.1.3-pre.34, on Mac OS X 10.14 18A389, locale en-US)
• Flutter version 1.1.3-pre.34 at /Users/Matej/Projects/flutter/forked/flutter
• Framework revision 93da1c9066 (4 weeks ago), 2018-11-21 16:40:41 +0100
• Engine revision 5af435098d
• Dart version 2.2.0 (build 2.2.0-dev.1.1 f9ebf21297)
[✗] Android toolchain - develop for Android devices
✗ Unable to locate Android SDK.
Install Android Studio from: https://developer.android.com/studio/index.html
On first launch it will assist you in installing the Android SDK components.
(or visit https://flutter.io/setup/#android-setup for detailed instructions).
If Android SDK has been installed to a custom location, set $ANDROID_HOME to that location.
You may also want to add it to your PATH environment variable.
[✓] iOS toolchain - develop for iOS devices (Xcode 10.1)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 10.1, Build version 10B61
• ios-deploy 1.9.4
• CocoaPods version 1.5.3
[!] Android Studio (not installed)
• Android Studio not found; download from https://developer.android.com/studio/index.html
(or visit https://flutter.io/setup/#android-setup for detailed instructions).
[!] IntelliJ IDEA Community Edition (version 2018.2.1)
• IntelliJ at /Applications/IntelliJ IDEA CE.app
✗ Flutter plugin not installed; this adds Flutter specific functionality.
✗ Dart plugin not installed; this adds Dart specific functionality.
• For information about installing plugins, see
https://flutter.io/intellij-setup/#installing-the-plugins
[✓] VS Code (version 1.30.0)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 2.21.1
[✓] Connected device (2 available)
• Matej’s iPhone X • f7e7ead1f9b5f3e2574cfbd9bc264fbcd5772a6c • ios • iOS 12.1
• iPhone 5s • 824BB8C4-B563-40E4-9632-B8393A91C531 • ios • iOS 12.1 (simulator)
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 consolee: device-specificOnly manifests on certain devicesOnly manifests on certain devicesframeworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.team-frameworkOwned by Framework teamOwned by Framework teamtriaged-frameworkTriaged by Framework teamTriaged by Framework teamwaiting for customer responseThe Flutter team cannot make further progress on this issue until the original reporter respondsThe Flutter team cannot make further progress on this issue until the original reporter responds