Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TableView: Hovering over an InkWell while scrolling fast causes exceptions. #138977

Closed
2 tasks done
psengelke opened this issue Nov 24, 2023 · 14 comments · Fixed by #148298
Closed
2 tasks done

TableView: Hovering over an InkWell while scrolling fast causes exceptions. #138977

psengelke opened this issue Nov 24, 2023 · 14 comments · Fixed by #148298
Labels
a: error message Error messages from the Flutter framework c: regression It was better in the past than it is now f: scrolling Viewports, list views, slivers, etc. found in release: 3.16 Found to occur in 3.16 found in release: 3.17 Found to occur in 3.17 framework flutter/packages/flutter repository. See also f: labels. has reproducible steps The issue has been confirmed reproducible and is ready to work on p: two_dimensional_scrollables Issues pertaining to the two_dimensional_scrollables package P2 Important issues not at the top of the work list package flutter/packages repository. See also p: labels. team-framework Owned by Framework team triaged-framework Triaged by Framework team

Comments

@psengelke
Copy link

psengelke commented Nov 24, 2023

Is there an existing issue for this?

Steps to reproduce

Using the provided code sample:

  1. Run flutter run -d macos (chrome works too, or possibly any target where a mouse pointer is present).
  2. Mouse over any of the purple widgets and keep the mouse pointer within its bounds.
  3. Now scroll quickly across or down the list. (A trackpad may be required for this to produce the issue.)
  4. Obverse that the cells stop rendering correctly and exceptions are logged to the console.

Expected results

I would expect to be able to use Inkwell and similar widgets without any issues as in other scrollable widgets.

Actual results

Scrolling over a large number of cells containing InkWell widgets in quick succession, while hovering over any of them, causes exceptions to be thrown.

After upgrading to Flutter v3.16.0, this issue started occurring.
I was not able to reproduce this issue in Flutter v3.13.9.
I was able to reproduce this on both macOS and in Chrome.

There are two exceptions that occur:

  • Null check operator used on a null value when calling RenderTableViewport#parentDataOf.
  • The paint extent of the child has not been determined yet. when checking if the cell is visible.

Thoughts:

  • It seems this has something to do with the hover effect of InkWell when exiting the viewport before its next state is set.
  • If the InkWell's onTap is omitted in the provided example, no exceptions occur.

A workaround for now is to use GestureDetector and forgo ink feedback, but this is not an ideal user experience.

Code sample

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

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

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Demo',
      theme: ThemeData(
        colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
        useMaterial3: true,
      ),
      home: const MyHomePage(title: 'Home'),
    );
  }
}

class MyHomePage extends StatefulWidget {
  const MyHomePage({super.key, required this.title});

  final String title;

  @override
  State<MyHomePage> createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text(widget.title),
      ),
      body: TableView.builder(
        columnCount: 100,
        rowCount: 100,
        rowBuilder: (index) => const TableSpan(
          extent: FixedTableSpanExtent(100),
        ),
        columnBuilder: (index) => const TableSpan(
          extent: FixedTableSpanExtent(100),
        ),
        cellBuilder: (context, vicinity) => TableViewCell(
          child: SizedBox.expand(
            child: Padding(
              padding: const EdgeInsets.all(4),
              child: Material(
                color: Theme.of(context).colorScheme.secondaryContainer,
                borderRadius: BorderRadius.circular(8),
                clipBehavior: Clip.hardEdge,
                child: InkWell(
                  onTap: () {}, // <== Comment out to prevent exceptions.
                  child: Center(
                    child: Text("${vicinity.row} : ${vicinity.column}"),
                  ),
                ),
              ),
            ),
          ),
        ),
      ),
    );
  }
}

Screenshots or Video

Screenshots / Video demonstration
Screen.Recording.2023-11-24.at.14.27.53.mov

Logs

Logs
══╡ EXCEPTION CAUGHT BY RENDERING LIBRARY
╞═════════════════════════════════════════════════════════
The following _TypeError was thrown during performLayout():
Null check operator used on a null value

The relevant error-causing widget was:
  TableViewport
  TableViewport:file:///Users/psengelke/.pub-cache/hosted/pub.dev/two_dimensional_scrollables-0.0
  .4/lib/src/table_view/table.dart:191:12

When the exception was thrown, this was the stack:
#0      RenderTableViewport.parentDataOf
(package:two_dimensional_scrollables/src/table_view/table.dart:332:23)
#1      RenderTwoDimensionalViewport.performLayout.<anonymous closure>.<anonymous closure>
(package:flutter/src/widgets/two_dimensional_viewport.dart:1264:17)
#2      WhereIterator.moveNext (dart:_internal/iterable.dart:451:13)
#3      Iterable.isEmpty (dart:core/iterable.dart:540:33)
#4      RenderTwoDimensionalViewport.performLayout.<anonymous closure>
(package:flutter/src/widgets/two_dimensional_viewport.dart:1265:10)
#5      RenderObject.invokeLayoutCallback.<anonymous closure>
(package:flutter/src/rendering/object.dart:2657:59)
#6      PipelineOwner._enableMutationsToDirtySubtrees
(package:flutter/src/rendering/object.dart:1071:15)
#7      RenderObject.invokeLayoutCallback (package:flutter/src/rendering/object.dart:2657:14)
#8      RenderTwoDimensionalViewport.performLayout
(package:flutter/src/widgets/two_dimensional_viewport.dart:1258:5)
#9      RenderObject._layoutWithoutResize (package:flutter/src/rendering/object.dart:2385:7)
#10     PipelineOwner.flushLayout (package:flutter/src/rendering/object.dart:1025:18)
#11     PipelineOwner.flushLayout (package:flutter/src/rendering/object.dart:1038:15)
#12     RendererBinding.drawFrame (package:flutter/src/rendering/binding.dart:591:23)
#13     WidgetsBinding.drawFrame (package:flutter/src/widgets/binding.dart:986:13)
#14     RendererBinding._handlePersistentFrameCallback
(package:flutter/src/rendering/binding.dart:457:5)
#15     SchedulerBinding._invokeFrameCallback
(package:flutter/src/scheduler/binding.dart:1325:15)
#16     SchedulerBinding.handleDrawFrame (package:flutter/src/scheduler/binding.dart:1255:9)
#17     SchedulerBinding._handleDrawFrame (package:flutter/src/scheduler/binding.dart:1113:5)
#18     _invoke (dart:ui/hooks.dart:312:13)
#19     PlatformDispatcher._drawFrame (dart:ui/platform_dispatcher.dart:383:5)
#20     _drawFrame (dart:ui/hooks.dart:283:31)

The following RenderObject was being processed when the exception was fired:
RenderTableViewport#8bbee NEEDS-LAYOUT NEEDS-COMPOSITING-BITS-UPDATE:
  needs compositing
  creator: TableViewport ← IgnorePointer-[GlobalKey#e889b] ← Semantics ← Listener ←
  _GestureSemantics
    ← RawGestureDetector-[LabeledGlobalKey<RawGestureDetectorState>#0335d] ← Listener ←
    _ScrollableScope ← _ScrollSemantics-[GlobalKey#aecc8] ←
    NotificationListener<ScrollMetricsNotification> ←
    _HorizontalInnerDimension-[LabeledGlobalKey<ScrollableState>#0fa42] ←
    IgnorePointer-[GlobalKey#f3c2c] ← ⋯
  parentData: <none> (can use size)
  constraints: BoxConstraints(0.0<=w<=800.0, 0.0<=h<=544.0)
  layer: OffsetLayer#63d26
  size: Size(800.0, 544.0)
This RenderObject had the following descendants (showing up to depth 5):
    (row: 6, column: 0): RenderRepaintBoundary#bf268
      child: RenderConstrainedBox#38520
        child: RenderPadding#f872e
          child: RenderPhysicalShape#fb3ba
            child: RenderCustomPaint#24868
    (row: 6, column: 1): RenderRepaintBoundary#3e879
      child: RenderConstrainedBox#69b0e
        child: RenderPadding#cf35b
          child: RenderPhysicalShape#53178
            child: RenderCustomPaint#4374b
    (row: 6, column: 2): RenderRepaintBoundary#4f98c
      child: RenderConstrainedBox#c688a
        child: RenderPadding#94d07
          child: RenderPhysicalShape#56753
            child: RenderCustomPaint#5fa30
    (row: 6, column: 3): RenderRepaintBoundary#b8ff1
      child: RenderConstrainedBox#96890
        child: RenderPadding#2cf42
          child: RenderPhysicalShape#6e988
            child: RenderCustomPaint#9c5c7
    (row: 6, column: 4): RenderRepaintBoundary#8a96b
      child: RenderConstrainedBox#cdd2d
        child: RenderPadding#ed307
          child: RenderPhysicalShape#20dcc
            child: RenderCustomPaint#37e5e
    ...(descendants list truncated after 25 lines)
═════════════════════════════════════════════════════════════════════════════════════════════════
═══

Another exception was thrown: Null check operator used on a null value

Flutter Doctor output

Doctor output
[✓] Flutter (Channel stable, 3.16.0, on macOS 12.7.1 21G920 darwin-x64, locale en-ZA)
    • Flutter version 3.16.0 on channel stable at /Users/psengelke/fvm/versions/3.16.0
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision db7ef5bf9f (9 days ago), 2023-11-15 11:25:44 -0800
    • Engine revision 74d16627b9
    • Dart version 3.2.0
    • DevTools version 2.28.2

[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.0)
    • Android SDK at /Users/psengelke/Library/Android/sdk
    • Platform android-33, build-tools 33.0.0
    • ANDROID_HOME = /Users/psengelke/Library/Android/sdk
    • Java binary at: /Users/psengelke/Applications/Android
      Studio.app/Contents/jbr/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b829.9-10027231)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 14.2)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 14C18
    • CocoaPods version 1.14.3

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

[✓] Android Studio (version 2022.3)
    • Android Studio at /Users/psengelke/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 17.0.6+0-17.0.6b829.9-10027231)

[✓] IntelliJ IDEA Ultimate Edition (version 2023.2.5)
    • IntelliJ at /Users/psengelke/Applications/IntelliJ IDEA Ultimate.app
    • Flutter plugin version 76.3.4
    • Dart plugin version 232.10248

[✓] VS Code (version 1.83.0)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension can be installed from:
      🔨 https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter

[✓] Connected device (2 available)
    • macOS (desktop) • macos  • darwin-x64     • macOS 12.7.1 21G920 darwin-x64
    • Chrome (web)    • chrome • web-javascript • Google Chrome 119.0.6045.159

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

• No issues found!
@psengelke
Copy link
Author

psengelke commented Nov 24, 2023

This seems to happen for any widget that has ink splashes, like buttons.

@danagbemava-nc danagbemava-nc added the in triage Presently being triaged by the triage team label Nov 27, 2023
@danagbemava-nc
Copy link
Member

Reproducible using the code sample provided above.

I tested on stable 3.13, 3.16 and master and it did not reproduce on stable 3.13 but it reproduced on 3.16 and master.

flutter doctor -v
[!] Flutter (Channel [user-branch], 3.13.0, on macOS 14.1.1 23B81 darwin-arm64, locale en-GB)
    ! Flutter version 3.13.0 on channel [user-branch] at /Users/nexus/dev/sdks/flutter_rc/flutter
      Currently on an unknown channel. Run `flutter channel` to switch to an official channel.
      If that doesn't fix the issue, reinstall Flutter by following instructions at https://flutter.dev/docs/get-started/install.
    ! Warning: `flutter` on your path resolves to /Users/nexus/dev/sdks/flutter/bin/flutter, which is not inside your current Flutter SDK checkout at /Users/nexus/dev/sdks/flutter_rc/flutter. Consider adding /Users/nexus/dev/sdks/flutter_rc/flutter/bin to the front of your path.
    ! Warning: `dart` on your path resolves to /Users/nexus/dev/sdks/flutter/bin/dart, which is not inside your current Flutter SDK checkout at /Users/nexus/dev/sdks/flutter_rc/flutter. Consider adding /Users/nexus/dev/sdks/flutter_rc/flutter/bin to the front of your path.
    ! Upstream repository unknown source is not a standard remote.
      Set environment variable "FLUTTER_GIT_URL" to unknown source to dismiss this error.
    • Framework revision efbf63d9c6 (3 months ago), 2023-08-15 21:05:06 -0500
    • Engine revision 1ac611c64e
    • Dart version 3.1.0
    • DevTools version 2.25.0
    • 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 34.0.0-rc1)
    • Android SDK at /Users/nexus/Library/Android/sdk
    • Platform android-34, build-tools 34.0.0-rc1
    • Java binary at: /Users/nexus/Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b829.9-10027231)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 15.0)
    • Xcode at /Applications/Xcode-15.0.0-Release.Candidate.app/Contents/Developer
    • Build 15A240d
    • CocoaPods version 1.13.0

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

[✓] Android Studio (version 2022.3)
    • Android Studio at /Users/nexus/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 17.0.6+0-17.0.6b829.9-10027231)

[✓] IntelliJ IDEA Ultimate Edition (version 2023.2.5)
    • IntelliJ at /Users/nexus/Applications/IntelliJ IDEA Ultimate.app
    • Flutter plugin version 76.3.4
    • Dart plugin version 232.10072.19

[✓] VS Code (version 1.84.2)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.76.0

[✓] Connected device (4 available)
    • Nexus (mobile)       • 00008020-001875E83A38002E • ios            • iOS 17.1.1 21B91
    • Dean’s iPad (mobile) • 00008103-000825C811E3401E • ios            • iOS 17.1.1 21B91
    • macOS (desktop)      • macos                     • darwin-arm64   • macOS 14.1.1 23B81 darwin-arm64
    • Chrome (web)         • chrome                    • web-javascript • Google Chrome 119.0.6045.159

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

! Doctor found issues in 1 category.
[✓] Flutter (Channel stable, 3.16.0, on macOS 14.1.1 23B81 darwin-arm64, locale en-GB)
    • Flutter version 3.16.0 on channel stable at /Users/nexus/dev/sdks/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision db7ef5bf9f (11 days ago), 2023-11-15 11:25:44 -0800
    • Engine revision 74d16627b9
    • Dart version 3.2.0
    • DevTools version 2.28.2

[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0-rc1)
    • Android SDK at /Users/nexus/Library/Android/sdk
    • Platform android-34, build-tools 34.0.0-rc1
    • Java binary at: /Users/nexus/Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b829.9-10027231)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 15.0)
    • Xcode at /Applications/Xcode-15.0.0-Release.Candidate.app/Contents/Developer
    • Build 15A240d
    • CocoaPods version 1.13.0

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

[✓] Android Studio (version 2022.3)
    • Android Studio at /Users/nexus/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 17.0.6+0-17.0.6b829.9-10027231)

[✓] IntelliJ IDEA Ultimate Edition (version 2023.2.5)
    • IntelliJ at /Users/nexus/Applications/IntelliJ IDEA Ultimate.app
    • Flutter plugin version 76.3.4
    • Dart plugin version 232.10072.19

[✓] VS Code (version 1.84.2)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.76.0

[✓] Connected device (4 available)
    • Nexus (mobile)       • 00008020-001875E83A38002E • ios            • iOS 17.1.1 21B91
    • Dean’s iPad (mobile) • 00008103-000825C811E3401E • ios            • iOS 17.1.1 21B91
    • macOS (desktop)      • macos                     • darwin-arm64   • macOS 14.1.1 23B81 darwin-arm64
    • Chrome (web)         • chrome                    • web-javascript • Google Chrome 119.0.6045.159

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

• No issues found!
[!] Flutter (Channel master, 3.17.0-15.0.pre.29, on macOS 14.1.1 23B81 darwin-arm64, locale en-GB)
    • Flutter version 3.17.0-15.0.pre.29 on channel master at /Users/nexus/dev/sdks/flutters
    ! Warning: `flutter` on your path resolves to /Users/nexus/dev/sdks/flutter/bin/flutter, which is not inside your current Flutter SDK checkout at /Users/nexus/dev/sdks/flutters. Consider adding /Users/nexus/dev/sdks/flutters/bin to the front of your path.
    ! Warning: `dart` on your path resolves to /Users/nexus/dev/sdks/flutter/bin/dart, which is not inside your current Flutter SDK checkout at /Users/nexus/dev/sdks/flutters. Consider adding /Users/nexus/dev/sdks/flutters/bin to the front of your path.
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision c45f583799 (2 hours ago), 2023-11-27 00:04:28 -0500
    • Engine revision 292a92166a
    • Dart version 3.3.0 (build 3.3.0-152.0.dev)
    • DevTools version 2.30.0-dev.4
    • 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 34.0.0-rc1)
    • Android SDK at /Users/nexus/Library/Android/sdk
    • Platform android-34, build-tools 34.0.0-rc1
    • Java binary at: /Users/nexus/Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b829.9-10027231)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 15.0)
    • Xcode at /Applications/Xcode-15.0.0-Release.Candidate.app/Contents/Developer
    • Build 15A240d
    • CocoaPods version 1.13.0

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

[✓] Android Studio (version 2022.3)
    • Android Studio at /Users/nexus/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 17.0.6+0-17.0.6b829.9-10027231)

[✓] IntelliJ IDEA Ultimate Edition (version 2023.2.5)
    • IntelliJ at /Users/nexus/Applications/IntelliJ IDEA Ultimate.app
    • Flutter plugin version 76.3.4
    • Dart plugin version 232.10072.19

[✓] VS Code (version 1.84.2)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.76.0

[✓] Connected device (4 available)
    • Nexus (mobile)       • 00008020-001875E83A38002E • ios            • iOS 17.1.1 21B91
    • Dean’s iPad (mobile) • 00008103-000825C811E3401E • ios            • iOS 17.1.1 21B91
    • macOS (desktop)      • macos                     • darwin-arm64   • macOS 14.1.1 23B81 darwin-arm64
    • Chrome (web)         • chrome                    • web-javascript • Google Chrome 119.0.6045.159

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

! Doctor found issues in 1 category.

@danagbemava-nc danagbemava-nc added c: regression It was better in the past than it is now framework flutter/packages/flutter repository. See also f: labels. f: scrolling Viewports, list views, slivers, etc. package flutter/packages repository. See also p: labels. a: error message Error messages from the Flutter framework has reproducible steps The issue has been confirmed reproducible and is ready to work on team-framework Owned by Framework team p: two_dimensional_scrollables Issues pertaining to the two_dimensional_scrollables package found in release: 3.16 Found to occur in 3.16 found in release: 3.17 Found to occur in 3.17 and removed in triage Presently being triaged by the triage team labels Nov 27, 2023
@goderbauer
Copy link
Member

cc @Piinks

@goderbauer goderbauer added P2 Important issues not at the top of the work list triaged-framework Triaged by Framework team labels Nov 28, 2023
@momrak
Copy link

momrak commented Jan 11, 2024

Came across this bug now when using CheckboxListTile. I tried using a general ListTile afterwards, and this worked until the onTap was added. When I then hover a tile which then gets a hover effect and scroll it breaks with the same exception

@Piinks
Copy link
Contributor

Piinks commented Jan 18, 2024

This may be fixed by #141504, which is fixing what I suspect is the same issue in #141101
The assertion in parentDataOf did not account for the children being kept alive, and Inkwell uses keep alive.

@Amir-P
Copy link
Contributor

Amir-P commented Jan 19, 2024

This is still reproducible on master as well as on #141504 @Piinks

@Piinks
Copy link
Contributor

Piinks commented Jan 19, 2024

Ah ok! Thanks for checking!

@xyun52
Copy link

xyun52 commented Feb 18, 2024

This bug still exists in the latest version 3.19 @Piinks

@sid2710-alt
Copy link

Still Reproducible in 0.1.1 version @Piinks.

@psengelke
Copy link
Author

I have updated the code sample to be compatible with two_dimensional_scrollables v0.2.1.

The issue still persists in combination with Flutter v3.19.5.

gawi151 added a commit to gawi151/flutter that referenced this issue May 7, 2024
Possible fix for assert in RenderTwoDimensionalViewport.performLayout.
the assert about not keeping anything alive any longer
@gawi151
Copy link
Contributor

gawi151 commented May 7, 2024

I possibly have a fix for this issue here gawi151@8159881. At the moment I'm not sure if this is the correct fix. Running flutter test is passing (all green) - so no breaking change. The code sample is no longer crashing with my change.

Maybe someone with better understanding of 2d viewport could look at it?

cc: @Piinks

@Piinks
Copy link
Contributor

Piinks commented May 8, 2024

Hey @gawi151 thanks for looking into this! That looks like the right fix to me, well done finding it!
Do you want to send a PR with a test? If not, I am happy to do so, let me know. :)

@gawi151
Copy link
Contributor

gawi151 commented May 9, 2024

@Piinks I'll try to do it in this or next week (if that's ok). And if I won't be able to do it in reasonable time I'll let you know 😉

gawi151 added a commit to gawi151/flutter that referenced this issue May 14, 2024
auto-submit bot pushed a commit that referenced this issue May 24, 2024
…n no longer should be kept alive) (#148298)

- Fixes a child not removed from `_keepAliveBucket` when widget is no longer kept alive offscreen. Bug was triggering assert in performLayout.
- Adds test to cover the case from bug report

Fixes #138977
victorsanni pushed a commit to victorsanni/flutter that referenced this issue May 31, 2024
…n no longer should be kept alive) (flutter#148298)

- Fixes a child not removed from `_keepAliveBucket` when widget is no longer kept alive offscreen. Bug was triggering assert in performLayout.
- Adds test to cover the case from bug report

Fixes flutter#138977
gawi151 added a commit to gawi151/flutter that referenced this issue Jun 4, 2024
…n no longer should be kept alive) (flutter#148298)

- Fixes a child not removed from `_keepAliveBucket` when widget is no longer kept alive offscreen. Bug was triggering assert in performLayout.
- Adds test to cover the case from bug report

Fixes flutter#138977
Copy link

github-actions bot commented Jun 7, 2024

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 7, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
a: error message Error messages from the Flutter framework c: regression It was better in the past than it is now f: scrolling Viewports, list views, slivers, etc. found in release: 3.16 Found to occur in 3.16 found in release: 3.17 Found to occur in 3.17 framework flutter/packages/flutter repository. See also f: labels. has reproducible steps The issue has been confirmed reproducible and is ready to work on p: two_dimensional_scrollables Issues pertaining to the two_dimensional_scrollables package P2 Important issues not at the top of the work list package flutter/packages repository. See also p: labels. team-framework Owned by Framework team triaged-framework Triaged by Framework team
Projects
None yet
9 participants