Repository navigation
Poor messaging for assert when getting local coordinates of RenderBox: 'package:flutter/src/rendering/box.dart': Failed assertion: line 1342 #7703
Copy link
Copy link
Closed
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work lista: error messageError messages from the Flutter frameworkError messages from the Flutter frameworkc: crashStack traces logged to the consoleStack traces logged to the consoleframeworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.waiting for PR to land (fixed)A fix is in flightA fix is in flight
Milestone
Description
16:28:26.258: I/flutter (13143): ══╡ EXCEPTION CAUGHT BY WIDGETS LIBRARY ╞═══════════════════════════════════════════════════════════
16:28:26.262: I/flutter (13143): The following assertion was thrown building ArmadilloDragTarget<StoryClusterId>(dirty; state:
16:28:26.265: I/flutter (13143): _DragTargetState<StoryClusterId>(564928223)):
16:28:26.267: I/flutter (13143): 'package:flutter/src/rendering/box.dart': Failed assertion: line 1342: 'debugDoingThisResize ||
16:28:26.270: I/flutter (13143): debugDoingThisLayout ||
16:28:26.273: I/flutter (13143): (RenderObject.debugActiveLayout == parent && _size._canBeUsedByParent)': is not
16:28:26.276: I/flutter (13143): true.
16:28:26.278: I/flutter (13143):
16:28:26.281: I/flutter (13143): Either the assertion indicates an error in the framework itself, or we should provide substantially
16:28:26.284: I/flutter (13143): more information in this error message to help you determine and fix the underlying cause.
16:28:26.287: I/flutter (13143): In either case, please report this assertion by filing a bug on GitHub:
16:28:26.289: I/flutter (13143): https://github.com/flutter/flutter/issues/new
16:28:26.292: I/flutter (13143):
16:28:26.294: I/flutter (13143): When the exception was thrown, this was the stack:
16:28:26.297: I/flutter (13143): #2 RenderBox.size.<anonymous closure> (package:flutter/src/rendering/box.dart:1342)
16:28:26.300: I/flutter (13143): #4 RenderBox.size (package:flutter/src/rendering/box.dart:1332)
16:28:26.303: I/flutter (13143): #5 RenderTransform._effectiveTransform (package:flutter/src/rendering/proxy_box.dart:1428)
16:28:26.305: I/flutter (13143): #6 RenderTransform.applyPaintTransform (package:flutter/src/rendering/proxy_box.dart:1469)
16:28:26.308: I/flutter (13143): #7 RenderBox._collectPaintTransform (package:flutter/src/rendering/box.dart:1769)
16:28:26.311: I/flutter (13143): #8 RenderBox.globalToLocal (package:flutter/src/rendering/box.dart:1779)
16:28:26.314: I/flutter (13143): #9 PanelDragTargetsState.build.<anonymous closure>.<anonymous closure> (/usr/local/google/home/anwilson/fuchsia/apps/sysui/armadillo/lib/panel_drag_targets.dart:297)
16:28:26.316: I/flutter (13143): #10 Iterable.forEach (dart:core/iterable.dart:226)
16:28:26.319: I/flutter (13143): #11 PanelDragTargetsState.build.<anonymous closure> (/usr/local/google/home/anwilson/fuchsia/apps/sysui/armadillo/lib/panel_drag_targets.dart:293)
16:28:26.322: I/flutter (13143): #12 _DragTargetState.build (/usr/local/google/home/anwilson/fuchsia/apps/sysui/armadillo/lib/armadillo_drag_target.dart:295)
16:28:26.324: I/flutter (13143): #13 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:2872)
16:28:26.327: I/flutter (13143): #14 BuildableElement.rebuild (package:flutter/src/widgets/framework.dart:2767)
16:28:26.329: I/flutter (13143): #15 StatefulElement.update (package:flutter/src/widgets/framework.dart:3009)
16:28:26.332: I/flutter (13143): #16 Element.updateChild (package:flutter/src/widgets/framework.dart:2050)
16:28:26.335: I/flutter (13143): #17 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:2884)
16:28:26.338: I/flutter (13143): #18 BuildableElement.rebuild (package:flutter/src/widgets/framework.dart:2767)
16:28:26.340: I/flutter (13143): #19 StatefulElement.update (package:flutter/src/widgets/framework.dart:3009)
16:28:26.343: I/flutter (13143): #20 Element.updateChild (package:flutter/src/widgets/framework.dart:2050)
16:28:26.346: I/flutter (13143): #21 _LayoutBuilderElement._layout.<anonymous closure> (package:flutter/src/widgets/layout_builder.dart:120)
16:28:26.348: I/flutter (13143): #22 BuildOwner.buildScope (package:flutter/src/widgets/framework.dart:1731)
16:28:26.351: I/flutter (13143): #23 _LayoutBuilderElement._layout (package:flutter/src/widgets/layout_builder.dart:108)
16:28:26.354: I/flutter (13143): #24 RenderObject.invokeLayoutCallback.<anonymous closure> (package:flutter/src/rendering/object.dart:1833)
16:28:26.357: I/flutter (13143): #25 PipelineOwner._enableMutationsToDirtySubtrees (package:flutter/src/rendering/object.dart:975)
16:28:26.360: I/flutter (13143): #26 RenderObject.invokeLayoutCallback (package:flutter/src/rendering/object.dart:1833)
16:28:26.362: I/flutter (13143): #27 _RenderLayoutBuilder.performLayout (package:flutter/src/widgets/layout_builder.dart:207)
16:28:26.365: I/flutter (13143): #28 RenderObject.layout (package:flutter/src/rendering/object.dart:1735)
16:28:26.368: I/flutter (13143): #29 RenderFlex.performLayout (package:flutter/src/rendering/flex.dart:536)
16:28:26.374: I/flutter (13143): #30 RenderObject._layoutWithoutResize (package:flutter/src/rendering/object.dart:1611)
16:28:26.377: I/flutter (13143): #31 PipelineOwner.flushLayout (package:flutter/src/rendering/object.dart:953)
16:28:26.380: I/flutter (13143): #32 BindingBase&SchedulerBinding&GestureBinding&ServicesBinding&RendererBinding.beginFrame (package:flutter/src/rendering/binding.dart:220)
16:28:26.382: I/flutter (13143): #33 BindingBase&SchedulerBinding&GestureBinding&ServicesBinding&RendererBinding&WidgetsBinding.beginFrame (package:flutter/src/widgets/binding.dart:314)
16:28:26.385: I/flutter (13143): #34 BindingBase&SchedulerBinding&GestureBinding&ServicesBinding&RendererBinding._handlePersistentFrameCallback (package:flutter/src/rendering/binding.dart:165)
16:28:26.388: I/flutter (13143): #35 BindingBase&SchedulerBinding._invokeFrameCallback (package:flutter/src/scheduler/binding.dart:652)
16:28:26.390: I/flutter (13143): #36 BindingBase&SchedulerBinding.handleBeginFrame (package:flutter/src/scheduler/binding.dart:587)
16:28:26.393: I/flutter (13143): #37 _beginFrame (file:///b/build/slave/Linux_Engine/build/src/flutter/lib/ui/hooks.dart:83)
16:28:26.396: I/flutter (13143): (elided 3 frames from class _AssertionError)
16:28:26.398: I/flutter (13143): ════════════════════════════════════════════════════════════════════════════════════════════════════
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work lista: error messageError messages from the Flutter frameworkError messages from the Flutter frameworkc: crashStack traces logged to the consoleStack traces logged to the consoleframeworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.waiting for PR to land (fixed)A fix is in flightA fix is in flight
Activity
[-]Assert indicates to file an issue[/-][+]'package:flutter/src/rendering/box.dart': Failed assertion: line 1342[/+][-]'package:flutter/src/rendering/box.dart': Failed assertion: line 1342[/-][+]Getting local coordinates of RenderBox: 'package:flutter/src/rendering/box.dart': Failed assertion: line 1342[/+]abarth commentedon Jan 27, 2017
PanelDragTargetsState.buildis callingRenderBox.globalToLocalduring its build, which is not legit. The positions of objects haven't been determined yet at the time build is called.apwilson commentedon Jan 27, 2017
Okay. The assert should say as much rather than directing me to file an issue.
apwilson commentedon Jan 27, 2017
ie. "You are attempting to access the size and/or position of a RenderBox during the build phase. You can't do that." full stop
By it saying it's a bug in the framework it makes me put the onus on you to fix rather than me.
[-]Getting local coordinates of RenderBox: 'package:flutter/src/rendering/box.dart': Failed assertion: line 1342[/-][+]Poor messaging for assert when getting local coordinates of RenderBox: 'package:flutter/src/rendering/box.dart': Failed assertion: line 1342[/+]zoechi commentedon Jan 9, 2019
Same exception in #14489
github-actions commentedon Aug 19, 2021
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 -vand a minimal reproduction of the issue.