Skip to content

Framework assertion failure with InputDecoration.hideDivider = true when doing hot reload #12261

Closed

Description

@megamattron

Steps to Reproduce

I am trying to hide the underline in a text field by doing something like this:

    commentTextField = new TextField(
      controller: new TextEditingController(),
      maxLines: 10,
      onChanged: _onDetailsChanged,
      decoration: new InputDecoration(
        hintText: "Tell us more...",
        hideDivider: true,
      ),
    );

When doing a hot reload I get the exception listed below in the logs.

NOTE: This only appears to happen when hot reloading.

Logs

Performing hot reload...
I/flutter (20214): Routes init
I/flutter (20214): ══╡ EXCEPTION CAUGHT BY WIDGETS LIBRARY ╞═══════════════════════════════════════════════════════════
I/flutter (20214): The following assertion was thrown building Container(padding: EdgeInsets(0.0, 16.0, 0.0, 1.0),
I/flutter (20214): margin: EdgeInsets(0.0, 0.0, 0.0, 17.0)):
I/flutter (20214): 'package:flutter/src/rendering/object.dart': Failed assertion: line 2145 pos 12: '() {
I/flutter (20214):       final AbstractNode parent = this.parent;
I/flutter (20214):       if (parent is RenderObject)
I/flutter (20214):         return parent._needsCompositing;
I/flutter (20214):       return true;
I/flutter (20214):     }': is not true.
I/flutter (20214): 
I/flutter (20214): Either the assertion indicates an error in the framework itself, or we should provide substantially
I/flutter (20214): more information in this error message to help you determine and fix the underlying cause.
I/flutter (20214): In either case, please report this assertion by filing a bug on GitHub:
I/flutter (20214):   https://github.com/flutter/flutter/issues/new
I/flutter (20214): 
I/flutter (20214): When the exception was thrown, this was the stack:
I/flutter (20214): #2      RenderObject.markNeedsCompositingBitsUpdate (package:flutter/src/rendering/object.dart:2145:12)
I/flutter (20214): #3      RenderObject.attach (package:flutter/src/rendering/object.dart:1585:7)
I/flutter (20214): #4      RenderBox&RenderObjectWithChildMixin.attach (package:flutter/src/rendering/object.dart:2967:17)
I/flutter (20214): #5      AbstractNode.adoptChild (package:flutter/src/rendering/node.dart:128:13)
I/flutter (20214): #6      RenderObject.adoptChild (package:flutter/src/rendering/object.dart:1431:21)
I/flutter (20214): #7      RenderBox&RenderObjectWithChildMixin.child= (package:flutter/src/rendering/object.dart:2962:7)
I/flutter (20214): #8      SingleChildRenderObjectElement.insertChildRenderObject (package:flutter/src/widgets/framework.dart:4553:18)
I/flutter (20214): #9      RenderObjectElement.attachRenderObject (package:flutter/src/widgets/framework.dart:4402:35)
I/flutter (20214): #10     Element.attachRenderObject.<anonymous closure> (package:flutter/src/widgets/framework.dart:2820:13)
I/flutter (20214): #11     ComponentElement.visitChildren (package:flutter/src/widgets/framework.dart:3592:14)
I/flutter (20214): #12     Element.attachRenderObject (package:flutter/src/widgets/framework.dart:2819:5)
I/flutter (20214): #13     Element._activateWithParent (package:flutter/src/widgets/framework.dart:2967:5)
I/flutter (20214): #14     Element.inflateWidget (package:flutter/src/widgets/framework.dart:2892:18)
I/flutter (20214): #15     Element.updateChild (package:flutter/src/widgets/framework.dart:2703:12)
I/flutter (20214): #16     SingleChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:4538:14)
I/flutter (20214): #17     Element.inflateWidget (package:flutter/src/widgets/framework.dart:2900:14)
I/flutter (20214): #18     Element.updateChild (package:flutter/src/widgets/framework.dart:2703:12)
I/flutter (20214): #19     SingleChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:4538:14)
I/flutter (20214): #20     Element.inflateWidget (package:flutter/src/widgets/framework.dart:2900:14)
I/flutter (20214): #21     Element.updateChild (package:flutter/src/widgets/framework.dart:2703:12)
I/flutter (20214): #22     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3568:16)
I/flutter (20214): #23     Element.rebuild (package:flutter/src/widgets/framework.dart:3457:5)
I/flutter (20214): #24     ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3536:5)
I/flutter (20214): #25     ComponentElement.mount (package:flutter/src/widgets/framework.dart:3531:5)
I/flutter (20214): #26     Element.inflateWidget (package:flutter/src/widgets/framework.dart:2900:14)
I/flutter (20214): #27     Element.updateChild (package:flutter/src/widgets/framework.dart:2703:12)
I/flutter (20214): #28     RenderObjectElement.updateChildren (package:flutter/src/widgets/framework.dart:4330:32)
I/flutter (20214): #29     MultiChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:4653:17)
I/flutter (20214): #30     Element.updateChild (package:flutter/src/widgets/framework.dart:2692:15)
I/flutter (20214): #31     SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:4545:14)
I/flutter (20214): #32     Element.updateChild (package:flutter/src/widgets/framework.dart:2692:15)
I/flutter (20214): #33     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3568:16)
I/flutter (20214): #34     Element.rebuild (package:flutter/src/widgets/framework.dart:3457:5)
I/flutter (20214): #35     StatelessElement.update (package:flutter/src/widgets/framework.dart:3618:5)
I/flutter (20214): #36     Element.updateChild (package:flutter/src/widgets/framework.dart:2692:15)
I/flutter (20214): #37     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3568:16)
I/flutter (20214): #38     Element.rebuild (package:flutter/src/widgets/framework.dart:3457:5)
I/flutter (20214): #39     StatefulElement.update (package:flutter/src/widgets/framework.dart:3693:5)
I/flutter (20214): #40     Element.updateChild (package:flutter/src/widgets/framework.dart:2692:15)
I/flutter (20214): #41     SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:4545:14)
I/flutter (20214): #42     Element.updateChild (package:flutter/src/widgets/framework.dart:2692:15)
I/flutter (20214): #43     SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:4545:14)
I/flutter (20214): #44     Element.updateChild (package:flutter/src/widgets/framework.dart:2692:15)
I/flutter (20214): #45     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3568:16)
I/flutter (20214): #46     Element.rebuild (package:flutter/src/widgets/framework.dart:3457:5)
I/flutter (20214): #47     StatefulElement.update (package:flutter/src/widgets/framework.dart:3693:5)
I/flutter (20214): #48     Element.updateChild (package:flutter/src/widgets/framework.dart:2692:15)
I/flutter (20214): #49     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3568:16)
I/flutter (20214): #50     Element.rebuild (package:flutter/src/widgets/framework.dart:3457:5)
I/flutter (20214): #51     StatelessElement.update (package:flutter/src/widgets/framework.dart:3618:5)
I/flutter (20214): #52     Element.updateChild (package:flutter/src/widgets/framework.dart:2692:15)
I/flutter (20214): #53     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3568:16)
I/flutter (20214): #54     Element.rebuild (package:flutter/src/widgets/framework.dart:3457:5)
I/flutter (20214): #55     StatefulElement.update (package:flutter/src/widgets/framework.dart:3693:5)
I/flutter (20214): #56     Element.updateChild (package:flutter/src/widgets/framework.dart:2692:15)
I/flutter (20214): #57     SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:4545:14)
I/flutter (20214): #58     Element.updateChild (package:flutter/src/widgets/framework.dart:2692:15)
I/flutter (20214): #59     SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:4545:14)
I/flutter (20214): #60     Element.updateChild (package:flutter/src/widgets/framework.dart:2692:15)
I/flutter (20214): #61     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3568:16)
I/flutter (20214): #62     Element.rebuild (package:flutter/src/widgets/framework.dart:3457:5)
I/flutter (20214): #63     StatelessElement.update (package:flutter/src/widgets/framework.dart:3618:5)
I/flutter (20214): #64     Element.updateChild (package:flutter/src/widgets/framework.dart:2692:15)
I/flutter (20214): #65     RenderObjectElement.updateChildren (package:flutter/src/widgets/framework.dart:4272:32)
I/flutter (20214): #66     MultiChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:4653:17)
I/flutter (20214): #67     Element.updateChild (package:flutter/src/widgets/framework.dart:2692:15)
I/flutter (20214): #68     SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:4545:14)
I/flutter (20214): #69     Element.updateChild (package:flutter/src/widgets/framework.dart:2692:15)
I/flutter (20214): #70     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3568:16)
I/flutter (20214): #71     Element.rebuild (package:flutter/src/widgets/framework.dart:3457:5)
I/flutter (20214): #72     StatelessElement.update (package:flutter/src/widgets/framework.dart:3618:5)
I/flutter (20214): #73     Element.updateChild (package:flutter/src/widgets/framework.dart:2692:15)
I/flutter (20214): #74     RenderObjectElement.updateChildren (package:flutter/src/widgets/framework.dart:4272:32)
I/flutter (20214): #75     MultiChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:4653:17)
I/flutter (20214): #76     Element.updateChild (package:flutter/src/widgets/framework.dart:2692:15)
I/flutter (20214): #77     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3568:16)
I/flutter (20214): #78     Element.rebuild (package:flutter/src/widgets/framework.dart:3457:5)
I/flutter (20214): #79     BuildOwner.buildScope (package:flutter/src/widgets/framework.dart:2261:33)
I/flutter (20214): #80     BindingBase&SchedulerBinding&GestureBinding&ServicesBinding&RendererBinding&WidgetsBinding.drawFrame (package:flutter/src/widgets/binding.dart:530:20)
I/flutter (20214): #81     BindingBase&SchedulerBinding&GestureBinding&ServicesBinding&RendererBinding._handlePersistentFrameCallback (package:flutter/src/rendering/binding.dart:194:5)
I/flutter (20214): #82     BindingBase&SchedulerBinding._invokeFrameCallback (package:flutter/src/scheduler/binding.dart:713:15)
I/flutter (20214): #83     BindingBase&SchedulerBinding.handleDrawFrame (package:flutter/src/scheduler/binding.dart:649:9)
I/flutter (20214): #84     BindingBase&SchedulerBinding&GestureBinding&ServicesBinding&RendererBinding.scheduleWarmUpFrame.<anonymous closure> (package:flutter/src/rendering/binding.dart:280:20)
I/flutter (20214): #86     _Timer._runTimers (dart:isolate-patch/timer_impl.dart:367)
I/flutter (20214): #87     _Timer._handleMessage (dart:isolate-patch/timer_impl.dart:401)
I/flutter (20214): #88     _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:151)
I/flutter (20214): (elided 3 frames from class _AssertionError and package dart:async-patch)
I/flutter (20214): ════════════════════════════════════════════════════════════════════════════════════════════════════
I/flutter (20214): Another exception was thrown: NoSuchMethodError: The getter 'debugDoingLayout' was called on null.
I/flutter (20214): Another exception was thrown: Tried to paint a RenderObject before its compositing bits were updated.
I/flutter (20214): Page 0 already loaded, skipping.
I/flutter (20214): Another exception was thrown: 'package:flutter/src/rendering/object.dart': Failed assertion: line 2100 pos 12: '!_needsPaint': is not true.
Reloaded 12 of 595 libraries in 1,696ms.
I/flutter (20214): Another exception was thrown: 'package:flutter/src/rendering/object.dart': Failed assertion: line 2100 pos 12: '!_needsPaint': is not true.
Application finished.

Run flutter analyze and attach any output of that command also.

  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:5:8 • implementation_imports
  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:42: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:4:8 • unused_import
  hint • Unused import at lib/main.dart:8:8 • unused_import
  hint • Unused import at lib/main.dart:10:8 • unused_import
  hint • This method overrides a method annotated as @mustCallSuper in 'State', but does not invoke the overridden method at lib/main.dart:121:8 • must_call_super
  hint • The method '_onBadgeSelected' isn't used at lib/main.dart:242:8 • unused_element
  hint • The method '_compressImage' isn't used at lib/misc/utils.dart:38:17 • unused_element
  hint • The method '_dCompressImage' isn't used at lib/misc/utils.dart:58:17 • unused_element
  hint • Unused import at lib/post.dart:10: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:13:7 • must_be_immutable
  hint • This method overrides a method annotated as @mustCallSuper in 'State', but does not invoke the overridden method at lib/post.dart:40: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/post.dart:76:7 • must_be_immutable
  hint • The value of the local variable 'plainText' isn't used at lib/post.dart:113: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:155: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:203: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:144:7 • must_be_immutable
  hint • The class '_KudosEarned' isn't used at lib/profile.dart:217:7 • unused_element
  hint • Unused import at lib/usersearch.dart:7:8 • unused_import
  hint • Unused import at lib/usersearch.dart:8: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/usersearch.dart:15:7 • must_be_immutable
  hint • This method overrides a method annotated as @mustCallSuper in 'State', but does not invoke the overridden method at lib/usersearch.dart:33:8 • 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/widget/badgelist.dart:9: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/widget/badgelist.dart:56: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/widget/kudodetail.dart:17:7 • must_be_immutable
  hint • The member 'setState' can only be used within instance members of subclasses of 'State' at lib/widget/kudodetail.dart:27:11 • invalid_use_of_protected_member
  hint • The value of the local variable 'cameraButton' isn't used at lib/widget/kudodetail.dart:100:16 • unused_local_variable
  hint • Unused import at lib/widget/login.dart:9: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/widget/login.dart:15:7 • must_be_immutable
  hint • The method '_notEmptyValidator' isn't used at lib/widget/login.dart:119:10 • unused_element
  hint • This method overrides a method annotated as @mustCallSuper in 'State', but does not invoke the overridden method at lib/widget/sendkudoflow.dart:37:8 • must_call_super
43 issues found.

Flutter Doctor

Paste the output of running flutter doctor here.

[✓] Flutter (on Mac OS X 10.12.6 16G29, locale en-US, channel alpha)
    • Flutter at /Users/matt/code/flutter/flutter
    • Framework revision 701d534ba9 (2 weeks ago), 2017-09-12 14:01:51 -0700
    • Engine revision 31d03de019
    • Tools Dart version 1.25.0-dev.11.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 9.0)
    • Xcode at /Applications/Xcode-beta9.app/Contents/Developer
    • Xcode 9.0, Build version 9A235
    • ios-deploy 1.9.1
    ✗ ios-deploy out of date (1.9.2 is required). To upgrade:
        brew upgrade ios-deploy
    • 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.3)
    • Flutter plugin version 17.0
    • Dart plugin version 172.3968.27

[✓] Connected devices
    • Pixel • FA6A10319557 • android-arm • Android 7.1.2 (API 25)

Activity

  1. added
    c: crashStack traces logged to the console
    frameworkflutter/packages/flutter repository. See also f: labels.
    on Oct 3, 2017
  2. hemanthrajv commented on Jan 16, 2018

    @hemanthrajv

    I suppose you use master branch. If so, then notice that the hideDivider property has been replaced by border: null. You can check for the changes made here

  3. zoechi commented on Dec 10, 2018

    @zoechi
    Contributor

    Duplicate of #24029 (has most activity and information)

  4. added a commit that references this issue on Sep 13, 2019
  5. added a commit that references this issue on Sep 30, 2019
  6. github-actions commented on Sep 1, 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.

  7. locked as resolved and limited conversation to collaborators on Sep 1, 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

    c: crashStack traces logged to the consoleframeworkflutter/packages/flutter repository. See also f: labels.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions