-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Closed
Labels
c: crashStack traces logged to the consoleStack traces logged to the consoled: api docsIssues with https://api.flutter.dev/Issues with https://api.flutter.dev/f: material designflutter/packages/flutter/material repository.flutter/packages/flutter/material repository.found in release: 1.22Found to occur in 1.22Found to occur in 1.22found in release: 1.26Found to occur in 1.26Found to occur in 1.26frameworkflutter/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
Steps to Reproduce
- Run
flutter create bug. - Update the files as follows: ...
import 'package:flutter/material.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Demo',
theme: ThemeData(
primarySwatch: Colors.blue,
),
home: Scaffold(
body: InputDecorator(
decoration: const InputDecoration().copyWith(
border: const OutlineInputBorder(),
),
child: Stack(
children: [
// Uncommenting this will fix it
// Text('yo'),
Image.network('https://dummyimage.com/200/09f/fff.png'),
// Commenting this out will fix it
Positioned(
right: 5,
bottom: 5,
child: Text('ok'),
),
],
),
),
));
}
}- ... Just launch the app an you'll get the exception.
I noticed that either uncommenting the Text inside the Stack or Commenting out the Positioned will fix the problem
The issue happens on both Web and Android. I haven't tested it on iOS
Expected results:
No exception
Actual results:
logs
======== Exception caught by rendering library =====================================================
The following assertion was thrown during performLayout():
Assertion failed: file:///Users/prascuna/Documents/workspace/flutter/packages/flutter/lib/src/material/input_decorator.dart:939:12
baseline != null && baseline >= 0.0
is not true
The relevant error-causing widget was:
InputDecorator file:///Users/prascuna/Documents/workspace/bug_inputdecorator_2/lib/main.dart:16:17
When the exception was thrown, this was the stack:
dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/errors.dart 231:49 throw_
dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/errors.dart 24:3 assertFailed
packages/flutter/src/material/input_decorator.dart 939:44 [_layoutLineBox]
packages/flutter/src/material/input_decorator.dart 1033:28 [_layout]
packages/flutter/src/material/input_decorator.dart 1294:44 performLayout
...
The following RenderObject was being processed when the exception was fired: _RenderDecoration#24114 relayoutBoundary=up1 NEEDS-LAYOUT NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
... parentData: offset=Offset(0.0, 0.0); id=_ScaffoldSlot.body (can use size)
... constraints: BoxConstraints(0.0<=w<=1200.0, 0.0<=h<=776.0)
... size: MISSING
RenderObject: _RenderDecoration#24114 relayoutBoundary=up1 NEEDS-LAYOUT NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
parentData: offset=Offset(0.0, 0.0); id=_ScaffoldSlot.body (can use size)
constraints: BoxConstraints(0.0<=w<=1200.0, 0.0<=h<=776.0)
size: MISSING
... input: RenderStack#d9487 relayoutBoundary=up2 NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
... parentData: offset=Offset(0.0, 0.0) (can use size)
... constraints: BoxConstraints(w=1176.0, 0.0<=h<=744.0)
... size: Size(1176.0, 0.0)
... alignment: AlignmentDirectional.topStart
... textDirection: ltr
... fit: loose
... child 1: RenderSemanticsAnnotations#5ff28 relayoutBoundary=up3 NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
... parentData: not positioned; offset=Offset(0.0, 0.0) (can use size)
... constraints: BoxConstraints(0.0<=w<=1176.0, 0.0<=h<=744.0)
... size: Size(0.0, 0.0)
... child: RenderImage#bed8a relayoutBoundary=up4 NEEDS-PAINT
... parentData: <none> (can use size)
... constraints: BoxConstraints(0.0<=w<=1176.0, 0.0<=h<=744.0)
... size: Size(0.0, 0.0)
... image: null
... alignment: Alignment.center
... invertColors: false
... filterQuality: low
... child 2: RenderParagraph#69309 relayoutBoundary=up3 NEEDS-PAINT
... parentData: right=5.0; bottom=5.0; offset=Offset(1155.0, -22.0) (can use size)
... constraints: BoxConstraints(unconstrained)
... size: Size(16.0, 17.0)
... textAlign: start
... textDirection: ltr
... softWrap: wrapping at box width
... overflow: clip
... locale: en_US
... maxLines: unlimited
... text: TextSpan
... debugLabel: (englishLike body1 2014).merge(blackCupertino bodyText2)
... inherit: false
... color: Color(0xdd000000)
... family: .SF UI Text
... size: 14.0
... weight: 400
... baseline: alphabetic
... decoration: TextDecoration.none
... "ok"
... helperError: RenderConstrainedBox#9ea52 relayoutBoundary=up2 NEEDS-PAINT
... parentData: offset=Offset(0.0, 0.0) (can use size)
... constraints: BoxConstraints(0.0<=w<=1176.0, 0.0<=h<=776.0)
... size: Size(0.0, 0.0)
... additionalConstraints: BoxConstraints(unconstrained)
... container: RenderCustomPaint#4d7a3 NEEDS-LAYOUT NEEDS-PAINT
... parentData: offset=Offset(0.0, 0.0)
... constraints: MISSING
... size: MISSING
====================================================================================================
======== Exception caught by rendering library =====================================================
Assertion failed: file:///Users/prascuna/Documents/workspace/flutter/packages/flutter/lib/src/rendering/box.dart:1920:12
hasSize
"RenderBox was not laid out: _RenderDecoration#24114 relayoutBoundary=up1 NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE"
The relevant error-causing widget was:
Scaffold file:///Users/prascuna/Documents/workspace/bug_inputdecorator_2/lib/main.dart:15:15
====================================================================================================Logs
https://gist.github.com/prascuna/735897f120a1a252cfd2b8803ea3e56a
Analyzing bug_inputdecorator_2...
No issues found! (ran in 2.5s)
[✓] Flutter (Channel dev, 1.26.0-8.0.pre, on Mac OS X 10.15.7 19H15 darwin-x64, locale en-GB)
• Flutter version 1.26.0-8.0.pre at /Users/prascuna/Documents/workspace/flutter
• Framework revision b9d06fffb2 (13 days ago), 2021-01-07 18:36:48 -0800
• Engine revision 42a8d4c681
• Dart version 2.12.0 (build 2.12.0-179.0.dev)
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
• Android SDK at /Users/prascuna/Library/Android/sdk
• Platform android-30, build-tools 29.0.3
• Java binary at: /Users/prascuna/.sdkman/candidates/java/current/bin/java
• Java version OpenJDK Runtime Environment (AdoptOpenJDK)(build 1.8.0_262-b10)
• All Android licenses accepted.
[!] Xcode - develop for iOS and macOS (Xcode 12.3)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 12.3, Build version 12C33
! CocoaPods 1.9.1 out of date (1.10.0 is recommended).
CocoaPods is used to retrieve the iOS and macOS platform side's plugin code that responds to your plugin usage on the Dart side.
Without CocoaPods, plugins will not work on iOS or macOS.
For more info, see https://flutter.dev/platform-plugins
To upgrade see https://guides.cocoapods.org/using/getting-started.html#installation for instructions.
[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[!] Android Studio (not installed)
• Android Studio not found; download from https://developer.android.com/studio/index.html
(or visit https://flutter.dev/docs/get-started/install/macos#android-setup for detailed instructions).
[✓] IntelliJ IDEA Community Edition (version 2020.3.1)
• IntelliJ at /Applications/IntelliJ IDEA CE.app
• Flutter plugin version 52.2.5
• Dart plugin version 203.6912
[✓] VS Code (version 1.52.1)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.18.1
[✓] Connected device (1 available)
• Chrome (web) • chrome • web-javascript • Google Chrome 87.0.4280.141
! Doctor found issues in 2 categories.
Metadata
Metadata
Assignees
Labels
c: crashStack traces logged to the consoleStack traces logged to the consoled: api docsIssues with https://api.flutter.dev/Issues with https://api.flutter.dev/f: material designflutter/packages/flutter/material repository.flutter/packages/flutter/material repository.found in release: 1.22Found to occur in 1.22Found to occur in 1.22found in release: 1.26Found to occur in 1.26Found to occur in 1.26frameworkflutter/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