Skip to content

Applying decoration for a table row widget will cause render exception #17243

@jerrywell

Description

@jerrywell

Steps to Reproduce

  1. run app with following sample
  2. tap on cell 'Tap here'
  3. view push will cause exception

btw, remove decoration for table row and do above steps won't cause this exception

import 'package:flutter/material.dart';

void main() => runApp(new MyApp());

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return new MaterialApp(
      home: new Scaffold(
        appBar: new AppBar(),
        body: new Builder(builder: (BuildContext context) {
          return new Table(
            children: [
              new TableRow(
                decoration: new BoxDecoration(
                  color: Colors.yellow
                ),
                children: [
                  new TableCell(
                    child: new GestureDetector(
                      child: new Text('Tap here'),
                      onTap: () {
                        Navigator.push(context, new MaterialPageRoute(builder: buildScreen));
                      },
                    ),
                  )
                ]
              )
            ],
          );
        })
      ),
    );
  }

  Widget buildScreen(BuildContext context) {
    return new Scaffold(
      appBar: new AppBar()
    );
  }
}

Logs

Restarted app in 1,306ms.
I/flutter (10643): ══╡ EXCEPTION CAUGHT BY RENDERING LIBRARY ╞═════════════════════════════════════════════════════════
I/flutter (10643): The following NoSuchMethodError was thrown during paint():
I/flutter (10643): The method '[]' was called on null.
I/flutter (10643): Receiver: null
I/flutter (10643): Tried calling: [](0)
I/flutter (10643): 
I/flutter (10643): When the exception was thrown, this was the stack:
I/flutter (10643): #0      Object.noSuchMethod (dart:core-patch/dart:core/object_patch.dart:46)
I/flutter (10643): #1      RenderTable.paint (package:flutter/src/rendering/table.dart:1133:33)
I/flutter (10643): #2      RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:2018:7)
I/flutter (10643): #3      PaintingContext.paintChild (package:flutter/src/rendering/object.dart:130:13)
I/flutter (10643): #4      RenderBox&ContainerRenderObjectMixin&RenderBoxContainerDefaultsMixin.defaultPaint (package:flutter/src/rendering/box.dart:2207:15)
I/flutter (10643): #5      RenderCustomMultiChildLayoutBox.paint (package:flutter/src/rendering/custom_layout.dart:360:5)
I/flutter (10643): #6      RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:2018:7)
I/flutter (10643): #7      PaintingContext.paintChild (package:flutter/src/rendering/object.dart:130:13)
I/flutter (10643): #8      RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.paint (package:flutter/src/rendering/proxy_box.dart:127:15)
I/flutter (10643): #9      _RenderInkFeatures.paint (package:flutter/src/material/material.dart:456:16)
I/flutter (10643): #10     RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:2018:7)
I/flutter (10643): #11     PaintingContext.paintChild (package:flutter/src/rendering/object.dart:130:13)
I/flutter (10643): #12     RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.paint (package:flutter/src/rendering/proxy_box.dart:127:15)
I/flutter (10643): #13     RenderPhysicalModel.paint (package:flutter/src/rendering/proxy_box.dart:1634:20)
I/flutter (10643): #14     RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:2018:7)
I/flutter (10643): #15     PaintingContext.paintChild (package:flutter/src/rendering/object.dart:130:13)
I/flutter (10643): #16     RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.paint (package:flutter/src/rendering/proxy_box.dart:127:15)
I/flutter (10643): #17     RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:2018:7)
I/flutter (10643): #18     PaintingContext.paintChild (package:flutter/src/rendering/object.dart:130:13)
I/flutter (10643): #19     RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.paint (package:flutter/src/rendering/proxy_box.dart:127:15)
I/flutter (10643): #20     RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:2018:7)
I/flutter (10643): #21     PaintingContext.repaintCompositedChild (package:flutter/src/rendering/object.dart:110:11)
I/flutter (10643): #22     PipelineOwner.flushPaint (package:flutter/src/rendering/object.dart:796:29)
I/flutter (10643): #23     BindingBase&GestureBinding&ServicesBinding&SchedulerBinding&PaintingBinding&RendererBinding.drawFrame (package:flutter/src/rendering/binding.dart:272:19)
I/flutter (10643): #24     BindingBase&GestureBinding&ServicesBinding&SchedulerBinding&PaintingBinding&RendererBinding&WidgetsBinding.drawFrame (package:flutter/src/widgets/binding.dart:627:22)
I/flutter (10643): #25     BindingBase&GestureBinding&ServicesBinding&SchedulerBinding&PaintingBinding&RendererBinding._handlePersistentFrameCallback (package:flutter/src/rendering/binding.dart:208:5)
I/flutter (10643): #26     BindingBase&GestureBinding&ServicesBinding&SchedulerBinding._invokeFrameCallback (package:flutter/src/scheduler/binding.dart:990:15)
I/flutter (10643): #27     BindingBase&GestureBinding&ServicesBinding&SchedulerBinding.handleDrawFrame (package:flutter/src/scheduler/binding.dart:930:9)
I/flutter (10643): #28     BindingBase&GestureBinding&ServicesBinding&SchedulerBinding._handleDrawFrame (package:flutter/src/scheduler/binding.dart:842:5)
I/flutter (10643): #29     _invoke (file:///b/build/slave/Linux_Engine/build/src/flutter/lib/ui/hooks.dart:120)
I/flutter (10643): #30     _drawFrame (file:///b/build/slave/Linux_Engine/build/src/flutter/lib/ui/hooks.dart:109)
I/flutter (10643): 
I/flutter (10643): The following RenderObject was being processed when the exception was fired:
I/flutter (10643):   RenderTable#035e9 relayoutBoundary=up1
I/flutter (10643):   creator: Table ← Builder ← MediaQuery ← LayoutId-[<_ScaffoldSlot.body>] ← CustomMultiChildLayout ←
I/flutter (10643):   AnimatedBuilder ← DefaultTextStyle ← AnimatedDefaultTextStyle ← _InkFeatures-[GlobalKey#13b4e ink
I/flutter (10643):   renderer] ← NotificationListener<LayoutChangedNotification> ← PhysicalModel ←
I/flutter (10643):   AnimatedPhysicalModel ← ⋯
I/flutter (10643):   parentData: offset=Offset(0.0, 80.0); id=_ScaffoldSlot.body (can use size)
I/flutter (10643):   constraints: BoxConstraints(0.0<=w<=360.0, 0.0<=h<=512.0)
I/flutter (10643):   size: Size(360.0, 16.0)
I/flutter (10643):   default column width: FlexColumnWidth(1.0)
I/flutter (10643):   table size: 1×1
I/flutter (10643):   column offsets: 0.0
I/flutter (10643):   row offsets: 0.0, 16.0
I/flutter (10643): This RenderObject had the following descendants (showing up to depth 5):
I/flutter (10643):   RenderSemanticsGestureHandler#9e4ab relayoutBoundary=up2
I/flutter (10643):     RenderPointerListener#0b25d relayoutBoundary=up3
I/flutter (10643):       RenderParagraph#445df relayoutBoundary=up4
I/flutter (10643): ════════════════════════════════════════════════════════════════════════════════════════════════════

Flutter Doctor

[✓] Flutter (Channel master, v0.3.6-pre.90, on Mac OS X 10.13.4 17E199, locale en-TW)
    • Flutter version 0.3.6-pre.90 at /Users/jerry/Documents/project/flutter
    • Framework revision 7f0876700a (6 hours ago), 2018-05-02 18:50:35 -0700
    • Engine revision 2812ea3ed3
    • Dart version 2.0.0-dev.50.0.flutter-0cc70c4a7c

[✓] Android toolchain - develop for Android devices (Android SDK 26.0.3)
    • Android SDK at /Users/jerry/Library/Android/sdk
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-27, build-tools 26.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_152-release-1024-b01)
    • All Android licenses accepted.

[✓] iOS toolchain - develop for iOS devices (Xcode 9.2)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 9.2, Build version 9C40b
    • ios-deploy 1.9.2
    • CocoaPods version 1.5.0

[✓] Android Studio (version 3.1)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin version 24.0.1
    • Dart plugin version 173.4700
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b01)

[✓] IntelliJ IDEA Community Edition (version 2018.1.2)
    • IntelliJ at /Applications/IntelliJ IDEA CE.app
    • Flutter plugin version 24.0.2
    • Dart plugin version 181.4668.60

[✓] Connected devices (3 available)
    • SM G930F                  • ce01171121b67a1a02                   • android-arm64 • Android 7.0 (API 24)
    • Android SDK built for x86 • emulator-5556                        • android-x86   • Android 8.0.0 (API 26) (emulator)
    • iPhone X                  • 94158934-6313-4593-921E-D4437A7BBF71 • ios           • iOS 11.2 (simulator)

• No issues found!

Metadata

Metadata

Assignees

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