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

RenderCustomSingleChildLayoutBox intrinsic protocol violation #11082

Closed
BoaNeo opened this issue Jul 4, 2017 · 2 comments
Closed

RenderCustomSingleChildLayoutBox intrinsic protocol violation #11082

BoaNeo opened this issue Jul 4, 2017 · 2 comments
Labels
c: crash Stack traces logged to the console framework flutter/packages/flutter repository. See also f: labels.

Comments

@BoaNeo
Copy link

BoaNeo commented Jul 4, 2017

Steps to Reproduce

Received the below exception after pushing a new Route like this:

    Navigator.of(context).push(new PageRouteBuilder(
      transitionsBuilder: (_, Animation<double> animation, __, Widget child) {
        return new SlideTransition(
          position: new FractionalOffsetTween( begin:new FractionalOffset(1.0, 0.0), end:new FractionalOffset(0.0, 0.0) ).animate(animation),
          child: child,
        );
      },
      pageBuilder: (BuildContext context,_,__) {
        return new Scaffold(
          appBar: new AppBar(title: new Text(widget.snapshot.value["Name"])),
          body: new ListView(
            children: ...
          )
        );
      },
    ));

The error is not consistent, in fact I can't even reproduce it here, but the log dump said to submit a bug report, so here it is :)

Logs

I/flutter (10575): ══╡ EXCEPTION CAUGHT BY RENDERING LIBRARY ╞═════════════════════════════════════════════════════════
I/flutter (10575): The following assertion was thrown during performLayout():
I/flutter (10575): The intrinsic dimension methods of the RenderCustomSingleChildLayoutBox class returned values that
I/flutter (10575): violate the intrinsic protocol contract.
I/flutter (10575): The following failures was detected:
I/flutter (10575):  * getMinIntrinsicWidth(Infinity) returned a larger value (4.0) than getMaxIntrinsicWidth(Infinity)
I/flutter (10575):    (0.0)
I/flutter (10575):  * getMinIntrinsicWidth(360.0) returned a larger value (4.0) than getMaxIntrinsicWidth(360.0) (0.0)
I/flutter (10575): If you are not writing your own RenderBox subclass, then this is not
I/flutter (10575): your fault. Contact support: https://github.com/flutter/flutter/issues/new
I/flutter (10575): When the exception was thrown, this was the stack:
I/flutter (10575): #0      RenderBox.debugAssertDoesMeetConstraints.<anonymous closure> (package:flutter/src/rendering/box.dart:1702:11)
I/flutter (10575): #2      RenderBox.debugAssertDoesMeetConstraints (package:flutter/src/rendering/box.dart:1596:12)
I/flutter (10575): #3      RenderBox.size=.<anonymous closure> (package:flutter/src/rendering/box.dart:1501:17)
I/flutter (10575): #5      RenderBox.size= (package:flutter/src/rendering/box.dart:1501:12)
I/flutter (10575): #6      RenderCustomSingleChildLayoutBox.performLayout (package:flutter/src/rendering/shifted_box.dart:867:5)
I/flutter (10575): #7      RenderObject.layout (package:flutter/src/rendering/object.dart:1841:7)
I/flutter (10575): #8      RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:105:13)
I/flutter (10575): #9      _RenderCustomClip.performLayout (package:flutter/src/rendering/proxy_box.dart:1015:24)
I/flutter (10575): #10     RenderObject.layout (package:flutter/src/rendering/object.dart:1841:7)
I/flutter (10575): #11     RenderPadding.performLayout (package:flutter/src/rendering/shifted_box.dart:160:11)
I/flutter (10575): #12     RenderObject.layout (package:flutter/src/rendering/object.dart:1841:7)
I/flutter (10575): #13     RenderPositionedBox.performLayout (package:flutter/src/rendering/shifted_box.dart:300:13)
I/flutter (10575): #14     RenderObject.layout (package:flutter/src/rendering/object.dart:1841:7)
I/flutter (10575): #15     RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:105:13)
I/flutter (10575): #16     RenderObject.layout (package:flutter/src/rendering/object.dart:1841:7)
I/flutter (10575): #17     RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:105:13)
I/flutter (10575): #18     _RenderCustomClip.performLayout (package:flutter/src/rendering/proxy_box.dart:1015:24)
I/flutter (10575): #19     RenderObject.layout (package:flutter/src/rendering/object.dart:1841:7)
I/flutter (10575): #20     RenderConstrainedBox.performLayout (package:flutter/src/rendering/proxy_box.dart:265:13)
I/flutter (10575): #21     RenderObject.layout (package:flutter/src/rendering/object.dart:1841:7)
I/flutter (10575): #22     MultiChildLayoutDelegate.layoutChild (package:flutter/src/rendering/custom_layout.dart:124:11)
I/flutter (10575): #23     _ScaffoldLayout.performLayout (package:flutter/src/material/scaffold.dart:64:20)
I/flutter (10575): #24     MultiChildLayoutDelegate._callPerformLayout (package:flutter/src/rendering/custom_layout.dart:194:7)
I/flutter (10575): #25     RenderCustomMultiChildLayoutBox.performLayout (package:flutter/src/rendering/custom_layout.dart:338:14)
I/flutter (10575): #26     RenderObject.layout (package:flutter/src/rendering/object.dart:1841:7)
I/flutter (10575): #27     RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:105:13)
I/flutter (10575): #28     RenderObject.layout (package:flutter/src/rendering/object.dart:1841:7)
I/flutter (10575): #29     RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:105:13)
I/flutter (10575): #30     _RenderCustomClip.performLayout (package:flutter/src/rendering/proxy_box.dart:1015:24)
I/flutter (10575): #31     RenderObject.layout (package:flutter/src/rendering/object.dart:1841:7)
I/flutter (10575): #32     RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:105:13)
I/flutter (10575): #33     RenderObject.layout (package:flutter/src/rendering/object.dart:1841:7)
I/flutter (10575): #34     RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:105:13)
I/flutter (10575): #35     RenderObject.layout (package:flutter/src/rendering/object.dart:1841:7)
I/flutter (10575): #36     RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:105:13)
I/flutter (10575): #37     RenderObject.layout (package:flutter/src/rendering/object.dart:1841:7)
I/flutter (10575): #38     RenderOffstage.performLayout (package:flutter/src/rendering/proxy_box.dart:2612:14)
I/flutter (10575): #39     RenderObject.layout (package:flutter/src/rendering/object.dart:1841:7)
I/flutter (10575): #40     RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:105:13)
I/flutter (10575): #41     RenderObject.layout (package:flutter/src/rendering/object.dart:1841:7)
I/flutter (10575): #42     RenderStack.performLayout (package:flutter/src/rendering/stack.dart:433:15)
I/flutter (10575): #43     RenderObject._layoutWithoutResize (package:flutter/src/rendering/object.dart:1718:7)
I/flutter (10575): #44     PipelineOwner.flushLayout (package:flutter/src/rendering/object.dart:1013:18)
I/flutter (10575): #45     BindingBase&SchedulerBinding&GestureBinding&ServicesBinding&RendererBinding.drawFrame (package:flutter/src/rendering/binding.dart:251:19)
I/flutter (10575): #46     BindingBase&SchedulerBinding&GestureBinding&ServicesBinding&RendererBinding&WidgetsBinding.drawFrame (package:flutter/src/widgets/binding.dart:504:22)
I/flutter (10575): #47     BindingBase&SchedulerBinding&GestureBinding&ServicesBinding&RendererBinding._handlePersistentFrameCallback (package:flutter/src/rendering/binding.dart:189:5)
I/flutter (10575): #48     BindingBase&SchedulerBinding._invokeFrameCallback (package:flutter/src/scheduler/binding.dart:688:15)
I/flutter (10575): #49     BindingBase&SchedulerBinding.handleDrawFrame (package:flutter/src/scheduler/binding.dart:636:9)
I/flutter (10575): #50     _drawFrame (file:///b/build/slave/Linux_Engine/build/src/flutter/lib/ui/hooks.dart:70)
I/flutter (10575): (elided 2 frames from class _AssertionError)
I/flutter (10575): The following RenderObject was being processed when the exception was fired:
I/flutter (10575):   RenderCustomSingleChildLayoutBox#987339906 relayoutBoundary=up7 NEEDS-LAYOUT NEEDS-PAINT
I/flutter (10575):   creator: CustomSingleChildLayout ← ClipRect ← Padding ← Align ← DefaultTextStyle ←
I/flutter (10575):   AnimatedDefaultTextStyle ← _InkFeatures-[GlobalKey#519736023 ink renderer] ←
I/flutter (10575):   NotificationListener<LayoutChangedNotification> ← PhysicalModel ← AnimatedPhysicalModel ← Material
I/flutter (10575):   ← AppBar ← ⋯
I/flutter (10575):   parentData: <none> (can use size)
I/flutter (10575):   constraints: BoxConstraints(0.0<=w<=360.0, 0.0<=h<=56.0)
I/flutter (10575):   size: Size(360.0, 56.0)
I/flutter (10575): This RenderObject had the following descendants (showing up to depth 5):
I/flutter (10575):   RenderPadding#803556772 NEEDS-LAYOUT NEEDS-PAINT
I/flutter (10575):     RenderCustomMultiChildLayoutBox#389384904 NEEDS-LAYOUT NEEDS-PAINT
I/flutter (10575):       RenderConstrainedBox#143986731 NEEDS-LAYOUT NEEDS-PAINT
I/flutter (10575):         RenderSemanticsGestureHandler#927607155 NEEDS-LAYOUT NEEDS-PAINT
I/flutter (10575):           RenderPointerListener#965189292 NEEDS-LAYOUT NEEDS-PAINT
I/flutter (10575):       RenderParagraph#572501783 NEEDS-LAYOUT NEEDS-PAINT
I/flutter (10575): ════════════════════════════════════════════════════════════════════════════════════════════════════
I/flutter (10575): Another exception was thrown: The intrinsic dimension methods of the RenderClipRect class returned values that violate the intrinsic protocol contract.
I/flutter (10575): Another exception was thrown: The intrinsic dimension methods of the RenderPadding class returned values that violate the intrinsic protocol contract.
I/flutter (10575): Another exception was thrown: The intrinsic dimension methods of the RenderPositionedBox class returned values that violate the intrinsic protocol contract.
I/flutter (10575): Another exception was thrown: The intrinsic dimension methods of the _RenderInkFeatures class returned values that violate the intrinsic protocol contract.
I/flutter (10575): Another exception was thrown: The intrinsic dimension methods of the RenderPhysicalModel class returned values that violate the intrinsic protocol contract.
I/flutter (10575): Another exception was thrown: The intrinsic dimension methods of the RenderConstrainedBox class returned values that violate the intrinsic protocol contract.
```
@Hixie Hixie added c: crash Stack traces logged to the console framework flutter/packages/flutter repository. See also f: labels. labels Oct 3, 2017
@Hixie Hixie changed the title RenderBox Layout Exception RenderCustomSingleChildLayoutBox intrinsic protocol violation Aug 4, 2018
@Hixie Hixie added the easy fix label Aug 4, 2018
@Hixie Hixie added this to the Goals milestone Aug 4, 2018
@Hixie
Copy link
Contributor

Hixie commented Jul 17, 2019

Probably a duplicate of #19696.

@Hixie Hixie closed this as completed Jul 17, 2019
@github-actions
Copy link

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 Aug 16, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
c: crash Stack traces logged to the console framework flutter/packages/flutter repository. See also f: labels.
Projects
None yet
Development

No branches or pull requests

2 participants