Skip to content

'package:flutter/src/rendering/stack.dart': Failed assertion: line 664 pos 12: 'size.isFinite': is not true. #172481

@treeplate

Description

@treeplate

Steps to reproduce

Run the code sample.

Expected results

Probably an error message, but one that actually has detail.

Actual results

I get an assertion that tells me to file a bug.

Code sample

Code sample
import 'package:flutter/material.dart';

void main() {
  runApp(
    Directionality(
      textDirection: TextDirection.ltr,
      child: Column(
        children: [
          Stack(children: [Positioned(top:0,child: SizedBox())]),
        ],
      ),
    ),
  );
}

Screenshots or Video

No response

Logs

log.txt

Flutter Doctor output

Doctor output
[✓] Flutter (Channel main, 3.33.0-1.0.pre-1039, on macOS 14.6.1 23G93 darwin-arm64, locale en-US) [1,230ms]
    • Flutter version 3.33.0-1.0.pre-1039 on channel main at /Users/user/dev/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 70cdc0c933 (2 hours ago), 2025-07-21 12:09:22 -0400
    • Engine revision 70cdc0c933
    • Dart version 3.10.0 (build 3.10.0-15.0.dev)
    • DevTools version 2.48.0
    • Feature flags: enable-web, enable-linux-desktop, enable-macos-desktop, enable-windows-desktop, enable-android, enable-ios, cli-animations, enable-native-assets

[✗] Android toolchain - develop for Android devices [116ms]
    ✗ 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.dev/to/macos-android-setup for detailed instructions).
      If the Android SDK has been installed to a custom location, please use
      `flutter config --android-sdk` to update to that location.


[!] Xcode - develop for iOS and macOS (Xcode 16.2) [1,044ms]
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 16C5032a
    ✗ Unable to get list of installed Simulator runtimes.
    • CocoaPods version 1.16.2

[✓] Chrome - develop for the web [7ms]
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[!] Android Studio (not installed) [6ms]
    • Android Studio not found; download from https://developer.android.com/studio/index.html
      (or visit https://flutter.dev/to/macos-android-setup for detailed instructions).

[✓] VS Code (version 1.101.2) [6ms]
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.114.0

[✓] Connected device (2 available) [5.7s]
    • macOS (desktop) • macos  • darwin-arm64   • macOS 14.6.1 23G93 darwin-arm64
    • Chrome (web)    • chrome • web-javascript • Google Chrome 138.0.7204.158

[✓] Network resources [499ms]
    • All expected network resources are available.

! Doctor found issues in 3 categories.

Metadata

Metadata

Labels

P2Important issues not at the top of the work lista: error messageError messages from the Flutter frameworkc: proposalA detailed proposal for a change to Flutterf: material designflutter/packages/flutter/material repository.frameworkflutter/packages/flutter repository. See also f: labels.good first issueRelatively approachable for first-time contributorsr: fixedIssue is closed as already fixed in a newer versionteam-frameworkOwned by Framework teamtriaged-frameworkTriaged by Framework team

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions