Repository navigation
Tabs and scrolling demo can crash - null.scrollTo() #4193
Description
Activity
- addedc: regressionIt was better in the past than it is nowIt was better in the past than it is nowp: material_uimaterial_ui package in flutter/packagesmaterial_ui package in flutter/packagescustomer: galleryRelating to flutter/gallery repository. Please transfer non-framework issues there.Relating to flutter/gallery repository. Please transfer non-framework issues there.
on May 25, 2016 In this case, when the app is notified that the selected tab has changed the Scrollable that corresponded to the newly selected TabBarView has been discarded. So its GlobalKey's currentState is null.
The source of this problem appears to be that the TabBarSelection onChanged() only callback runs when the animation between TabBarView's (between the old and newly selected tab) has completed, and the TabBarViews are materialized and discarded as needed. The TabBarViews are implemented with a PageableList and only two tab pages (for taps on a tab) or three tab pages (for TabBarView left/right drags) are materialized by the PageableList at any time. It looks like it's posisble for the PageableList to be rebuilt more than once before the onChanged callback runs.
Similar to #4195, customer leafy worked around by skipping the test.
- addedframeworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.
on Sep 12, 2016 - modified the milestones: This milestone has been deleted, This milestone has been deleted
on Jan 30, 2017 - addedf: scrollingViewports, list views, slivers, etc.Viewports, list views, slivers, etc.
on Oct 17, 2017 - addedc: crashStack traces logged to the consoleStack traces logged to the console
on Dec 20, 2017 I can't reproduce #4195 Do you think this is still an issue?
Unfortunately this bug corresponds to versions of the tabs implementation and the tabs demo that no longer exist. I can no longer reproduce the crash and code path that was failing is gone. I'm going to close this issue. It's a shame that it has taken so long!
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 -vand a minimal reproduction of the issue.- locked as resolved and limited conversation to collaborators
on Aug 17, 2021
This occurred while swiping repeatedly and rapidly in one direction.