flutter / flutter

Flutter makes it easy and fast to build beautiful apps for mobile and beyond
https://flutter.dev
BSD 3-Clause "New" or "Revised" License
166.33k stars 27.53k forks source link

Failed assertion: 'tileWidth != leadingSize.width' when running Flutter as a module only #70179

Closed Wouter12 closed 7 months ago

Wouter12 commented 4 years ago

I have a flutter module added to my native android project. Everything works ok, but when i go back to my android app, and reopen the flutteractivity (with reuse of the flutter engine) I get this exception (I show a listview with some items).

══╡ EXCEPTION CAUGHT BY RENDERING LIBRARY ╞═════════════════════════════════════ The following assertion was thrown during performLayout(): Leading widget consumes entire tile width. Please use a sized widget, or consider replacing ListTile with a custom widget (see https://api.flutter.dev/flutter/material/ListTile-class.html#material.ListTile.4) 'package:flutter/src/material/list_tile.dart': Failed assertion: line 1457 pos 7: 'tileWidth != leadingSize.width'

What I think the issue is, is what the note explains in this link: add flutter screen. Upon debugging i found that the tileWidth and leadingSize.width are both 0

Steps to reproduce: 1) add flutter module to android app 2) use prewarmed engine (I have overridden FlutterActivity#provideFlutterEngine, where I checked if there was an instance of the engine in the FlutterEngineCache, if not create a new Engine and store it in the FlutterEngineCache 3) show a ListView with ListTiles 4) go back to the native android app 5) restart the FlutterActivity 6) Exception gets thrown in the flutter log

pedromassangocode commented 4 years ago

Hi @Wouter12 Can you please provide your flutter doctor -v, your flutter run --verbose and a minimal complete reproducible code sample? Thank you

Wouter12 commented 4 years ago
flutter doctor
> [√] Flutter (Channel stable, 1.20.4, on Microsoft Windows [Version 10.0.19041.572], locale nl-BE) > • Flutter version 1.20.4 at C:\flutter > • Framework revision fba99f6cf9 (8 weeks ago), 2020-09-14 15:32:52 -0700 > • Engine revision d1bc06f032 > • Dart version 2.9.2 > > [!] Android toolchain - develop for Android devices (Android SDK version 30.0.2) > • Android SDK at C:\Android\SDK > • Platform android-30, build-tools 30.0.2 > • ANDROID_SDK_ROOT = C:\Android\SDK > • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java > • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01) > ! Some Android licenses not accepted. To resolve this, run: flutter doctor --android-licenses > > [√] Android Studio (version 4.0) > • Android Studio at C:\Program Files\Android\Android Studio > • Flutter plugin version 49.0.2 > • Dart plugin version 193.7547 > • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01) > > [√] VS Code (version 1.51.0) > • VS Code at C:\Users\woute\AppData\Local\Programs\Microsoft VS Code > • Flutter extension version 3.15.0 > > [√] Connected device (1 available) > • Mi 9T (mobile) • 972631c0 • android-arm64 • Android 10 (API 29) > > ! Doctor found issues in 1 category.

application.zip

application output
``` 11/10 17:06:08: Launching 'app' on Xiaomi Mi 9T. $ adb shell am start -n "com.example.myapplication/com.example.myapplication.MainActivity" -a android.intent.action.MAIN -c android.intent.category.LAUNCHER -D Waiting for application to come online: com.example.myapplication | com.example.myapplication.test Waiting for application to come online: com.example.myapplication | com.example.myapplication.test Connected to process 8665 on device 'xiaomi-mi_9t-972631c0'. Connecting to com.example.myapplication Connected to the target VM, address: 'localhost:8600', transport: 'socket' Capturing and displaying logcat messages from application. This behavior can be disabled in the "Logcat output" section of the "Debugger" settings page. I/e.myapplicatio: Late-enabling -Xcheck:jni E/e.myapplicatio: Unknown bits set in runtime_flags: 0x8000 W/ActivityThread: Application com.example.myapplication is waiting for the debugger on port 8100... I/System.out: Sending WAIT chunk I/System.out: Debugger has connected waiting for debugger to settle... I/System.out: waiting for debugger to settle... I/System.out: waiting for debugger to settle... I/System.out: waiting for debugger to settle... I/System.out: waiting for debugger to settle... I/System.out: waiting for debugger to settle... I/System.out: waiting for debugger to settle... I/System.out: debugger has settled (1317) I/Perf: Connecting to perf service. I/FeatureParser: can't find davinci.xml in assets/device_features/,it may be in /system/etc/device_features W/e.myapplication: type=1400 audit(0.0:466182): avc: denied { read } for name="u:object_r:vendor_displayfeature_prop:s0" dev="tmpfs" ino=25946 scontext=u:r:untrusted_app:s0:c184,c257,c512,c768 tcontext=u:object_r:vendor_displayfeature_prop:s0 tclass=file permissive=0 E/libc: Access denied finding property "ro.vendor.df.effect.conflict" E/Perf: Fail to get file list com.example.myapplication getFolderSize() : Exception_1 = java.lang.NullPointerException: Attempt to get length of null array E/Perf: Fail to get file list com.example.myapplication getFolderSize() : Exception_1 = java.lang.NullPointerException: Attempt to get length of null array W/Looper: Slow Looper main: Long Msg: seq=2 plan=17:06:09.526 late=19ms wall=2812ms running=500ms runnable=11ms h=android.app.ActivityThread$H w=110 D/ForceDarkHelper: updateByCheckExcludeList: pkg: com.example.myapplication activity: com.example.myapplication.MainActivity@d9d2e0b D/ForceDarkHelper: updateByCheckExcludeList: pkg: com.example.myapplication activity: com.example.myapplication.MainActivity@d9d2e0b W/e.myapplicatio: Accessing hidden method Landroid/view/View;->computeFitSystemWindows(Landroid/graphics/Rect;Landroid/graphics/Rect;)Z (greylist, reflection, allowed) Accessing hidden method Landroid/view/ViewGroup;->makeOptionalFitsSystemWindows()V (greylist, reflection, allowed) D/ForceDarkHelper: updateByCheckExcludeList: pkg: com.example.myapplication activity: com.example.myapplication.MainActivity@d9d2e0b D/ForceDarkHelper: updateByCheckExcludeList: pkg: com.example.myapplication activity: com.example.myapplication.MainActivity@d9d2e0b I/System.out: should load native is true D/NetworkSecurityConfig: No Network Security Config specified, using platform default I/ResourceExtractor: Found extracted resources res_timestamp-1-1605024307976 Resource version mismatch res_timestamp-1-1605024368628 I/ResourceExtractor: Extracted baseline resource assets/flutter_assets/kernel_blob.bin I/ResourceExtractor: Extracted baseline resource assets/flutter_assets/vm_snapshot_data I/ResourceExtractor: Extracted baseline resource assets/flutter_assets/isolate_snapshot_data I/AdrenoGLES: QUALCOMM build : b7a53ba, I65c4755304 Build Date : 09/11/19 OpenGL ES Shader Compiler Version: EV031.27.05.01 Local Branch : mybranche9d496a3-67c3-f1d6-9f04-1458d0b52ae8 Remote Branch : quic/gfx-adreno.lnx.1.0.r84-rel Remote Branch : NONE Reconstruct Branch : NOTHING Build Config : S P 8.0.11 AArch64 W/e.myapplication: type=1400 audit(0.0:466184): avc: denied { search } for name="kgsl" dev="sysfs" ino=46510 scontext=u:r:untrusted_app:s0:c184,c257,c512,c768 tcontext=u:object_r:sysfs_kgsl:s0 tclass=dir permissive=0 I/AdrenoGLES: PFP: 0x016ee187, ME: 0x00000000 W/AdrenoUtils: : Failed to open /sys/class/kgsl/kgsl-3d0/gpu_model : Failed to read chip ID from gpu_model. Fallback to use the GSL path W/Activity: Slow Operation: Activity com.example.myapplication/.MainActivity onCreate took 771ms W/Looper: Slow Looper main: Long Msg: seq=3 plan=17:06:09.534 late=2832ms wall=1031ms running=536ms runnable=33ms h=android.app.ActivityThread$H w=159 W/Looper: Slow Looper main: Activity com.example.myapplication/.MainActivity is 2832ms late (wall=1031ms running=536ms ClientTransaction{ callbacks=[android.app.servertransaction.LaunchActivityItem] lifecycleRequest=android.app.servertransaction.ResumeActivityItem }) because of 2 msg, msg 2 took 2812ms (seq=2 running=500ms runnable=11ms late=19ms h=android.app.ActivityThread$H w=110) W/Looper: Slow Looper main: Activity com.example.myapplication/.MainActivity is 3871ms late (wall=1ms running=0ms ClientTransaction{ callbacks=[android.app.servertransaction.TopResumedActivityChangeItem] }) because of 3 msg, msg 2 took 2812ms (seq=2 running=500ms runnable=11ms late=19ms h=android.app.ActivityThread$H w=110), msg 3 took 1031ms (seq=3 running=536ms runnable=33ms late=2832ms h=android.app.ActivityThread$H w=159) I/flutter: Observatory listening on http://127.0.0.1:40277/TBeQ6abolD8=/ W/Gralloc3: mapper 3.x is not supported E/LB: fail to open file: No such file or directory W/Looper: Slow Looper main: doFrame is 408ms late because of 3 msg, msg 1 took 378ms (seq=12 running=202ms runnable=39ms late=36ms h=android.view.Choreographer$FrameHandler c=android.view.Choreographer$FrameDisplayEventReceiver), msg 3 took 53ms (seq=14 running=41ms runnable=8ms late=377ms h=android.view.ViewRootImpl$ViewRootHandler c=androidx.appcompat.app.AppCompatDelegateImpl$2) I/Timeline: Timeline: Activity_launch_request time:478579775 W/ActivityThread: handleWindowVisibility: no activity for token android.os.BinderProxy@ce936ee D/ForceDarkHelper: updateByCheckExcludeList: pkg: com.example.myapplication activity: io.flutter.embedding.android.FlutterActivity@92aca1c W/e.myapplicatio: Accessing hidden method Landroid/view/WindowInsets;->getInsets(I)Landroid/graphics/Insets; (blacklist, linking, denied) I/chatty: uid=10440(com.example.myapplication) identical 1 line W/e.myapplicatio: Accessing hidden method Landroid/view/WindowInsets;->getInsets(I)Landroid/graphics/Insets; (blacklist, linking, denied) D/ForceDarkHelper: updateByCheckExcludeList: pkg: com.example.myapplication activity: io.flutter.embedding.android.FlutterActivity@92aca1c D/ForceDarkHelper: updateByCheckExcludeList: pkg: com.example.myapplication activity: io.flutter.embedding.android.FlutterActivity@92aca1c W/e.myapplicatio: Accessing hidden method Landroid/view/accessibility/AccessibilityNodeInfo;->getSourceNodeId()J (greylist, reflection, allowed) W/e.myapplicatio: Accessing hidden method Landroid/view/accessibility/AccessibilityRecord;->getSourceNodeId()J (greylist, reflection, allowed) Accessing hidden field Landroid/view/accessibility/AccessibilityNodeInfo;->mChildNodeIds:Landroid/util/LongArray; (greylist, reflection, allowed) W/e.myapplicatio: Accessing hidden method Landroid/util/LongArray;->get(I)J (greylist, reflection, allowed) D/ForceDarkHelper: updateByCheckExcludeList: pkg: com.example.myapplication activity: io.flutter.embedding.android.FlutterActivity@92aca1c D/ForceDarkHelper: updateByCheckExcludeList: pkg: com.example.myapplication activity: io.flutter.embedding.android.FlutterActivity@92aca1c W/Looper: Slow Looper main: Activity com.example.myapplication/io.flutter.embedding.android.FlutterActivity is 303ms late (wall=2ms running=0ms ClientTransaction{ callbacks=[android.app.servertransaction.TopResumedActivityChangeItem] }) because of 2 msg, msg 2 took 291ms (seq=36 running=229ms runnable=30ms io=1ms late=14ms h=android.app.ActivityThread$H w=159) D/SurfaceView: UPDATE null, mIsCastMode = false I/flutter: ══╡ EXCEPTION CAUGHT BY RENDERING LIBRARY ╞═════════════════════════════════════════════════════════ The following assertion was thrown during performLayout(): Leading widget consumes entire tile width. Please use a sized widget, or consider replacing ListTile with a custom widget (see https://api.flutter.dev/flutter/material/ListTile-class.html#material.ListTile.4) 'package:flutter/src/material/list_tile.dart': Failed assertion: line 1572 pos 7: 'tileWidth != leadingSize.width' 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=BUG.md The relevant error-causing widget was: ListTile file:///C:/Users/woute/AndroidStudioProjects/flutter_module/lib/main.dart:27:28 When the exception was thrown, this was the stack: #2 _RenderListTile.performLayout (package:flutter/src/material/list_tile.dart:1572:7) #3 RenderObject.layout (package:flutter/src/rendering/object.dart:1777:7) #4 RenderPadding.performLayout (package:flutter/src/rendering/shifted_box.dart:207:12) #5 RenderObject.layout (package:flutter/src/rendering/object.dart:1777:7) #6 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:111:14) #7 RenderObject.layout (package:flutter/src/rendering/object.dart:1777:7) #8 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:111:14) #9 RenderObject.layout (package:flutter/src/rendering/object.dart:1777:7) #10 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:111:14) #11 RenderObject.layout (package:flutter/src/rendering/object.dart:1777:7) #12 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:111:14) #13 RenderObject.layout (package:flutter/src/rendering/object.dart:1777:7) #14 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:111:14) #15 RenderObject.layout (package:flutter/src/rendering/object.dart:1777:7) #16 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:111:14) #17 RenderObject.layout (package:flutter/src/rendering/object.dart:1777:7) #18 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:111:14) #19 RenderObject.layout (package:flutter/src/rendering/object.dart:1777:7) #20 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:111:14) #21 RenderObject.layout (package:flutter/src/rendering/object.dart:1777:7) I/flutter: #22 RenderSliverList.performLayout (package:flutter/src/rendering/sliver_list.dart:213:28) #23 RenderObject.layout (package:flutter/src/rendering/object.dart:1777:7) #24 RenderSliverEdgeInsetsPadding.performLayout (package:flutter/src/rendering/sliver_padding.dart:132:12) #25 RenderSliverPadding.performLayout (package:flutter/src/rendering/sliver_padding.dart:371:11) #26 RenderObject.layout (package:flutter/src/rendering/object.dart:1777:7) #27 RenderViewportBase.layoutChildSequence (package:flutter/src/rendering/viewport.dart:507:13) #28 RenderViewport._attemptLayout (package:flutter/src/rendering/viewport.dart:1561:12) #29 RenderViewport.performLayout (package:flutter/src/rendering/viewport.dart:1470:20) #30 RenderObject.layout (package:flutter/src/rendering/object.dart:1777:7) #31 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:111:14) #32 RenderObject.layout (package:flutter/src/rendering/object.dart:1777:7) #33 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:111:14) #34 RenderObject.layout (package:flutter/src/rendering/object.dart:1777:7) #35 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:111:14) #36 RenderObject.layout (package:flutter/src/rendering/object.dart:1777:7) #37 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:111:14) #38 RenderObject.layout (package:flutter/src/rendering/object.dart:1777:7) #39 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:111:14) #40 RenderObject.layout (package:flutter/src/rendering/object.dart:1777:7) #41 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:111:14) #42 RenderObject.layout (package:flutter/src/rendering/object.dart:1777:7) #43 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:111:14) #44 RenderObject.layout (package:flutter/src/rendering/object.dart:1777:7) #45 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:111:14) #46 RenderObject.layout (package:flutter/src/rendering/object.dart:1777:7) #47 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:111:14) #48 RenderObject.layout (package:flutter/src/rendering/object.dart:1777:7) #49 MultiChildLayoutDelegate.layoutChild (package:flutter/src/rendering/custom_layout.dart:171:12) #50 _ScaffoldLayout.performLayout (package:flutter/src/material/scaffold.dart:498:7) #51 MultiChildLayoutDelegate._callPerformLayout (package:flutter/src/rendering/custom_layout.dart:243:7) #52 RenderCustomMultiChildLayoutBox.performLayout (package:flutter/src/rendering/custom_layout.dart:402:14) #53 RenderObject.layout (package:flutter/src/rendering/object.dart:1777:7) #54 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:111:14) #55 RenderObject.layout (package:flutter/src/rendering/object.dart:1777:7) #56 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:111:14) #57 _RenderCustomClip.performLayout (package:flutter/src/rendering/proxy_box.dart:1306:11) #58 RenderObject.layout (package:flutter/src/rendering/object.dart:1777:7) #59 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:111:14) #60 RenderObject.layout (package:flutter/src/rendering/object.dart:1777:7) #61 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:111:14) #62 RenderObject.layout (package:flutter/src/rendering/object.dart:1777:7) #63 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:111:14) #64 RenderObject.layout (package:flutter/src/rendering/object.dart:1777:7) #65 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:111:14) #66 RenderObject.layout (package:flutter/src/rendering/object.dart:1777:7) #67 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:111:14) #68 RenderObject.layout (package:flutter/src/rendering/object.dart:1777:7) #69 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:111:14) #70 RenderObject.layout (package:flutter/src/rendering/object.dart:1777:7) #71 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:111:14) #72 RenderObject.layout (package:flutter/src/rendering/object.dart:1777:7) #73 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:111:14) #74 RenderOffstage.performLayout (package:flutter/src/rendering/proxy_box.dart:3220:13) #75 RenderObject.layout (package:flutter/src/rendering/object.dart:1777:7) #76 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:111:14) #77 RenderObject.layout (package:flutter/src/rendering/object.dart:1777:7) #78 _RenderTheatre.performLayout (package:flutter/src/widgets/overlay.dart:714:15) #79 RenderObject.layout (package:flutter/src/rendering/object.dart:1777:7) #80 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:111:14) #81 RenderObject.layout (package:flutter/src/rendering/object.dart:1777:7) #82 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:111:14) #83 RenderObject.layout (package:flutter/src/rendering/object.dart:1777:7) #84 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:111:14) #85 RenderObject.layout (package:flutter/src/rendering/object.dart:1777:7) #86 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:111:14) #87 RenderObject.layout (package:flutter/src/rendering/object.dart:1777:7) #88 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:111:14) #89 RenderObject.layout (package:flutter/src/rendering/object.dart:1777:7) #90 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:111:14) #91 RenderObject.layout (package:flutter/src/rendering/object.dart:1777:7) #92 RenderView.performLayout (package:flutter/src/rendering/view.dart:167:14) #93 RenderObject._layoutWithoutResize (package:flutter/src/rendering/object.dart:1634:7) #94 PipelineOwner.flushLayout (package:flutter/src/rendering/object.dart:884:18) #95 RendererBinding.drawFrame (package:flutter/src/rendering/binding.dart:444:19) #96 WidgetsBinding.drawFrame (package:flutter/src/widgets/binding.dart:907:13) #97 RendererBinding._handlePersistentFrameCallback (package:flutter/src/rendering/binding.dart:310:5) #98 SchedulerBinding._invokeFrameCallback (package:flutter/src/scheduler/binding.dart:1117:15) #99 SchedulerBinding.handleDrawFrame (package:flutter/src/scheduler/binding.dart:1055:9) #100 SchedulerBinding.scheduleWarmUpFrame. (package:flutter/src/scheduler/binding.dart:864:7) (elided 13 frames from class _AssertionError, class _RawReceivePortImpl, class _Timer, dart:async, and dart:async-patch) The following RenderObject was being processed when the exception was fired: _RenderListTile#8a042 relayoutBoundary=up12 NEEDS-LAYOUT NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE: creator: _ListTile ← MediaQuery ← Padding ← SafeArea ← ColoredBox ← Semantics ← _PointerListener ← Listener ← _GestureSemantics ← RawGestureDetector ← GestureDetector ← _RawMouseRegion ← ⋯ parentData: offset=Offset(0.0, 0.0) (can use size) constraints: BoxConstraints(w=0.0, 0.0<=h<=Infinity) size: MISSING This RenderObject had the following descendants (showing up to depth 5): title: RenderParagraph#cc6fc NEEDS-LAYOUT NEEDS-PAINT text: TextSpan ════════════════════════════════════════════════════════════════════════════════════════════════════ I/flutter: Another exception was thrown: RenderBox was not laid out: _RenderListTile#8a042 relayoutBoundary=up12 NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE I/flutter: Another exception was thrown: RenderBox was not laid out: RenderPadding#9d89c relayoutBoundary=up11 NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE I/flutter: Another exception was thrown: RenderBox was not laid out: _RenderColoredBox#1dbb1 relayoutBoundary=up10 NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE I/flutter: Another exception was thrown: RenderBox was not laid out: RenderSemanticsAnnotations#9d1c6 relayoutBoundary=up9 NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE Another exception was thrown: RenderBox was not laid out: RenderPointerListener#937a8 relayoutBoundary=up8 NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE I/flutter: Another exception was thrown: RenderBox was not laid out: RenderSemanticsGestureHandler#a7bb0 relayoutBoundary=up7 NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE I/flutter: Another exception was thrown: RenderBox was not laid out: RenderMouseRegion#ca426 relayoutBoundary=up6 NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE I/flutter: Another exception was thrown: RenderBox was not laid out: RenderSemanticsAnnotations#024ff relayoutBoundary=up5 NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE I/flutter: Another exception was thrown: RenderBox was not laid out: RenderRepaintBoundary#5365b relayoutBoundary=up4 NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE I/flutter: Another exception was thrown: 'package:flutter/src/rendering/sliver_multi_box_adaptor.dart': Failed assertion: line 545 pos 12: 'child.hasSize': is not true. I/flutter: Another exception was thrown: Null check operator used on a null value I/chatty: uid=10440(com.example.myapplication) 1.ui identical 1 line I/flutter: Another exception was thrown: Null check operator used on a null value W/Looper: Slow Looper main: doFrame is 312ms late because of 4 msg, msg 2 took 291ms (seq=36 running=229ms runnable=30ms io=1ms late=14ms h=android.app.ActivityThread$H w=159) I/e.myapplicatio: ProcessProfilingInfo new_methods=1301 is saved saved_to_disk=1 resolve_classes_delay=8000 D/ViewRootImpl: [TouchInput][ViewRootImpl] KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_BACK, scanCode=0, metaState=0, flags=0x48, repeatCount=0, eventTime=478588883, downTime=478588883, deviceId=-1, source=0x101, displayId=-1 } D/ViewRootImpl: [TouchInput][ViewRootImpl] KeyEvent { action=ACTION_UP, keyCode=KEYCODE_BACK, scanCode=0, metaState=0, flags=0x48, repeatCount=0, eventTime=478588953, downTime=478588883, deviceId=-1, source=0x101, displayId=-1 } I/Timeline: Timeline: Activity_launch_request time:478592650 W/ActivityThread: handleWindowVisibility: no activity for token android.os.BinderProxy@45b0f13 D/ForceDarkHelper: updateByCheckExcludeList: pkg: com.example.myapplication activity: io.flutter.embedding.android.FlutterActivity@50f6550 I/chatty: uid=10440(com.example.myapplication) identical 3 lines D/ForceDarkHelper: updateByCheckExcludeList: pkg: com.example.myapplication activity: io.flutter.embedding.android.FlutterActivity@50f6550 I/flutter: Another exception was thrown: Leading widget consumes entire tile width. Please use a sized widget, or consider replacing ListTile with a custom widget (see https://api.flutter.dev/flutter/material/ListTile-class.html#material.ListTile.4) I/chatty: uid=10440(com.example.myapplication) 1.ui identical 1 line I/flutter: Another exception was thrown: Leading widget consumes entire tile width. Please use a sized widget, or consider replacing ListTile with a custom widget (see https://api.flutter.dev/flutter/material/ListTile-class.html#material.ListTile.4) D/SurfaceView: UPDATE null, mIsCastMode = false ```
pedromassangocode commented 4 years ago

This issue is reproducible. Notes that the issue does not reproduce if we run the Flutter module as standalone project.

Some previously submitted issues related: https://github.com/flutter/flutter/issues?q=is%3Aissue+tileWidth+%21%3D+leadingSize.width+is%3Aclosed

Logs (running the Android Project) ``` 11/11 09:56:07: Launching 'app' on Pixel30. $ adb shell am start -n "com.example.myapplication/com.example.myapplication.MainActivity" -a android.intent.action.MAIN -c android.intent.category.LAUNCHER -D Waiting for application to come online: com.example.myapplication | com.example.myapplication.test Waiting for application to come online: com.example.myapplication | com.example.myapplication.test Connected to process 2946 on device 'Pixel30 [emulator-5554]'. Connecting to com.example.myapplication Capturing and displaying logcat messages from application. This behavior can be disabled in the "Logcat output" section of the "Debugger" settings page. I/e.myapplicatio: Not late-enabling -Xcheck:jni (already on) I/e.myapplicatio: Unquickening 12 vdex files! W/e.myapplicatio: Unexpected CPU variant for X86 using defaults: x86 W/ActivityThread: Application com.example.myapplication is waiting for the debugger on port 8100... I/System.out: Sending WAIT chunk I/System.out: Debugger has connected waiting for debugger to settle... I/System.out: waiting for debugger to settle... I/System.out: waiting for debugger to settle... I/System.out: waiting for debugger to settle... I/System.out: waiting for debugger to settle... I/System.out: waiting for debugger to settle... I/System.out: debugger has settled (1373) D/NetworkSecurityConfig: No Network Security Config specified, using platform default D/NetworkSecurityConfig: No Network Security Config specified, using platform default D/libEGL: loaded /vendor/lib/egl/libEGL_emulation.so D/libEGL: loaded /vendor/lib/egl/libGLESv1_CM_emulation.so D/libEGL: loaded /vendor/lib/egl/libGLESv2_emulation.so W/e.myapplicatio: Accessing hidden method Landroid/view/View;->computeFitSystemWindows(Landroid/graphics/Rect;Landroid/graphics/Rect;)Z (greylist, reflection, allowed) W/e.myapplicatio: Accessing hidden method Landroid/view/ViewGroup;->makeOptionalFitsSystemWindows()V (greylist, reflection, allowed) I/System.out: should load native is true I/ResourceExtractor: Resource version mismatch res_timestamp-1-1605085001902 I/e.myapplicatio: Waiting for a blocking GC ProfileSaver I/ResourceExtractor: Extracted baseline resource assets/flutter_assets/kernel_blob.bin I/ResourceExtractor: Extracted baseline resource assets/flutter_assets/vm_snapshot_data I/ResourceExtractor: Extracted baseline resource assets/flutter_assets/isolate_snapshot_data D/HostConnection: HostConnection::get() New Host Connection established 0xf68e9de0, tid 2946 D/HostConnection: HostComposition ext ANDROID_EMU_CHECKSUM_HELPER_v1 ANDROID_EMU_native_sync_v2 ANDROID_EMU_native_sync_v3 ANDROID_EMU_native_sync_v4 ANDROID_EMU_dma_v1 ANDROID_EMU_direct_mem ANDROID_EMU_host_composition_v1 ANDROID_EMU_host_composition_v2 ANDROID_EMU_YUV_Cache ANDROID_EMU_async_unmap_buffer GL_OES_EGL_image_external_essl3 GL_OES_vertex_array_object GL_KHR_texture_compression_astc_ldr ANDROID_EMU_gles_max_version_3_0 D/EGL_emulation: eglCreateContext: 0xf68ec4d0: maj 3 min 0 rcv 3 D/EGL_emulation: eglCreateContext: 0xf68eb3c0: maj 3 min 0 rcv 3 D/HostConnection: HostConnection::get() New Host Connection established 0xf68eaf60, tid 3520 D/HostConnection: HostComposition ext ANDROID_EMU_CHECKSUM_HELPER_v1 ANDROID_EMU_native_sync_v2 ANDROID_EMU_native_sync_v3 ANDROID_EMU_native_sync_v4 ANDROID_EMU_dma_v1 ANDROID_EMU_direct_mem ANDROID_EMU_host_composition_v1 ANDROID_EMU_host_composition_v2 ANDROID_EMU_YUV_Cache ANDROID_EMU_async_unmap_buffer GL_OES_EGL_image_external_essl3 GL_OES_vertex_array_object GL_KHR_texture_compression_astc_ldr ANDROID_EMU_gles_max_version_3_0 D/EGL_emulation: eglMakeCurrent: 0xf68eb3c0: ver 3 0 (tinfo 0xc7e78ed0) (first time) I/flutter: Observatory listening on http://127.0.0.1:39233/UYzF4ztE9Ow=/ D/HostConnection: HostConnection::get() New Host Connection established 0xf68c1e40, tid 3224 D/HostConnection: HostComposition ext ANDROID_EMU_CHECKSUM_HELPER_v1 ANDROID_EMU_native_sync_v2 ANDROID_EMU_native_sync_v3 ANDROID_EMU_native_sync_v4 ANDROID_EMU_dma_v1 ANDROID_EMU_direct_mem ANDROID_EMU_host_composition_v1 ANDROID_EMU_host_composition_v2 ANDROID_EMU_YUV_Cache ANDROID_EMU_async_unmap_buffer GL_OES_EGL_image_external_essl3 GL_OES_vertex_array_object GL_KHR_texture_compression_astc_ldr ANDROID_EMU_gles_max_version_3_0 W/OpenGLRenderer: Failed to choose config with EGL_SWAP_BEHAVIOR_PRESERVED, retrying without... D/EGL_emulation: eglCreateContext: 0xf68c21c0: maj 3 min 0 rcv 3 D/EGL_emulation: eglMakeCurrent: 0xf68c21c0: ver 3 0 (tinfo 0xc7e7aef0) (first time) I/Gralloc4: mapper 4.x is not supported D/HostConnection: createUnique: call HostConnection::get() New Host Connection established 0xf68ea2b0, tid 3224 D/goldfish-address-space: allocate: Ask for block of size 0x100 allocate: ioctl allocate returned offset 0x3ff1ff000 size 0x2000 D/HostConnection: HostComposition ext ANDROID_EMU_CHECKSUM_HELPER_v1 ANDROID_EMU_native_sync_v2 ANDROID_EMU_native_sync_v3 ANDROID_EMU_native_sync_v4 ANDROID_EMU_dma_v1 ANDROID_EMU_direct_mem ANDROID_EMU_host_composition_v1 ANDROID_EMU_host_composition_v2 ANDROID_EMU_YUV_Cache ANDROID_EMU_async_unmap_buffer GL_OES_EGL_image_external_essl3 GL_OES_vertex_array_object GL_KHR_texture_compression_astc_ldr ANDROID_EMU_gles_max_version_3_0 I/e.myapplicatio: NativeAlloc concurrent copying GC freed 1177(112KB) AllocSpace objects, 3(60KB) LOS objects, 49% free, 2535KB/5070KB, paused 41us total 395.365ms I/Choreographer: Skipped 32 frames! The application may be doing too much work on its main thread. I/flutter: ══╡ EXCEPTION CAUGHT BY RENDERING LIBRARY ╞═════════════════════════════════════════════════════════ The following assertion was thrown during performLayout(): Leading widget consumes entire tile width. Please use a sized widget, or consider replacing ListTile with a custom widget (see https://api.flutter.dev/flutter/material/ListTile-class.html#material.ListTile.4) 'package:flutter/src/material/list_tile.dart': Failed assertion: line 1547 pos 7: 'tileWidth != leadingSize.width' 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=BUG.md The relevant error-causing widget was: ListTile file:///Users/pedromassango/Downloads/application/flutter_module/lib/main.dart:27:28 When the exception was thrown, this was the stack: I/flutter: #2 _RenderListTile.performLayout (package:flutter/src/material/list_tile.dart:1547:7) #3 RenderObject.layout (package:flutter/src/rendering/object.dart:1777:7) #4 RenderPadding.performLayout (package:flutter/src/rendering/shifted_box.dart:207:12) #5 RenderObject.layout (package:flutter/src/rendering/object.dart:1777:7) #6 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:113:14) #7 RenderObject.layout (package:flutter/src/rendering/object.dart:1777:7) #8 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:113:14) #9 RenderObject.layout (package:flutter/src/rendering/object.dart:1777:7) #10 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:113:14) #11 RenderObject.layout (package:flutter/src/rendering/object.dart:1777:7) #12 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:113:14) #13 RenderObject.layout (package:flutter/src/rendering/object.dart:1777:7) #14 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:113:14) #15 RenderObject.layout (package:flutter/src/rendering/object.dart:1777:7) #16 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:113:14) #17 RenderObject.layout (package:flutter/src/rendering/object.dart:1777:7) #18 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:113:14) #19 RenderObject.layout (package:flutter/src/rendering/object.dart:1777:7) #20 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:113:14) #21 RenderObject.layout (package:flutter/src/rendering/object.dart:1777:7) #22 RenderSliverList.performLayout (package:flutter/src/rendering/sliver_list.dart:205:28) #23 RenderObject.layout (package:flutter/src/rendering/object.dart:1777:7) #24 RenderSliverEdgeInsetsPadding.performLayout (package:flutter/src/rendering/sliver_padding.dart:132:12) #25 RenderSliverPadding.performLayout (package:flutter/src/rendering/sliver_padding.dart:371:11) #26 RenderObject.layout (package:flutter/src/rendering/object.dart:1777:7) #27 RenderViewportBase.layoutChildSequence (package:flutter/src/rendering/viewport.dart:507:13) #28 RenderViewport._attemptLayout (package:flutter/src/rendering/viewport.dart:1561:12) #29 RenderViewport.performLayout (package:flutter/src/rendering/viewport.dart:1470:20) #30 RenderObject.layout (package:flutter/src/rendering/object.dart:1777:7) #31 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:113:14) #32 RenderObject.layout (package:flutter/src/rendering/object.dart:1777:7) #33 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:113:14) #34 RenderObject.layout (package:flutter/src/rendering/object.dart:1777:7) #35 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:113:14) #36 RenderObject.layout (package:flutter/src/rendering/object.dart:1777:7) #37 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:113:14) #38 RenderObject.layout (package:flutter/src/rendering/object.dart:1777:7) #39 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:113:14) #40 RenderObject.layout (package:flutter/src/rendering/object.dart:1777:7) #41 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:113:14) #42 RenderObject.layout (package:flutter/src/rendering/object.dart:1777:7) #43 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:113:14) #44 RenderObject.layout (package:flutter/src/rendering/object.dart:1777:7) #45 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:113:14) #46 RenderObject.layout (package:flutter/src/rendering/object.dart:1777:7) #47 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:113:14) #48 RenderObject.layout (package:flutter/src/rendering/object.dart:1777:7) #49 MultiChildLayoutDelegate.layoutChild (package:flutter/src/rendering/custom_layout.dart:171:12) #50 _ScaffoldLayout.performLayout (package:flutter/src/material/scaffold.dart:498:7) #51 MultiChildLayoutDelegate._callPerformLayout (package:flutter/src/rendering/custom_layout.dart:243:7) #52 RenderCustomMultiChildLayoutBox.performLayout (package:flutter/src/rendering/custom_layout.dart:402:14) #53 RenderObject.layout (package:flutter/src/rendering/object.dart:1777:7) #54 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:113:14) #55 RenderObject.layout (package:flutter/src/rendering/object.dart:1777:7) #56 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:113:14) #57 _RenderCustomClip.performLayout (package:flutter/src/rendering/proxy_box.dart:1308:11) #58 RenderObject.layout (package:flutter/src/rendering/object.dart:1777:7) #59 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:113:14) #60 RenderObject.layout (package:flutter/src/rendering/object.dart:1777:7) #61 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:113:14) I/flutter: #62 RenderObject.layout (package:flutter/src/rendering/object.dart:1777:7) #63 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:113:14) #64 RenderObject.layout (package:flutter/src/rendering/object.dart:1777:7) #65 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:113:14) #66 RenderObject.layout (package:flutter/src/rendering/object.dart:1777:7) #67 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:113:14) #68 RenderObject.layout (package:flutter/src/rendering/object.dart:1777:7) #69 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:113:14) #70 RenderObject.layout (package:flutter/src/rendering/object.dart:1777:7) #71 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:113:14) #72 RenderObject.layout (package:flutter/src/rendering/object.dart:1777:7) #73 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:113:14) #74 RenderOffstage.performLayout (package:flutter/src/rendering/proxy_box.dart:3222:13) #75 RenderObject.layout (package:flutter/src/rendering/object.dart:1777:7) #76 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:113:14) #77 RenderObject.layout (package:flutter/src/rendering/object.dart:1777:7) #78 _RenderTheatre.performLayout (package:flutter/src/widgets/overlay.dart:685:15) #79 RenderObject.layout (package:flutter/src/rendering/object.dart:1777:7) #80 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:113:14) #81 RenderObject.layout (package:flutter/src/rendering/object.dart:1777:7) #82 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:113:14) #83 RenderObject.layout (package:flutter/src/rendering/object.dart:1777:7) #84 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:113:14) #85 RenderObject.layout (package:flutter/src/rendering/object.dart:1777:7) #86 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:113:14) #87 RenderObject.layout (package:flutter/src/rendering/object.dart:1777:7) #88 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:113:14) #89 RenderObject.layout (package:flutter/src/rendering/object.dart:1777:7) #90 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:113:14) #91 RenderObject.layout (package:flutter/src/rendering/object.dart:1777:7) #92 RenderView.performLayout (package:flutter/src/rendering/view.dart:167:14) #93 RenderObject._layoutWithoutResize (package:flutter/src/rendering/object.dart:1634:7) #94 PipelineOwner.flushLayout (package:flutter/src/rendering/object.dart:884:18) #95 RendererBinding.drawFrame (package:flutter/src/rendering/binding.dart:436:19) I/flutter: #96 WidgetsBinding.drawFrame (package:flutter/src/widgets/binding.dart:914:13) I/flutter: #97 RendererBinding._handlePersistentFrameCallback (package:flutter/src/rendering/binding.dart:302:5) #98 SchedulerBinding._invokeFrameCallback (package:flutter/src/scheduler/binding.dart:1117:15) #99 SchedulerBinding.handleDrawFrame (package:flutter/src/scheduler/binding.dart:1055:9) #100 SchedulerBinding.scheduleWarmUpFrame. (package:flutter/src/scheduler/binding.dart:864:7) (elided 13 frames from class _AssertionError, class _RawReceivePortImpl, class _Timer, dart:async, and dart:async-patch) The following RenderObject was being processed when the exception was fired: _RenderListTile#310b7 relayoutBoundary=up12 NEEDS-LAYOUT NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE: creator: _ListTile ← MediaQuery ← Padding ← SafeArea ← ColoredBox ← Semantics ← _PointerListener ← Listener ← _GestureSemantics ← RawGestureDetector ← GestureDetector ← _RawMouseRegion ← ⋯ parentData: offset=Offset(0.0, 0.0) (can use size) constraints: BoxConstraints(w=0.0, 0.0<=h<=Infinity) size: MISSING This RenderObject had the following descendants (showing up to depth 5): title: RenderParagraph#a11fa NEEDS-LAYOUT NEEDS-PAINT text: TextSpan I/flutter: ════════════════════════════════════════════════════════════════════════════════════════════════════ I/flutter: Another exception was thrown: RenderBox was not laid out: _RenderListTile#310b7 relayoutBoundary=up12 NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE I/flutter: Another exception was thrown: RenderBox was not laid out: RenderPadding#97cbe relayoutBoundary=up11 NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE I/flutter: Another exception was thrown: RenderBox was not laid out: _RenderColoredBox#2586e relayoutBoundary=up10 NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE I/flutter: Another exception was thrown: RenderBox was not laid out: RenderSemanticsAnnotations#a70be relayoutBoundary=up9 NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE Another exception was thrown: RenderBox was not laid out: RenderPointerListener#32d3b relayoutBoundary=up8 NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE I/flutter: Another exception was thrown: RenderBox was not laid out: RenderSemanticsGestureHandler#aa3a7 relayoutBoundary=up7 NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE I/flutter: Another exception was thrown: RenderBox was not laid out: RenderMouseRegion#2ff00 relayoutBoundary=up6 NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE I/flutter: Another exception was thrown: RenderBox was not laid out: RenderSemanticsAnnotations#5b059 relayoutBoundary=up5 NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE I/flutter: Another exception was thrown: RenderBox was not laid out: RenderRepaintBoundary#4dea6 relayoutBoundary=up4 NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE I/flutter: Another exception was thrown: 'package:flutter/src/rendering/sliver_multi_box_adaptor.dart': Failed assertion: line 545 pos 12: 'child.hasSize': is not true. I/flutter: Another exception was thrown: Null check operator used on a null value Another exception was thrown: Null check operator used on a null value I/flutter: Another exception was thrown: Null check operator used on a null value Connected to the target VM, address: 'localhost:8641', transport: 'socket' W/e.myapplicatio: Accessing hidden method Landroid/view/accessibility/AccessibilityNodeInfo;->getSourceNodeId()J (greylist,test-api, reflection, allowed) W/e.myapplicatio: Accessing hidden method Landroid/view/accessibility/AccessibilityRecord;->getSourceNodeId()J (greylist, reflection, allowed) W/e.myapplicatio: Accessing hidden field Landroid/view/accessibility/AccessibilityNodeInfo;->mChildNodeIds:Landroid/util/LongArray; (greylist, reflection, allowed) Accessing hidden method Landroid/util/LongArray;->get(I)J (greylist, reflection, allowed) D/HostConnection: HostConnection::get() New Host Connection established 0xf68f3150, tid 3516 D/HostConnection: HostComposition ext ANDROID_EMU_CHECKSUM_HELPER_v1 ANDROID_EMU_native_sync_v2 ANDROID_EMU_native_sync_v3 ANDROID_EMU_native_sync_v4 ANDROID_EMU_dma_v1 ANDROID_EMU_direct_mem ANDROID_EMU_host_composition_v1 ANDROID_EMU_host_composition_v2 ANDROID_EMU_YUV_Cache ANDROID_EMU_async_unmap_buffer GL_OES_EGL_image_external_essl3 GL_OES_vertex_array_object GL_KHR_texture_compression_astc_ldr ANDROID_EMU_gles_max_version_3_0 D/EGL_emulation: eglMakeCurrent: 0xf68ec4d0: ver 3 0 (tinfo 0xc4b4a810) (first time) I/OpenGLRenderer: Davey! duration=1201ms; Flags=1, IntendedVsync=202378527307, Vsync=202695193961, OldestInputEvent=9223372036854775807, NewestInputEvent=0, HandleInputStart=202702267688, AnimationStart=202702287393, PerformTraversalsStart=202705669497, DrawStart=203138421952, SyncQueued=203168069375, SyncStart=203171148959, IssueDrawCommandsStart=203171656234, SwapBuffers=203194397509, FrameCompleted=203583296712, DequeueBufferDuration=368406891, QueueBufferDuration=6674001, GpuCompleted=0, I/Choreographer: Skipped 59 frames! The application may be doing too much work on its main thread. I/OpenGLRenderer: Davey! duration=1075ms; Flags=0, IntendedVsync=202711953021, Vsync=203695286315, OldestInputEvent=9223372036854775807, NewestInputEvent=0, HandleInputStart=203703665696, AnimationStart=203703682481, PerformTraversalsStart=203715828953, DrawStart=203759107867, SyncQueued=203759225121, SyncStart=203761298195, IssueDrawCommandsStart=203761379844, SwapBuffers=203762129397, FrameCompleted=203789797769, DequeueBufferDuration=18291497, QueueBufferDuration=579842, GpuCompleted=0, I/flutter: Another exception was thrown: Leading widget consumes entire tile width. Please use a sized widget, or consider replacing ListTile with a custom widget (see https://api.flutter.dev/flutter/material/ListTile-class.html#material.ListTile.4) I/chatty: uid=10160(com.example.myapplication) 1.ui identical 1 line I/flutter: Another exception was thrown: Leading widget consumes entire tile width. Please use a sized widget, or consider replacing ListTile with a custom widget (see https://api.flutter.dev/flutter/material/ListTile-class.html#material.ListTile.4) ```
flutter doctor -v ``` [✓] Flutter (Channel stable, 1.22.3, on Mac OS X 10.15.7 19H2, locale en) • Flutter version 1.22.3 at /Users/pedromassango/dev/SDKs/flutter_stable • Framework revision 8874f21e79 (13 days ago), 2020-10-29 14:14:35 -0700 • Engine revision a1440ca392 • Dart version 2.10.3 [✓] Android toolchain - develop for Android devices (Android SDK version 30.0.2) • Android SDK at /Users/pedromassango/Library/Android/sdk • Platform android-30, build-tools 30.0.2 • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593) • All Android licenses accepted. [✓] Xcode - develop for iOS and macOS (Xcode 12.1) • Xcode at /Applications/Xcode.app/Contents/Developer • Xcode 12.1, Build version 12A7403 • CocoaPods version 1.9.3 [!] Android Studio (version 4.0) • Android Studio at /Applications/Android Studio.app/Contents ✗ Flutter plugin not installed; this adds Flutter specific functionality. ✗ Dart plugin not installed; this adds Dart specific functionality. • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593) [✓] IntelliJ IDEA Community Edition (version 2020.2.3) • IntelliJ at /Applications/IntelliJ IDEA CE.app • Flutter plugin installed • Dart plugin version 202.8070 [✓] VS Code (version 1.51.0) • VS Code at /Applications/Visual Studio Code.app/Contents • Flutter extension version 3.16.0 [✓] Connected device (1 available) • sdk gphone x86 arm (mobile) • emulator-5554 • android-x86 • Android 11 (API 30) (emulator) ! Doctor found issues in 1 category. ```
pedromassangocode commented 4 years ago

Adding engine because the issue does not reproduce in standalone mode.

dnfield commented 4 years ago

I suspect this is actually a framework bug - it seems like the framework is incorrectly getting a viewport size as zero when it shouldn't be.

Is there a reproducible test case or project for this?

chinmaygarde commented 4 years ago

@pedromassango This is not a native crash. I am not sure what the engine action item is here as the stack trace is all Dart.

pedromassangocode commented 3 years ago

@dnfield the reproducible project code is https://github.com/flutter/flutter/files/5518598/application.zip provided in https://github.com/flutter/flutter/issues/70179#issuecomment-724806398.

shivani909 commented 3 years ago

Try adjusting the dimensions(height, width) of the widget you're taking.

stact commented 2 years ago

Same issue on iOS when switching from orientation Portrait to Landscape or on hot reload when on landscape. Do we have a workaround to prevent this issue?

Simple example

Card(
  child: ListTile(
    leading: Container(
      padding: const EdgeInsets.symmetric(vertical: 4.0),
      height: 100,
      width: 100,
      child: const Icon(Icons.info),
    ),
    title: Text('Yolo'),
  ),
);

image

image image
flutter doctor flutter doctor Doctor summary (to see all details, run flutter doctor -v): [✓] Flutter (Channel stable, 2.10.5, on macOS 12.3.1 21E258 darwin-arm, locale en-US) [✓] Android toolchain - develop for Android devices (Android SDK version 31.0.0) [✓] Xcode - develop for iOS and macOS (Xcode 13.3.1) [✓] Chrome - develop for the web [✓] Android Studio (version 2020.3) [✓] VS Code (version 1.66.2) [✓] Connected device (2 available) [✓] HTTP Host Availability • No issues found!
Exception logs ════════ Exception caught by rendering library ═════════════════════════════════ The following assertion was thrown during performLayout(): Leading widget consumes entire tile width. Please use a sized widget, or consider replacing ListTile with a custom widget (see https://api.flutter.dev/flutter/material/ListTile-class.html#material.ListTile.4) 'package:flutter/src/material/list_tile.dart': package:flutter/…/material/list_tile.dart:1 Failed assertion: line 1611 pos 7: 'tileWidth != leadingSize.width || tileWidth == 0.0' ither 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.md The relevant error-causing widget was ListTile lib/…/widgets/drawer.dart:33 When the exception was thrown, this was the stack #2 _RenderListTile.performLayout package:flutter/…/material/list_tile.dart:1611 #3 RenderObject.layout package:flutter/…/rendering/object.dart:1887 #4 RenderPadding.performLayout package:flutter/…/rendering/shifted_box.dart:233 #5 RenderObject.layout package:flutter/…/rendering/object.dart:1887 #6 RenderPadding.performLayout package:flutter/…/rendering/shifted_box.dart:233 #7 RenderObject.layout package:flutter/…/rendering/object.dart:1887 #8 RenderProxyBoxMixin.performLayout package:flutter/…/rendering/proxy_box.dart:116 #9 RenderObject.layout package:flutter/…/rendering/object.dart:1887 #10 RenderProxyBoxMixin.performLayout package:flutter/…/rendering/proxy_box.dart:116 #11 RenderObject.layout package:flutter/…/rendering/object.dart:1887 #12 RenderProxyBoxMixin.performLayout package:flutter/…/rendering/proxy_box.dart:116 #13 RenderObject.layout package:flutter/…/rendering/object.dart:1887 #14 RenderProxyBoxMixin.performLayout package:flutter/…/rendering/proxy_box.dart:116 #15 RenderObject.layout package:flutter/…/rendering/object.dart:1887 #16 RenderProxyBoxMixin.performLayout package:flutter/…/rendering/proxy_box.dart:116 #17 RenderObject.layout package:flutter/…/rendering/object.dart:1887 #18 RenderProxyBoxMixin.performLayout package:flutter/…/rendering/proxy_box.dart:116 #19 RenderObject.layout package:flutter/…/rendering/object.dart:1887 #20 RenderProxyBoxMixin.performLayout package:flutter/…/rendering/proxy_box.dart:116 #21 RenderObject.layout package:flutter/…/rendering/object.dart:1887 #22 RenderSliverList.performLayout.advance package:flutter/…/rendering/sliver_list.dart:249 #23 RenderSliverList.performLayout package:flutter/…/rendering/sliver_list.dart:281 #24 RenderObject.layout package:flutter/…/rendering/object.dart:1887 #25 RenderSliverEdgeInsetsPadding.performLayout package:flutter/…/rendering/sliver_padding.dart:137 #26 RenderSliverPadding.performLayout package:flutter/…/rendering/sliver_padding.dart:371 #27 RenderObject.layout package:flutter/…/rendering/object.dart:1887 #28 RenderViewportBase.layoutChildSequence package:flutter/…/rendering/viewport.dart:510 #29 RenderViewport._attemptLayout package:flutter/…/rendering/viewport.dart:1580 #30 RenderViewport.performLayout package:flutter/…/rendering/viewport.dart:1489 #31 RenderObject._layoutWithoutResize package:flutter/…/rendering/object.dart:1731 #32 PipelineOwner.flushLayout package:flutter/…/rendering/object.dart:887 #33 RendererBinding.drawFrame package:flutter/…/rendering/binding.dart:497 #34 WidgetsBinding.drawFrame package:flutter/…/widgets/binding.dart:883 #35 RendererBinding._handlePersistentFrameCallback package:flutter/…/rendering/binding.dart:363 #36 SchedulerBinding._invokeFrameCallback package:flutter/…/scheduler/binding.dart:1144 #37 SchedulerBinding.handleDrawFrame package:flutter/…/scheduler/binding.dart:1081 #38 SchedulerBinding._handleDrawFrame package:flutter/…/scheduler/binding.dart:995 #42 _invoke (dart:ui/hooks.dart:151:10) #43 PlatformDispatcher._drawFrame (dart:ui/platform_dispatcher.dart:308:5) #44 _drawFrame (dart:ui/hooks.dart:115:31) (elided 5 frames from class _AssertionError and dart:async) The following RenderObject was being processed when the exception was fired: _RenderListTile#3f7e4 relayoutBoundary=up12 NEEDS-PAINT enderObject: _RenderListTile#3f7e4 relayoutBoundary=up12 NEEDS-PAINT needs compositing parentData: offset=Offset(16.0, 0.0) (can use size) constraints: BoxConstraints(w=238.0, 0.0<=h<=Infinity) size: Size(272.0, 56.0) leading: RenderSemanticsAnnotations#46fa4 relayoutBoundary=up13 NEEDS-PAINT needs compositing parentData: offset=Offset(0.0, 4.0) (can use size) constraints: BoxConstraints(0.0<=w<=238.0, 0.0<=h<=56.0) semantic boundary size: Size(238.0, 48.0) child: _RenderInputPadding#a2b94 relayoutBoundary=up14 NEEDS-PAINT needs compositing parentData: (can use size) constraints: BoxConstraints(0.0<=w<=238.0, 0.0<=h<=56.0) size: Size(238.0, 48.0) child: RenderConstrainedBox#95947 relayoutBoundary=up15 NEEDS-PAINT needs compositing parentData: offset=Offset(0.0, 4.0) (can use size) constraints: BoxConstraints(0.0<=w<=238.0, 0.0<=h<=56.0) size: Size(238.0, 40.0) additionalConstraints: BoxConstraints(40.0<=w<=Infinity, 40.0<=h<=Infinity) child: RenderPhysicalShape#6868a relayoutBoundary=up16 NEEDS-PAINT needs compositing parentData: (can use size) constraints: BoxConstraints(40.0<=w<=238.0, 40.0<=h<=56.0) layer: PhysicalModelLayer#4ab0b DETACHED engine layer: PhysicalShapeEngineLayer#2c6a9 handles: 2 elevation: 0.0 color: Color(0x00000000) size: Size(238.0, 40.0) elevation: 0.0 color: Color(0x00000000) shadowColor: Color(0x00000000) clipper: ShapeBorderClipper title: RenderConstrainedBox#c9896 relayoutBoundary=up13 NEEDS-PAINT parentData: offset=Offset(270.0, 28.0) (can use size) constraints: BoxConstraints(w=2.0, 0.0<=h<=Infinity) size: Size(2.0, 0.0) additionalConstraints: BoxConstraints(unconstrained) ════════════════════════════════════════════════════════════════════════════════
stact commented 2 years ago

Oh the issue was caused by the drawer, not the expected Card widget with Tile 😅 I've resolved the drawer and everything gonna right

melihg commented 1 year ago

I have an extremely simple flutter app. Below is the main.dart file. This App gives an error message "Failed assertion: line 1186 pos 7: 'tileWidth != leadingSize.width || tileWidth == 0.0'" when I try to resize the App window to a Screen Width around 290. My flutter version is 3.7.7 and I've also tried to downgrade to 3.7.3 but it didn't fix the issue.

import 'package:flutter/material.dart';

void main() { runApp(MyApp()); }

class MyApp extends StatelessWidget { @override Widget build(BuildContext context) { return MaterialApp( debugShowCheckedModeBanner: false, home: SideMenu(), ); } }

class SideMenu extends StatelessWidget { @override Widget build(BuildContext context) { MediaQuery.of(context).size.width; return Scaffold( appBar: AppBar( title: const Text('Test'), ), body: Material( child: SizedBox( width: 300, child: ListView( physics: const NeverScrollableScrollPhysics(), scrollDirection: Axis.vertical, children: [ ListTile( leading: SizedBox( width: 260, height: 260, child: Icon( Icons.search, size: 260.0, ), ), ), ListTile( title: Text('Screen Width: ${MediaQuery.of(context).size.width}'), ), ], ), ), ), ); } }

lucasjinreal commented 1 year ago

Same.

darshankawar commented 8 months ago

@Wouter12 I tried to reverify this issue using latest stable and ran it per your original description, but can't seem to replicate the error. I get below logs when the app compiles and runs.

D/FlutterGeolocator(24253): Flutter engine connected. Connected engine count 1
D/EGL_emulation(24101): app_time_stats: avg=1381.08ms min=43.89ms max=3648.03ms count=3
D/EGL_emulation(24101): app_time_stats: avg=15.49ms min=1.86ms max=183.38ms count=31
D/EGL_emulation(24101): app_time_stats: avg=128.07ms min=1.93ms max=879.66ms count=7
D/FlutterGeolocator(24253): Detaching Geolocator from activity
D/FlutterGeolocator(24253): Flutter engine disconnected. Connected engine count 0
I/flutter (24421): 
I/flutter (24421): 
I/flutter (24421): 
I/flutter (24421): 
I/flutter (24421): Flutter screen size: 1440.0 2476.0
I/flutter (24421): first: 338583194 last: 1015619479

I tried on latest stable 3.19.2. Can you check at your end if the original error still persists ? If so, please provide us updated runnable code sample.

github-actions[bot] commented 7 months ago

Without additional information, we are unfortunately not sure how to resolve this issue. We are therefore reluctantly going to close this bug for now. If you find this problem please file a new issue with the same description, what happens, logs and the output of 'flutter doctor -v'. All system setups can be slightly different so it's always better to open new issues and reference the related ones. Thanks for your contribution.

github-actions[bot] commented 7 months ago

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.