Skip to content

ScrollController.animateTo crashes when status bar is tapped on iOS #182233

Description

@LongCatIsLooong

internal b/482565401

No repros yet. It looks like ScrollPosition.applyContentDimensions was never called.

Stacktrack:

_TypeError at ScrollPosition.minScrollExtent at package:flutter/src/widgets/scroll_position.dart-a68024a0

Thread 0 main thread_TypeError: Null check operator used on a null value
at ScrollPosition.minScrollExtent(scroll_position.dart:235)
at ScrollMetrics.outOfRange(scroll_metrics.dart:117)
at BouncingScrollPhysics.createBallisticSimulation(scroll_physics.dart:756)
at ScrollPhysics.createBallisticSimulation(scroll_physics.dart:408)
at ScrollPositionWithSingleContext.goBallistic(scroll_position_with_single_context.dart:151)
at ScrollPositionWithSingleContext.jumpTo(scroll_position_with_single_context.dart:206)
at ScrollPositionWithSingleContext.animateTo(scroll_position_with_single_context.dart:180)
at ScrollController.animateTo(scroll_controller.dart:214)
at ScaffoldState.handleStatusBarTap(scaffold.dart:2750)
at WidgetsBinding._handleStatusBarActions(binding.dart:1010)
at MethodChannel._handleAsMethodCall(platform_channel.dart:607)
at MethodChannel.setMethodCallHandler.<anonymous closure>(platform_channel.dart:597)
at _DefaultBinaryMessenger.setMessageHandler.<anonymous closure>(binding.dart:663)
at _invoke2.<anonymous closure>(hooks.dart:458)
at CoreActivityZoneImpl._run.<anonymous closure>(zone.dart:220)
at _rootRun(zone_root.dart:35)
at _ZoneDelegate.run(zone_delegate.dart:84)
at CoreActivityZoneImpl._run(zone.dart:217)
at _CustomZone.run(zone.dart:726)
at _CustomZone.runGuarded(zone.dart:625)
at _invoke2(hooks.dart:457)
at _ChannelCallbackRecord.invoke(channel_buffers.dart:45)
at _Channel.push(channel_buffers.dart:136)
at ChannelBuffers.push(channel_buffers.dart:344)
at PlatformDispatcher._dispatchPlatformMessage(platform_dispatcher.dart:822)
at _dispatchPlatformMessage(hooks.dart:369)

Metadata

Metadata

Labels

P1High-priority issues at the top of the work listengineflutter/engine related. See also e: labels.frameworkflutter/packages/flutter repository. See also f: labels.platform-iosiOS applications specificallyteam-iosOwned by iOS platform teamtriaged-iosTriaged by iOS platform team

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions