Skip to content

examples/widgets/mixed_viewport.dart crashes when you remove big nodes before small nodes #144

Closed

Description

@FlutterIssues

Issue by Hixie
Tuesday Aug 25, 2015 at 21:33 GMT
Originally opened as https://github.com/flutter/engine/issues/820


To reproduce:

  • click add a few times until you have a big block followed by a small block
  • scroll the big block almost off screen, such that more of the block is off the top of the screen than the height of the small block
  • tap the big block

The small block is moved off the screen and then there's a crash.

CC @HansMuller

Activity

  1. FlutterIssues commented on Nov 9, 2015

    @FlutterIssues
    Author

    Comment by Hixie
    Tuesday Aug 25, 2015 at 21:39 GMT


    I think you can also trigger this in examples/widgets/card_collection.dart by flinging a card out while scrolling.

  2. FlutterIssues commented on Nov 9, 2015

    @FlutterIssues
    Author

    Comment by HansMuller
    Tuesday Aug 25, 2015 at 21:52 GMT


    I have looked into this (without success) more than once. The failure is signalled by this assert:

    'http://localhost:9888/packages/sky/widgets/framework.dart': Failed assertion: line 366 pos 14: 'oldNode.mounted' is not true.

    The problem can be avoided by changing MixedViewport._doLayout():

        // Remove any old children.
        for (_Key oldChildKey in childrenByKey.keys) {
          if (!childrenByKey[oldChildKey].mounted)  // HACK
            continue;
          ...
         }
    

    It's not clear how a !mounted Widget ends up in childrenByKey at this point.

  3. FlutterIssues commented on Nov 9, 2015

    @FlutterIssues
    Author

    Comment by HansMuller
    Monday Aug 31, 2015 at 18:25 GMT


    I've checked this against the original test case and with the card_collection.dart (swipe away) demo. The bug appears to have been fixed. I haven't been able to pin down exactly which change gets the credit.

  4. added this to the milestone on Dec 8, 2015
  5. added
    waiting for responseThe Flutter team cannot make further progress on this issue until the original reporter responds
    on Sep 14, 2016
  6. sethladd commented on Sep 14, 2016

    @sethladd
    Contributor

    Is this still an issue?

  7. Hixie commented on Sep 14, 2016

    @Hixie
    Contributor

    I'm going to close this because I don't know how to reproduce it anymore.
    I did get #5864 while trying to reproduce it...

  8. github-actions commented on Aug 17, 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.

  9. locked as resolved and limited conversation to collaborators on Aug 17, 2021
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

    frameworkflutter/packages/flutter repository. See also f: labels.waiting for responseThe Flutter team cannot make further progress on this issue until the original reporter responds

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions