You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The FindMenuWidget throws an error _needsLayout due to the presence of IconButtons with tooltips in a Row. Similarly, a Tooltip Widget in a Row throws the same error. While an IconButton without a tooltip in a Row does not throw the error.
======== Exception caught by scheduler library =====================================================
The following assertion was thrown during a scheduler callback:
Updated layout information required for RenderPhysicalShape#ada39 relayoutBoundary=up1 NEEDS-LAYOUT NEEDS-PAINT to calculate semantics.
'package:flutter/src/rendering/object.dart':
Failed assertion: line 3567 pos 12: '!_needsLayout'
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?template=2_bug.yml
When the exception was thrown, this was the stack:
#2 RenderObject._getSemanticsForParent (package:flutter/src/rendering/object.dart:3567:12)
#3 RenderObject._getSemanticsForParent.<anonymous closure> (package:flutter/src/rendering/object.dart:3583:61)
#4 _RenderTheater.visitChildrenForSemantics (package:flutter/src/widgets/overlay.dart:1151:14)
#5 RenderObject._getSemanticsForParent (package:flutter/src/rendering/object.dart:3581:5)
#6 RenderObject._getSemanticsForParent.<anonymous closure> (package:flutter/src/rendering/object.dart:3583:61)
#7 RenderObjectWithChildMixin.visitChildren (package:flutter/src/rendering/object.dart:4000:14)
#8 RenderObject.visitChildrenForSemantics (package:flutter/src/rendering/object.dart:3724:5)
#9 RenderAbsorbPointer.visitChildrenForSemantics (package:flutter/src/rendering/proxy_box.dart:3864:11)
#10 RenderObject._getSemanticsForParent (package:flutter/src/rendering/object.dart:3581:5)
#11 RenderObject._getSemanticsForParent.<anonymous closure> (package:flutter/src/rendering/object.dart:3583:61)
#12 RenderObjectWithChildMixin.visitChildren (package:flutter/src/rendering/object.dart:4000:14)
#13 RenderObject.visitChildrenForSemantics (package:flutter/src/rendering/object.dart:3724:5)
#14 RenderObject._getSemanticsForParent (package:flutter/src/rendering/object.dart:3581:5)
#15 RenderObject._getSemanticsForParent.<anonymous closure> (package:flutter/src/rendering/object.dart:3583:61)
#16 RenderObjectWithChildMixin.visitChildren (package:flutter/src/rendering/object.dart:4000:14)
#17 RenderObject.visitChildrenForSemantics (package:flutter/src/rendering/object.dart:3724:5)
#18 RenderSemanticsAnnotations.visitChildrenForSemantics (package:flutter/src/rendering/proxy_box.dart:4284:11)
#19 RenderObject._getSemanticsForParent (package:flutter/src/rendering/object.dart:3581:5)
#20 RenderObject._getSemanticsForParent.<anonymous closure> (package:flutter/src/rendering/object.dart:3583:61)
#21 RenderObjectWithChildMixin.visitChildren (package:flutter/src/rendering/object.dart:4000:14)
#22 RenderObject.visitChildrenForSemantics (package:flutter/src/rendering/object.dart:3724:5)
#23 RenderSemanticsAnnotations.visitChildrenForSemantics (package:flutter/src/rendering/proxy_box.dart:4284:11)
#24 RenderObject._getSemanticsForParent (package:flutter/src/rendering/object.dart:3581:5)
#25 RenderObject._getSemanticsForParent.<anonymous closure> (package:flutter/src/rendering/object.dart:3583:61)
#26 RenderObjectWithChildMixin.visitChildren (package:flutter/src/rendering/object.dart:4000:14)
#27 RenderObject.visitChildrenForSemantics (package:flutter/src/rendering/object.dart:3724:5)
#28 RenderSemanticsAnnotations.visitChildrenForSemantics (package:flutter/src/rendering/proxy_box.dart:4284:11)
#29 RenderObject._getSemanticsForParent (package:flutter/src/rendering/object.dart:3581:5)
#30 RenderObject._getSemanticsForParent.<anonymous closure> (package:flutter/src/rendering/object.dart:3583:61)
#31 RenderObjectWithChildMixin.visitChildren (package:flutter/src/rendering/object.dart:4000:14)
#32 RenderObject.visitChildrenForSemantics (package:flutter/src/rendering/object.dart:3724:5)
#33 RenderObject._getSemanticsForParent (package:flutter/src/rendering/object.dart:3581:5)
#34 RenderObject._getSemanticsForParent.<anonymous closure> (package:flutter/src/rendering/object.dart:3583:61)
#35 RenderObjectWithChildMixin.visitChildren (package:flutter/src/rendering/object.dart:4000:14)
#36 RenderObject.visitChildrenForSemantics (package:flutter/src/rendering/object.dart:3724:5)
#37 RenderSemanticsAnnotations.visitChildrenForSemantics (package:flutter/src/rendering/proxy_box.dart:4284:11)
#38 RenderObject._getSemanticsForParent (package:flutter/src/rendering/object.dart:3581:5)
#39 RenderObject._getSemanticsForParent.<anonymous closure> (package:flutter/src/rendering/object.dart:3583:61)
#40 RenderObjectWithChildMixin.visitChildren (package:flutter/src/rendering/object.dart:4000:14)
#41 RenderObject.visitChildrenForSemantics (package:flutter/src/rendering/object.dart:3724:5)
#42 RenderSemanticsAnnotations.visitChildrenForSemantics (package:flutter/src/rendering/proxy_box.dart:4284:11)
#43 RenderObject._getSemanticsForParent (package:flutter/src/rendering/object.dart:3581:5)
#44 RenderObject._getSemanticsForParent.<anonymous closure> (package:flutter/src/rendering/object.dart:3583:61)
#45 RenderObjectWithChildMixin.visitChildren (package:flutter/src/rendering/object.dart:4000:14)
#46 RenderObject.visitChildrenForSemantics (package:flutter/src/rendering/object.dart:3724:5)
#47 RenderSemanticsAnnotations.visitChildrenForSemantics (package:flutter/src/rendering/proxy_box.dart:4284:11)
#48 RenderObject._getSemanticsForParent (package:flutter/src/rendering/object.dart:3581:5)
#49 RenderObject._getSemanticsForParent.<anonymous closure> (package:flutter/src/rendering/object.dart:3583:61)
#50 RenderObjectWithChildMixin.visitChildren (package:flutter/src/rendering/object.dart:4000:14)
#51 RenderObject.visitChildrenForSemantics (package:flutter/src/rendering/object.dart:3724:5)
#52 RenderObject._getSemanticsForParent (package:flutter/src/rendering/object.dart:3581:5)
#53 RenderObject._updateSemantics (package:flutter/src/rendering/object.dart:3533:41)
#54 PipelineOwner.flushSemantics (package:flutter/src/rendering/object.dart:1265:16)
#55 RendererBinding.drawFrame (package:flutter/src/rendering/binding.dart:499:21)
#56 WidgetsBinding.drawFrame (package:flutter/src/widgets/binding.dart:918:13)
#57 RendererBinding._handlePersistentFrameCallback (package:flutter/src/rendering/binding.dart:360:5)
#58 SchedulerBinding._invokeFrameCallback (package:flutter/src/scheduler/binding.dart:1297:15)
#59 SchedulerBinding.handleDrawFrame (package:flutter/src/scheduler/binding.dart:1227:9)
#60 SchedulerBinding._handleDrawFrame (package:flutter/src/scheduler/binding.dart:1085:5)
#61 _invoke (dart:ui/hooks.dart:170:13)
#62 PlatformDispatcher._drawFrame (dart:ui/platform_dispatcher.dart:401:5)
#63 _drawFrame (dart:ui/hooks.dart:140:31)
(elided 2 frames from class _AssertionError)
====================================================================================================
======== Exception caught by gestures library ======================================================
The following assertion was thrown while handling a pointer data packet:
Cannot hit test a render box that has never been laid out.
The hitTest() method was called on this RenderBox: _RenderDeferredLayoutBox#ac860 NEEDS-LAYOUT NEEDS-PAINT
... parentData: not positioned; offset=Offset(0.0, 0.0)
... constraints: MISSING
... size: MISSING
Unfortunately, this object's geometry is not known at this time, probably because it has never been laid out. This means it cannot be accurately hit-tested.
If you are trying to perform a hit test during the layout phase itself, make sure you only hit test nodes that have completed layout (e.g. the node's children, after their layout() method has been called).
When the exception was thrown, this was the stack:
#0 RenderBox.hitTest.<anonymous closure> (package:flutter/src/rendering/box.dart:2442:11)
#1 RenderBox.hitTest (package:flutter/src/rendering/box.dart:2473:6)
#2 _RenderTheaterMixin.hitTestChildren.childHitTest (package:flutter/src/widgets/overlay.dart:856:81)
#3 BoxHitTestResult.addWithPaintOffset (package:flutter/src/rendering/box.dart:800:31)
#4 _RenderTheaterMixin.hitTestChildren (package:flutter/src/widgets/overlay.dart:857:22)
#5 RenderBox.hitTest (package:flutter/src/rendering/box.dart:2475:11)
#6 RenderProxyBoxMixin.hitTestChildren (package:flutter/src/rendering/proxy_box.dart:117:19)
#7 RenderBox.hitTest (package:flutter/src/rendering/box.dart:2475:11)
#8 RenderAbsorbPointer.hitTest (package:flutter/src/rendering/proxy_box.dart:3856:17)
#9 RenderProxyBoxMixin.hitTestChildren (package:flutter/src/rendering/proxy_box.dart:117:19)
#10 RenderProxyBoxWithHitTestBehavior.hitTest (package:flutter/src/rendering/proxy_box.dart:172:19)
#11 RenderProxyBoxMixin.hitTestChildren (package:flutter/src/rendering/proxy_box.dart:117:19)
#12 RenderBox.hitTest (package:flutter/src/rendering/box.dart:2475:11)
#13 RenderProxyBoxMixin.hitTestChildren (package:flutter/src/rendering/proxy_box.dart:117:19)
#14 RenderBox.hitTest (package:flutter/src/rendering/box.dart:2475:11)
#15 RenderProxyBoxMixin.hitTestChildren (package:flutter/src/rendering/proxy_box.dart:117:19)
#16 RenderBox.hitTest (package:flutter/src/rendering/box.dart:2475:11)
#17 RenderProxyBoxMixin.hitTestChildren (package:flutter/src/rendering/proxy_box.dart:117:19)
#18 RenderTapRegionSurface.hitTest (package:flutter/src/widgets/tap_region.dart:213:28)
#19 RenderProxyBoxMixin.hitTestChildren (package:flutter/src/rendering/proxy_box.dart:117:19)
#20 RenderBox.hitTest (package:flutter/src/rendering/box.dart:2475:11)
#21 RenderProxyBoxMixin.hitTestChildren (package:flutter/src/rendering/proxy_box.dart:117:19)
#22 RenderBox.hitTest (package:flutter/src/rendering/box.dart:2475:11)
#23 RenderProxyBoxMixin.hitTestChildren (package:flutter/src/rendering/proxy_box.dart:117:19)
#24 RenderBox.hitTest (package:flutter/src/rendering/box.dart:2475:11)
#25 RenderView.hitTest (package:flutter/src/rendering/view.dart:194:14)
#26 RendererBinding.hitTestInView (package:flutter/src/rendering/binding.dart:534:16)
#27 GestureBinding._handlePointerEventImmediately (package:flutter/src/gestures/binding.dart:384:7)
#28 GestureBinding.handlePointerEvent (package:flutter/src/gestures/binding.dart:376:5)
#29 GestureBinding._flushPointerEventQueue (package:flutter/src/gestures/binding.dart:323:7)
#30 GestureBinding._handlePointerDataPacket (package:flutter/src/gestures/binding.dart:292:9)
#31 _invoke1 (dart:ui/hooks.dart:186:13)
#32 PlatformDispatcher._dispatchPointerDataPacket (dart:ui/platform_dispatcher.dart:424:7)
#33 _dispatchPointerDataPacket (dart:ui/hooks.dart:119:31)
====================================================================================================
Screen-record
2023-09-15.08-32-28.webm
The text was updated successfully, but these errors were encountered:
I will choose fix-1. Although fix-2 is more simple, the hard-coded height and width will bring troubles in the future, we will have to manually update them (for example, we may add more IconButtons for case sensitive or regex).
Another reason is that fix-2 throws a RenderFlex overflowed error. Increasing the width and height to 96 * 392 can fix it. While this will create a lot of space on the right and bottom of the FindMenuWidget, which looks very ugly.
On the contrary, the UI display effect of fix-1 is as same as the current main branch.
Bug Description
The
FindMenuWidget
throws an error_needsLayout
due to the presence ofIconButton
s withtooltip
s in aRow
. Similarly, aTooltip
Widget in aRow
throws the same error. While anIconButton
without atooltip
in aRow
does not throw the error.Both wrapping each
IconButton
in aSizedBox
and wrapping the wholeFindMenuWidget
in aSizedBox
could fix the issue.Operating System
Fedora Linux 38 (Workstation Edition) x86_64
AppFlowy Editor Version(s)
main, newest
Log
Screen-record
2023-09-15.08-32-28.webm
The text was updated successfully, but these errors were encountered: