Skip to content

[TabBar] Setting isScrollable in TabBar to true causes exception when navigating between pages #44269

Closed

Description

@perclasson

Steps to reproduce

(this is on the master branch of flutter)

  1. Create an app with a start page and a main page with a TabBar that has isScrollable set to true (see this gist: https://gist.github.com/perclasson/912d072cdb9cd17e0fb837d9afe0b309).

  2. Go from the start page (by clicking on the button) and you will get an exception on the tab bar page.

Logs

[VERBOSE-2:ui_dart_state.cc(157)] Unhandled Exception: 'package:flutter/src/widgets/scroll_position.dart': Failed assertion: line 696 pos 12: 'pixels != null': is not true.
#0      _AssertionError._doThrowNew (dart:core-patch/errors_patch.dart:40:39)
#1      _AssertionError._throwNew (dart:core-patch/errors_patch.dart:36:5)
#2      ScrollPosition.dispose (package:flutter/src/widgets/scroll_position.dart:696:12)
#3      ScrollPositionWithSingleContext.dispose (package:flutter/src/widgets/scroll_position_with_single_context.dart:256:11)
#4      _rootRun (dart:async/zone.dart:1120:38)
#5      _CustomZone.run (dart:async/zone.dart:1021:19)
#6      _CustomZone.runGuarded (dart:async/zone.dart:923:7)
#7      _CustomZone.bindCallbackGuarded.<anonymous closure> (dart:async/zone.dart:963:23)
#8      _rootRun (dart:async/zone.dart:1124:13)
#9      _CustomZone.run (dart:async/zone.dart:1021:19)
#10     _CustomZone.runGuarded (dart:async/zone.dart:923:7)
#11     _CustomZone.bindCallbackGuarded.<anonymous closure<…>

Flutter Doctor

[✓] Flutter (Channel master, v1.10.1-pre.867, on Mac OS X 10.14.6 18G95, locale en-DE)
    • Flutter version 1.10.1-pre.867 at /Users/perc/development/flutter
    • Framework revision 289b4588f4 (6 hours ago), 2019-11-06 02:51:17 -0500
    • Engine revision 9726b4cb99
    • Dart version 2.7.0

[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
    • Android SDK at /Users/perc/Library/Android/sdk
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-stable, build-tools 29.0.2
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b49-5587405)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 11.0)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 11.0, Build version 11A420a
    • CocoaPods version 1.7.5

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

[✓] Android Studio (version 3.5)
    • Android Studio at /Applications/Android Studio with Blaze.app/Contents
    • Flutter plugin version 40.2.2
    • Dart plugin version 191.8593
    • Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b49-5587405)

[✓] Android Studio (version 3.5)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin version 40.2.2
    • Dart plugin version 191.8593
    • Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b49-5587405)

[!] VS Code (version 1.39.2)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    ✗ Flutter extension not installed; install from
      https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter

[✓] Connected device (4 available)
    • iPhone 11 Pro Max • 787077DE-9BAA-449A-B911-80F95A3FCD2A • ios            • com.apple.CoreSimulator.SimRuntime.iOS-13-0 (simulator)
    • macOS             • macOS                                • darwin-x64     • Mac OS X 10.14.6 18G95
    • Chrome            • chrome                               • web-javascript • Google Chrome 78.0.3904.87
    • Web Server        • web-server                           • web-javascript • Flutter Tools

Activity

  1. added
    p: material_uimaterial_ui package in flutter/packages
    f: routesNavigator, Router, and related APIs.
    c: crashStack traces logged to the console
    on Nov 6, 2019
  2. perclasson commented on Nov 6, 2019

    @perclasson
    ContributorAuthor

    After running git bisect it seems as if this is caused by #43756. When I revert that commit it no longer gives me an exception.

  3. perclasson commented on Nov 6, 2019

    @perclasson
    ContributorAuthor
  4. self-assigned this
    on Nov 12, 2019
  5. github-actions commented on Aug 25, 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.

  6. locked as resolved and limited conversation to collaborators on Aug 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

c: crashStack traces logged to the consolec: regressionIt was better in the past than it is nowf: routesNavigator, Router, and related APIs.p: material_uimaterial_ui package in flutter/packageswaiting for PR to land (fixed)A fix is in flight

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions