Skip to content

ListView/ScrollView - Scrolling jumps to the bottom regardless of items on M1 iOS Simulator #79641

Description

@ollyde

Flutter 2.0.3
iOS Simulator 14.4
M1 Macbook Pro

Whole app code below.

The view jumps to the bottom; provided a gif example.

Normal behavior on device. iOS 14.4
correct

Incorrect. Simulator 14.4
error

App Code (Very standard)

import 'package:flutter/material.dart';

void main() {
  runApp(MyApp());
}

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      home: MyHomePage(title: 'Flutter Demo Home Page'),
    );
  }
}

class MyHomePage extends StatefulWidget {
  MyHomePage({Key key, this.title}) : super(key: key);
  final String title;

  @override
  _MyHomePageState createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
  @override
  Widget build(BuildContext context) {
    return ListView(
      children: [
        Container(color: Colors.red, height: 100),
        Container(color: Colors.blue, height: 100),
        Container(color: Colors.red, height: 100),
        Container(color: Colors.blue, height: 100),
        Container(color: Colors.red, height: 100),
        Container(color: Colors.blue, height: 100),
        Container(color: Colors.red, height: 100),
        Container(color: Colors.blue, height: 100),
        Container(color: Colors.red, height: 100),
        Container(color: Colors.blue, height: 100),
        Container(color: Colors.red, height: 100),
        Container(color: Colors.blue, height: 100),
        Container(color: Colors.red, height: 100),
        Container(color: Colors.blue, height: 100),
        Container(color: Colors.red, height: 100),
        Container(color: Colors.blue, height: 100),
      ],
    );
  }
}

Activity

  1. iapicca commented on Apr 2, 2021

    @iapicca

    @OllyDixon
    I cannot test it myself (I'm not a mac user)
    does it happens with builder as well?

    import 'package:flutter/material.dart';
    
    void main() => runApp(
          MaterialApp(
            home: Material(
              child: ListView.builder(
                itemBuilder: (context, index) {
                  final child = SizedBox(
                    height: 100,
                    child: Center(
                      child: Text(
                        '$index',
                        textScaleFactor: 5,
                        style: const TextStyle(color: Colors.white),
                      ),
                    ),
                  );
                  return index % 2 == 0
                      ? ColoredBox(color: Colors.blue, child: child)
                      : ColoredBox(color: Colors.red, child: child);
                },
              ),
            ),
          ),
        );
    
  2. ollyde commented on Apr 2, 2021

    @ollyde
    Author

    @iapicca it happens on all types of scrolling views. Even SingleChild with a Colum inside of it.

    I tested Builder and SingleChild too. (I was trying to fix a bug for hours)

  3. iapicca commented on Apr 2, 2021

    @iapicca

    it happens on all types of scrolling views. Even SingleChild with a Colum inside of it.

    I tested Builder and SingleChild too. (I was trying to fix a bug for hours)

    @OllyDixon
    ballistic looks super weird on web as well
    normal behavior on physical android device

    tested with this code #79641 (comment)

    [✓] Flutter (Channel master, 2.1.0-13.0.pre.416, on Linux, locale en_US.UTF-8)
       • Flutter version 2.1.0-13.0.pre.416 at
         /home/francesco/snap/flutter/common/flutter
       • Framework revision b9638fb837 (10 hours ago), 2021-04-02 00:39:02 -0400
       • Engine revision bed3a4a7a0
       • Dart version 2.13.0 (build 2.13.0-192.0.dev)
    
    [✓] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
       • Android SDK at /home/francesco/Android/Sdk
       • Platform android-30, build-tools 30.0.2
       • ANDROID_SDK_ROOT = /home/francesco/Android/Sdk
       • Java binary at: /usr/lib/jvm/java-1.8.0-openjdk-amd64/jre/bin/java
       • Java version OpenJDK Runtime Environment (build
         1.8.0_282-8u282-b08-0ubuntu1~20.04-b08)
       • All Android licenses accepted.
    
    [✓] Chrome - develop for the web
       • CHROME_EXECUTABLE = /snap/bin/chromium
    
    [✓] Linux toolchain - develop for Linux desktop
       • clang version 6.0.0-1ubuntu2 (tags/RELEASE_600/final)
       • cmake version 3.10.2
       • ninja version 1.8.2
       • pkg-config version 0.29.1
    
    [!] 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/linux#android-setup
         for detailed instructions).
    
    [✓] Connected device (3 available)
       • Pixel 3a (mobile) • 965AY0WP5C • android-arm64  • Android 11 (API 30)
       • Linux (desktop)   • linux      • linux-x64      • Linux
       • Chrome (web)      • chrome     • web-javascript • Chromium 89.0.4389.114
         snap
    
    ! Doctor found issues in 1 category.
    
  4. ollyde commented on Apr 2, 2021

    @ollyde
    Author

    @iapicca it's an insanly bad bug; are they even doing QA at Flutter Google? 😂

  5. TahaTesser commented on Apr 5, 2021

    @TahaTesser
    Contributor

    Hi @OllyDixon
    Thanks for catching this. It looks like it only reproduces when running on the simulator on M1. I have tried the same code sample on simulator running intel macOS as well as on a physical device, it doesn't reproduce anywhere but the M1 simulator.

    M1 Simulator Intel Simulator
    flutter doctor -v
    [✓] Flutter (Channel stable, 2.0.4, on macOS 11.2.3 20D91 darwin-arm, locale
        en-GB)
        • Flutter version 2.0.4 at /Users/nevercode/Code/flutter_stable
        • Framework revision b1395592de (4 days ago), 2021-04-01 14:25:01 -0700
        • Engine revision 2dce47073a
        • Dart version 2.12.2
    
    [!] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
        • Android SDK at /Users/nevercode/Library/Android/sdk
        • Platform android-30, build-tools 30.0.3
        • Java binary at: /Users/nevercode/Library/Application
          Support/JetBrains/Toolbox/apps/AndroidStudio/ch-0/201.7042882/Android
          Studio.app/Contents/jre/jdk/Contents/Home/bin/java
        • Java version OpenJDK Runtime Environment (build
          1.8.0_242-release-1644-b3-6915495)
        ✗ Android license status unknown.
          Run `flutter doctor --android-licenses` to accept the SDK licenses.
          See https://flutter.dev/docs/get-started/install/macos#android-setup for
          more details.
    
    [✓] Xcode - develop for iOS and macOS
        • Xcode at /Applications/Xcode.app/Contents/Developer
        • Xcode 12.4, Build version 12D4e
        • CocoaPods version 1.10.1
    
    [✓] Chrome - develop for the web
        • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
    
    [✓] Android Studio (version 4.1)
        • Android Studio at /Users/nevercode/Library/Application
          Support/JetBrains/Toolbox/apps/AndroidStudio/ch-0/201.7042882/Android
          Studio.app/Contents
        • Flutter plugin can be installed from:
          🔨 https://plugins.jetbrains.com/plugin/9212-flutter
        • Dart plugin can be installed from:
          🔨 https://plugins.jetbrains.com/plugin/6351-dart
        • Java version OpenJDK Runtime Environment (build
          1.8.0_242-release-1644-b3-6915495)
    
    [✓] VS Code (version 1.55.0)
        • VS Code at /Applications/Visual Studio Code.app/Contents
        • Flutter extension version 3.21.0
    
    [✓] Connected device (4 available)
        • Taha’s iPhone (mobile) • 00008020-001059882212002E            • ios
          • iOS 14.4.2
        • iPhone 11 (mobile)     • 7099B239-8266-4F66-9901-A229EFE0F43D • ios
          • com.apple.CoreSimulator.SimRuntime.iOS-14-4 (simulator)
        • macOS (desktop)        • macos                                •
          darwin-arm64   • macOS 11.2.3 20D91 darwin-arm
        • Chrome (web)           • chrome                               •
          web-javascript • Google Chrome 89.0.4389.114
    
    ! Doctor found issues in 1 category.
    [✓] Flutter (Channel master, 2.1.0-13.0.pre.444, on macOS 11.2.3 20D91
        darwin-arm, locale en-GB)
        • Flutter version 2.1.0-13.0.pre.444 at /Users/nevercode/Code/flutter_master
        • Framework revision 824b1ad3f8 (2 days ago), 2021-04-03 15:24:02 -0400
        • Engine revision e393800c63
        • Dart version 2.13.0 (build 2.13.0-196.0.dev)
    
    [!] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
        • Android SDK at /Users/nevercode/Library/Android/sdk
        • Platform android-30, build-tools 30.0.3
        • Java binary at: /Users/nevercode/Library/Application
          Support/JetBrains/Toolbox/apps/AndroidStudio/ch-0/201.7042882/Android
          Studio.app/Contents/jre/jdk/Contents/Home/bin/java
        • Java version OpenJDK Runtime Environment (build
          1.8.0_242-release-1644-b3-6915495)
        ✗ Android license status unknown.
          Run `flutter doctor --android-licenses` to accept the SDK licenses.
          See https://flutter.dev/docs/get-started/install/macos#android-setup for
          more details.
    
    [✓] Xcode - develop for iOS and macOS
        • Xcode at /Applications/Xcode.app/Contents/Developer
        • Xcode 12.4, Build version 12D4e
        • CocoaPods version 1.10.1
    
    [✓] Chrome - develop for the web
        • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
    
    [✓] Android Studio (version 4.1)
        • Android Studio at /Users/nevercode/Library/Application
          Support/JetBrains/Toolbox/apps/AndroidStudio/ch-0/201.7042882/Android
          Studio.app/Contents
        • Flutter plugin can be installed from:
          🔨 https://plugins.jetbrains.com/plugin/9212-flutter
        • Dart plugin can be installed from:
          🔨 https://plugins.jetbrains.com/plugin/6351-dart
        • Java version OpenJDK Runtime Environment (build
          1.8.0_242-release-1644-b3-6915495)
    
    [✓] VS Code (version 1.55.0)
        • VS Code at /Applications/Visual Studio Code.app/Contents
        • Flutter extension version 3.21.0
    
    [✓] Connected device (4 available)
        • Taha’s iPhone (mobile) • 00008020-001059882212002E            • ios
          • iOS 14.4.2
        • iPhone 11 (mobile)     • 7099B239-8266-4F66-9901-A229EFE0F43D • ios
          • com.apple.CoreSimulator.SimRuntime.iOS-14-4 (simulator)
        • macOS (desktop)        • macos                                •
          darwin-arm64   • macOS 11.2.3 20D91 darwin-arm
        • Chrome (web)           • chrome                               •
          web-javascript • Google Chrome 89.0.4389.114
    
    ! Doctor found issues in 1 category.
  6. changed the title [-]Critical bug : ListView | ScrollView - Scrolling jumps to the bottom reguardless of items.[/-] [+]ListView/ScrollView - Scrolling jumps to the bottom reguardless of items on M1 iOS Simulator[/+] on Apr 5, 2021
  7. added
    f: scrollingViewports, list views, slivers, etc.
    frameworkflutter/packages/flutter repository. See also f: labels.
    has reproducible stepsThe issue has been confirmed reproducible and is ready to work on
    platform-iosiOS applications specifically
    and removed
    in triagePresently being triaged by the triage team
    on Apr 5, 2021
  8. 15 remaining items

  9. added
    r: fixedIssue is closed as already fixed in a newer version
    on Jul 8, 2021
  10. github-actions commented on Jul 30, 2021

    @github-actions

    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 -v and a minimal reproduction of the issue.

  11. locked as resolved and limited conversation to collaborators on Jul 30, 2021
  12. reopened this on Jul 23, 2024
  13. unlocked this conversation on Jul 23, 2024
  14. added
    team-iosOwned by iOS platform team
    and removed
    r: fixedIssue is closed as already fixed in a newer version
    on Jul 24, 2024
  15. admosity commented on Jul 24, 2024

    @admosity
    Contributor

    Thank you for reopening this issue! This is more so a developer experience annoyance, but would love to see this fixed ✨.

    IMG_1100.mp4

    Flutter doctor:

    [!] Flutter (Channel stable, 3.22.3, on macOS 14.5 23F79 darwin-arm64, locale en-US)
        • Flutter version 3.22.3 on channel stable at /Users/REDACTED/fvm/versions/3.22.3
        ! Warning: `flutter` on your path resolves to /Users/REDACTED/fvm/versions/3.22.2/bin/flutter, which is not inside your current Flutter SDK checkout at /Users/REDACTED/fvm/versions/3.22.3. Consider adding /Users/REDACTED/fvm/versions/3.22.3/bin to the front of your path.
        ! Warning: `dart` on your path resolves to /Users/REDACTED/fvm/versions/3.22.2/bin/dart, which is not inside your current Flutter SDK checkout at /Users/REDACTED/fvm/versions/3.22.3. Consider adding /Users/REDACTED/fvm/versions/3.22.3/bin to the front of your path.
        • Upstream repository https://github.com/flutter/flutter.git
        • Framework revision b0850beeb2 (7 days ago), 2024-07-16 21:43:41 -0700
        • Engine revision 235db911ba
        • Dart version 3.4.4
        • DevTools version 2.34.3
        • If those were intentional, you can disregard the above warnings; however it is recommended to use "git" directly to perform update checks and upgrades.
    
    [✓] Android toolchain - develop for Android devices (Android SDK version 33.0.2)
        • Android SDK at /Users/REDACTED/Library/Android/sdk
        • Platform android-33, build-tools 33.0.2
        • Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
        • Java version OpenJDK Runtime Environment (build 11.0.15+0-b2043.56-8887301)
        • All Android licenses accepted.
    
    [✓] Xcode - develop for iOS and macOS (Xcode 15.4)
        • Xcode at /Applications/Xcode.app/Contents/Developer
        • Build 15F31d
        • CocoaPods version 1.15.2
    
    [✓] Chrome - develop for the web
        • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
    
    [✓] Android Studio (version 2022.1)
        • Android Studio at /Applications/Android Studio.app/Contents
        • Flutter plugin can be installed from:
          🔨 https://plugins.jetbrains.com/plugin/9212-flutter
        • Dart plugin can be installed from:
          🔨 https://plugins.jetbrains.com/plugin/6351-dart
        • Java version OpenJDK Runtime Environment (build 11.0.15+0-b2043.56-8887301)
    
    [✓] VS Code (version 1.91.1)
        • VS Code at /Applications/Visual Studio Code.app/Contents
        • Flutter extension version 3.92.0
    
    [✓] Connected device (4 available)
        • iPhone 14 Pro Max (mobile)      • C3C647B8-8F34-47FE-AAF3-62F431F97F91 • ios            • com.apple.CoreSimulator.SimRuntime.iOS-17-4 (simulator)
        • macOS (desktop)                 • macos                                • darwin-arm64   • macOS 14.5 23F79 darwin-arm64
        • Mac Designed for iPad (desktop) • mac-designed-for-ipad                • darwin         • macOS 14.5 23F79 darwin-arm64
        • Chrome (web)                    • chrome                               • web-javascript • Google Chrome 126.0.6478.183
    
    [✓] Network resources
        • All expected network resources are available.
    
    ! Doctor found issues in 1 category.
    

    Device info:

    Hardware Overview:
    
          Model Name: MacBook Air
          Model Identifier: Mac14,2
          Model Number: Z1610005FLL/A
          Chip: Apple M2
          Total Number of Cores: 8 (4 performance and 4 efficiency)
          Memory: 24 GB
          System Firmware Version: 10151.121.1
          OS Loader Version: 10151.121.1
          Serial Number (system): [REDACTED]
          Hardware UUID: [REDACTED]
          Provisioning UDID: [REDACTED]
          Activation Lock Status: Enabled
    
  16. jmagman commented on Aug 20, 2024

    @jmagman
    Member

    I'm going to close this again as this is a bug in the iOS simulator, and it reproduces without Flutter if you have x64 code running on an arm Apple Silicon simulator.

    If you're seeing this, you should try to identify which plugin has arm64 in the Excluded Architectures > Any iOS Simulator SDK build setting
    excluded_archs

    And then update to a version of that plugin that supports arm64 (for example, google_maps_flutter started supporting arm simulators in 2.6.0), or if none exists, work with the plugin author.

  17. github-actions commented on Sep 3, 2024

    @github-actions

    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 -v and a minimal reproduction of the issue.

  18. locked as resolved and limited conversation to collaborators on Sep 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work listcustomer: castawayengineflutter/engine related. See also e: labels.f: scrollingViewports, list views, slivers, etc.found in release: 2.0Found to occur in 2.0found in release: 2.1Found to occur in 2.1frameworkflutter/packages/flutter repository. See also f: labels.has reproducible stepsThe issue has been confirmed reproducible and is ready to work onplatform-host-armBuilding on an ARM-based platformplatform-iosiOS applications specificallyteam-iosOwned by iOS platform teamtriaged-iosTriaged by iOS platform team

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions