Skip to content

_debugUltimatePreviousSiblingOf(after, equals: _firstChild) is not true. #11895

@megamattron

Description

@megamattron

Steps to Reproduce

I have a PageView that contains the top level widgets for my app, with switching between them controlled by a BottomNavBar. As per @Hixie's advice in the chat, I am adding AutomaticKeepAliveClientMixin to these top level widgets so the PageView won't recycle them and will preserve state. After I added this to the main widget that contains a network loaded ListView, on occasion when switching back to this ListView from another tab I get this failed assertion in the framework.

Logs

══╡ EXCEPTION CAUGHT BY WIDGETS LIBRARY ╞═══════════════════════════════════════════════════════════
The following assertion was thrown building NotificationListener<KeepAliveNotification>:
'package:flutter/src/rendering/object.dart': Failed assertion: line 3031 pos 14:
'_debugUltimatePreviousSiblingOf(after, equals: _firstChild)': is not true.
Either the assertion indicates an error in the framework itself, or we should provide substantially
more information in this error message to help you determine and fix the underlying cause.
In either case, please report this assertion by filing a bug on GitHub:
  https://github.com/flutter/flutter/issues/new
When the exception was thrown, this was the stack:
#2      RenderSliver&ContainerRenderObjectMixin._insertIntoChildList (package:flutter/src/rendering/object.dart:3031:14)
#3      RenderSliver&ContainerRenderObjectMixin.insert (package:flutter/src/rendering/object.dart:3065:5)
#4      RenderSliverMultiBoxAdaptor.insert (package:flutter/src/rendering/sliver_multi_box_adaptor.dart:193:17)
#5      SliverMultiBoxAdaptorElement.insertChildRenderObject (package:flutter/src/widgets/sliver.dart:840:18)
#6      RenderObjectElement.attachRenderObject (package:flutter/src/widgets/framework.dart:4380:35)
#7      RenderObjectElement.mount (package:flutter/src/widgets/framework.dart:4151:5)
#8      SingleChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:4515:16)
#9      Element.inflateWidget (package:flutter/src/widgets/framework.dart:2882:14)
#10     Element.updateChild (package:flutter/src/widgets/framework.dart:2685:12)
#11     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3546:16)
#12     Element.rebuild (package:flutter/src/widgets/framework.dart:3435:5)
#13     ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3514:5)
#14     ComponentElement.mount (package:flutter/src/widgets/framework.dart:3509:5)
#15     Element.inflateWidget (package:flutter/src/widgets/framework.dart:2882:14)
#16     Element.updateChild (package:flutter/src/widgets/framework.dart:2685:12)
#17     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3546:16)
#18     Element.rebuild (package:flutter/src/widgets/framework.dart:3435:5)
#19     ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3514:5)
#20     ComponentElement.mount (package:flutter/src/widgets/framework.dart:3509:5)
#21     ParentDataElement.mount (package:flutter/src/widgets/framework.dart:3827:16)
#22     Element.inflateWidget (package:flutter/src/widgets/framework.dart:2882:14)
#23     Element.updateChild (package:flutter/src/widgets/framework.dart:2685:12)
#24     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3546:16)
#25     Element.rebuild (package:flutter/src/widgets/framework.dart:3435:5)
#26     ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3514:5)
#27     StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:3652:22)
#28     ComponentElement.mount (package:flutter/src/widgets/framework.dart:3509:5)
#29     Element.inflateWidget (package:flutter/src/widgets/framework.dart:2882:14)
#30     Element.updateChild (package:flutter/src/widgets/framework.dart:2685:12)
#31     SliverMultiBoxAdaptorElement.performRebuild (package:flutter/src/widgets/sliver.dart:696:34)
#32     SliverMultiBoxAdaptorElement.update (package:flutter/src/widgets/sliver.dart:665:7)
#33     Element.updateChild (package:flutter/src/widgets/framework.dart:2674:15)
#34     RenderObjectElement.updateChildren (package:flutter/src/widgets/framework.dart:4250:32)
#35     MultiChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:4631:17)
#36     _ViewportElement.update (package:flutter/src/widgets/viewport.dart:150:17)
#37     Element.updateChild (package:flutter/src/widgets/framework.dart:2674:15)
#38     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3546:16)
#39     Element.rebuild (package:flutter/src/widgets/framework.dart:3435:5)
#40     ProxyElement.update (package:flutter/src/widgets/framework.dart:3781:5)
#41     Element.updateChild (package:flutter/src/widgets/framework.dart:2674:15)
#42     SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:4523:14)
#43     Element.updateChild (package:flutter/src/widgets/framework.dart:2674:15)
#44     SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:4523:14)
#45     Element.updateChild (package:flutter/src/widgets/framework.dart:2674:15)
#46     SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:4523:14)
#47     Element.updateChild (package:flutter/src/widgets/framework.dart:2674:15)
#48     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3546:16)
#49     Element.rebuild (package:flutter/src/widgets/framework.dart:3435:5)
#50     StatefulElement.update (package:flutter/src/widgets/framework.dart:3671:5)
#51     Element.updateChild (package:flutter/src/widgets/framework.dart:2674:15)
#52     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3546:16)
#53     Element.rebuild (package:flutter/src/widgets/framework.dart:3435:5)
#54     StatefulElement.update (package:flutter/src/widgets/framework.dart:3671:5)
#55     Element.updateChild (package:flutter/src/widgets/framework.dart:2674:15)
#56     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3546:16)
#57     Element.rebuild (package:flutter/src/widgets/framework.dart:3435:5)
#58     StatelessElement.update (package:flutter/src/widgets/framework.dart:3596:5)
#59     Element.updateChild (package:flutter/src/widgets/framework.dart:2674:15)
#60     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3546:16)
#61     Element.rebuild (package:flutter/src/widgets/framework.dart:3435:5)
#62     StatefulElement.update (package:flutter/src/widgets/framework.dart:3671:5)
#63     Element.updateChild (package:flutter/src/widgets/framework.dart:2674:15)
#64     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3546:16)
#65     Element.rebuild (package:flutter/src/widgets/framework.dart:3435:5)
#66     ProxyElement.update (package:flutter/src/widgets/framework.dart:3781:5)
#67     Element.updateChild (package:flutter/src/widgets/framework.dart:2674:15)
#68     RenderObjectElement.updateChildren (package:flutter/src/widgets/framework.dart:4250:32)
#69     MultiChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:4631:17)
#70     Element.updateChild (package:flutter/src/widgets/framework.dart:2674:15)
#71     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3546:16)
#72     Element.rebuild (package:flutter/src/widgets/framework.dart:3435:5)
#73     ProxyElement.update (package:flutter/src/widgets/framework.dart:3781:5)
#74     Element.updateChild (package:flutter/src/widgets/framework.dart:2674:15)
#75     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3546:16)
#76     Element.rebuild (package:flutter/src/widgets/framework.dart:3435:5)
#77     StatefulElement.update (package:flutter/src/widgets/framework.dart:3671:5)
#78     Element.updateChild (package:flutter/src/widgets/framework.dart:2674:15)
#79     SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:4523:14)
#80     Element.updateChild (package:flutter/src/widgets/framework.dart:2674:15)
#81     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3546:16)
#82     Element.rebuild (package:flutter/src/widgets/framework.dart:3435:5)
#83     StatelessElement.update (package:flutter/src/widgets/framework.dart:3596:5)
#84     Element.updateChild (package:flutter/src/widgets/framework.dart:2674:15)
#85     SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:4523:14)
#86     Element.updateChild (package:flutter/src/widgets/framework.dart:2674:15)
#87     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3546:16)
#88     Element.rebuild (package:flutter/src/widgets/framework.dart:3435:5)
#89     StatefulElement.update (package:flutter/src/widgets/framework.dart:3671:5)
#90     Element.updateChild (package:flutter/src/widgets/framework.dart:2674:15)
#91     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3546:16)
#92     Element.rebuild (package:flutter/src/widgets/framework.dart:3435:5)
#93     StatefulElement.update (package:flutter/src/widgets/framework.dart:3671:5)
#94     Element.updateChild (package:flutter/src/widgets/framework.dart:2674:15)
#95     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3546:16)
#96     Element.rebuild (package:flutter/src/widgets/framework.dart:3435:5)
#97     ProxyElement.update (package:flutter/src/widgets/framework.dart:3781:5)
#98     Element.updateChild (package:flutter/src/widgets/framework.dart:2674:15)
#99     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3546:16)
#100    Element.rebuild (package:flutter/src/widgets/framework.dart:3435:5)
#101    ProxyElement.update (package:flutter/src/widgets/framework.dart:3781:5)
#102    Element.updateChild (package:flutter/src/widgets/framework.dart:2674:15)
#103    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3546:16)
#104    Element.rebuild (package:flutter/src/widgets/framework.dart:3435:5)
#105    StatefulElement.update (package:flutter/src/widgets/framework.dart:3671:5)
#106    Element.updateChild (package:flutter/src/widgets/framework.dart:2674:15)
#107    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3546:16)
#108    Element.rebuild (package:flutter/src/widgets/framework.dart:3435:5)
#109    BuildOwner.buildScope (package:flutter/src/widgets/framework.dart:2260:33)
#110    BindingBase&SchedulerBinding&GestureBinding&ServicesBinding&RendererBinding&WidgetsBinding.drawFrame (package:flutter/src/widgets/binding.dart:503:20)
#111    BindingBase&SchedulerBinding&GestureBinding&ServicesBinding&RendererBinding._handlePersistentFrameCallback (package:flutter/src/rendering/binding.dart:189:5)
#112    BindingBase&SchedulerBinding._invokeFrameCallback (package:flutter/src/scheduler/binding.dart:695:15)
#113    BindingBase&SchedulerBinding.handleDrawFrame (package:flutter/src/scheduler/binding.dart:643:9)
#114    _invoke (file:///b/build/slave/Mac_Engine/build/src/flutter/lib/ui/hooks.dart:86)
#115    _drawFrame (file:///b/build/slave/Mac_Engine/build/src/flutter/lib/ui/hooks.dart:75)
(elided 2 frames from class _AssertionError)
════════════════════════════════════════════════════════════════════════════════════════════════════
Another exception was thrown: 'package:flutter/src/rendering/object.dart': Failed assertion: line 3031 pos 14: '_debugUltimatePreviousSiblingOf(after, equals: _firstChild)': is not true.
Another exception was thrown: 'package:flutter/src/rendering/object.dart': Failed assertion: line 3031 pos 14: '_debugUltimatePreviousSiblingOf(after, equals: _firstChild)': is not true.
Another exception was thrown: 'package:flutter/src/widgets/framework.dart': Failed assertion: line 3437 pos 14: 'owner._debugCurrentBuildTarget == this': is not true.
Another exception was thrown: 'package:flutter/src/widgets/framework.dart': Failed assertion: line 3437 pos 14: 'owner._debugCurrentBuildTarget == this': is not true.
Another exception was thrown: 'package:flutter/src/widgets/framework.dart': Failed assertion: line 3437 pos 14: 'owner._debugCurrentBuildTarget == this': is not true.
Another exception was thrown: 'package:flutter/src/widgets/framework.dart': Failed assertion: line 3437 pos 14: 'owner._debugCurrentBuildTarget == this': is not true.
Another exception was thrown: 'package:flutter/src/widgets/framework.dart': Failed assertion: line 3437 pos 14: 'owner._debugCurrentBuildTarget == this': is not true.
Another exception was thrown: 'package:flutter/src/widgets/framework.dart': Failed assertion: line 3437 pos 14: 'owner._debugCurrentBuildTarget == this': is not true.
Another exception was thrown: 'package:flutter/src/widgets/framework.dart': Failed assertion: line 3437 pos 14: 'owner._debugCurrentBuildTarget == this': is not true.
Another exception was thrown: 'package:flutter/src/widgets/framework.dart': Failed assertion: line 3437 pos 14: 'owner._debugCurrentBuildTarget == this': is not true.
Another exception was thrown: 'package:flutter/src/widgets/framework.dart': Failed assertion: line 3437 pos 14: 'owner._debugCurrentBuildTarget == this': is not true.
Another exception was thrown: 'package:flutter/src/widgets/framework.dart': Failed assertion: line 3437 pos 14: 'owner._debugCurrentBuildTarget == this': is not true.
Another exception was thrown: 'package:flutter/src/widgets/framework.dart': Failed assertion: line 3437 pos 14: 'owner._debugCurrentBuildTarget == this': is not true.
Another exception was thrown: 'package:flutter/src/widgets/framework.dart': Failed assertion: line 3437 pos 14: 'owner._debugCurrentBuildTarget == this': is not true.
Another exception was thrown: 'package:flutter/src/widgets/framework.dart': Failed assertion: line 3437 pos 14: 'owner._debugCurrentBuildTarget == this': is not true.
Another exception was thrown: 'package:flutter/src/widgets/framework.dart': Failed assertion: line 3437 pos 14: 'owner._debugCurrentBuildTarget == this': is not true.
Analyzing /Users/matt/code/flutter/kudos...
  lint • Don't import implementation files from another package at lib/feed.dart:5:8 • implementation_imports
  lint • Close instances of `dart.core.Sink` at lib/feed.dart:26:26 • close_sinks
  lint • Don't explicitly initialize variables to null at lib/loading_list_view.dart:23:5 • avoid_init_to_null
  lint • Don't import implementation files from another package at lib/post.dart:3:8 • implementation_imports
  hint • Unused import at lib/application.dart:4:8 • unused_import
  hint • Unused import at lib/feed.dart:2:8 • unused_import
  hint • Unused import at lib/feed.dart:5:8 • unused_import
  hint • Unused import at lib/feed.dart:7:8 • unused_import
  hint • Unused import at lib/feed.dart:12:8 • unused_import
  hint • Unused import at lib/feed.dart:13:8 • unused_import
  hint • This method overrides a method annotated as @mustCallSuper in 'State', but does not invoke the overridden method at lib/feed.dart:29:8 • must_call_super
  hint • This method overrides a method annotated as @mustCallSuper in 'State', but does not invoke the overridden method at lib/feed.dart:40:8 • must_call_super
  hint • The type parameter 'widgetAdapter' is annotated with @required but only named parameters without default value can be annotated with it at lib/loading_list_view.dart:23:5 • invalid_required_param
  hint • Unused import at lib/main.dart:6:8 • unused_import
  hint • The value of the field '_counter' isn't used at lib/main.dart:56:7 • unused_field
  hint • This method overrides a method annotated as @mustCallSuper in 'State', but does not invoke the overridden method at lib/main.dart:63:8 • must_call_super
  hint • This method overrides a method annotated as @mustCallSuper in 'State', but does not invoke the overridden method at lib/main.dart:71:8 • must_call_super
  hint • The method '_incrementCounter' isn't used at lib/main.dart:76:8 • unused_element
  hint • Unused import at lib/post.dart:7:8 • unused_import
  hint • This class inherits from a class marked as @immutable, and therefore should be immutable (all instance fields must be final) at lib/post.dart:10:7 • must_be_immutable
  hint • This class inherits from a class marked as @immutable, and therefore should be immutable (all instance fields must be final) at lib/post.dart:34:7 • must_be_immutable
  hint • The value of the local variable 'plainText' isn't used at lib/post.dart:71:10 • unused_local_variable
  hint • This class inherits from a class marked as @immutable, and therefore should be immutable (all instance fields must be final) at lib/post.dart:112:7 • must_be_immutable
  hint • This class inherits from a class marked as @immutable, and therefore should be immutable (all instance fields must be final) at lib/post.dart:160:7 • must_be_immutable
  hint • This class inherits from a class marked as @immutable, and therefore should be immutable (all instance fields must be final) at lib/profile.dart:10:7 • must_be_immutable
  hint • This method overrides a method annotated as @mustCallSuper in 'State', but does not invoke the overridden method at lib/profile.dart:27:10 • must_call_super
  hint • This class inherits from a class marked as @immutable, and therefore should be immutable (all instance fields must be final) at lib/profile.dart:145:7 • must_be_immutable
  hint • The class '_KudosEarned' isn't used at lib/profile.dart:218:7 • unused_element
  hint • Unused import at lib/send_photo.dart:5:8 • unused_import
  hint • Unused import at lib/usersearch.dart:6:8 • unused_import
  hint • Unused import at lib/usersearch.dart:7:8 • unused_import
  hint • This method overrides a method annotated as @mustCallSuper in 'State', but does not invoke the overridden method at lib/usersearch.dart:25:10 • must_call_super
32 issues found.

Flutter Doctor

[✓] Flutter (on Mac OS X 10.12.6 16G29, locale en-US, channel alpha)
    • Flutter at /Users/matt/code/flutter/flutter
    • Framework revision b156a0f054 (3 weeks ago), 2017-08-11 22:01:40 -0700
    • Engine revision fef7d827d6
    • Tools Dart version 1.25.0-dev.9.0

[✓] Android toolchain - develop for Android devices (Android SDK 25.0.3)
    • Android SDK at /Users/matt/code/android/android
    • Platform android-25, build-tools 25.0.3
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_112-release-b06)

[✓] iOS toolchain - develop for iOS devices (Xcode 8.3.3)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 8.3.3, Build version 8E3004b
    • ios-deploy 1.9.1
    • CocoaPods version 1.3.1

[✓] Android Studio (version 2.3)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Java version OpenJDK Runtime Environment (build 1.8.0_112-release-b06)

[✓] IntelliJ IDEA Ultimate Edition (version 2017.2.2)
    • Flutter plugin version 16.0
    • Dart plugin version 172.3757.55

[✓] Connected devices
    • iPhone 6s • 3DF999CB-1CD6-4649-8187-DDEFBDB14DFA • ios • iOS 10.3 (simulator)

For more information about diagnosing and reporting Flutter bugs, please see https://flutter.io/bug-reports/.

Metadata

Metadata

Assignees

Labels

c: crashStack traces logged to the consolecustomer: crowdAffects or could affect many people, though not necessarily a specific customer.customer: mulligan (g3)f: material designflutter/packages/flutter/material repository.f: scrollingViewports, list views, slivers, etc.frameworkflutter/packages/flutter repository. See also f: labels.waiting 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