{"action":"created","issue":{"url":"https://api.github.com/repos/flutter/flutter/issues/566","labels_url":"https://api.github.com/repos/flutter/flutter/issues/566/labels{/name}","comments_url":"https://api.github.com/repos/flutter/flutter/issues/566/comments","events_url":"https://api.github.com/repos/flutter/flutter/issues/566/events","html_url":"https://github.com/flutter/flutter/issues/566","id":118527053,"number":566,"title":"Tap generates unexcepted exception","user":{"login":"sethladd","id":5479,"avatar_url":"https://avatars.githubusercontent.com/u/5479?v=3","gravatar_id":"","url":"https://api.github.com/users/sethladd","html_url":"https://github.com/sethladd","followers_url":"https://api.github.com/users/sethladd/followers","following_url":"https://api.github.com/users/sethladd/following{/other_user}","gists_url":"https://api.github.com/users/sethladd/gists{/gist_id}","starred_url":"https://api.github.com/users/sethladd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sethladd/subscriptions","organizations_url":"https://api.github.com/users/sethladd/orgs","repos_url":"https://api.github.com/users/sethladd/repos","events_url":"https://api.github.com/users/sethladd/events{/privacy}","received_events_url":"https://api.github.com/users/sethladd/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-11-24T03:58:04Z","updated_at":"2015-11-24T04:00:32Z","closed_at":null,"body":"I was trying various samples I found online. If I load up this sample, and then tap anywhere on the screen, I get an unexpected exception.\r\n\r\nSample:\r\n\r\n```\r\n// following code is checked in 2015/11/07\r\nimport 'package:flutter/widgets.dart';\r\nimport 'package:flutter/rendering.dart';\r\nimport 'package:flutter/animation.dart';\r\nimport 'dart:math';\r\n\r\nvoid main() {\r\n  runApp(new DrawRectWidget()..anime());\r\n}\r\n\r\nclass DrawRectWidget extends OneChildRenderObjectWidget {\r\n  double angle = 0.0;\r\n  DrawRectObject o = new DrawRectObject();\r\n  RenderObject createRenderObject() {\r\n    return o;\r\n  }\r\n\r\n  int prevTimeStamp = 0;\r\n  void anime() {\r\n    scheduler.requestAnimationFrame((Duration timeStamp) {\r\n      //print(\"${timeStamp.inMilliseconds-prevTimeStamp}\");\r\n      prevTimeStamp = timeStamp.inMilliseconds;\r\n      o.x = 100 * cos(PI * angle / 180.0) + 100.0;\r\n      o.y = 100 * sin(PI * angle / 180.0) + 100.0;\r\n      angle++;\r\n      o.markNeedsPaint();\r\n      anime();\r\n    });\r\n  }\r\n}\r\n\r\nclass DrawRectObject extends RenderBox {\r\n  double x = 50.0;\r\n  double y = 50.0;\r\n  void paint(PaintingContext context, Offset offset) {\r\n    Paint p = new Paint();\r\n    p.color = new Color.fromARGB(0xff, 0x00, 0x00, 0xff);\r\n    Rect r = new Rect.fromLTWH(x, y, 25.0, 25.0);\r\n    context.canvas.drawRect(r, p);\r\n  }\r\n}\r\n```\r\n\r\nException:\r\n\r\n```\r\nandroid: E/flutter : NoSuchMethodError: method not found: 'width'\r\nandroid: E/flutter : Receiver: null\r\nandroid: E/flutter : Arguments: []\r\nandroid: E/flutter : #0      Object._noSuchMethod (dart:core-patch/object_patch.dart:42)\r\nandroid: E/flutter : #1      Object.noSuchMethod (dart:core-patch/object_patch.dart:45)\r\nandroid: E/flutter : #2      RenderBox.hitTest (packages/flutter/src/rendering/box.dart:552)\r\nandroid: E/flutter : #3      RenderView.hitTest (packages/flutter/src/rendering/view.dart:103)\r\nandroid: E/flutter : #4      FlutterBinding.hitTest (packages/flutter/src/rendering/binding.dart:267)\r\nandroid: E/flutter : #5      FlutterBinding._handlePointerInputEvent (packages/flutter/src/rendering/binding.dart:239)\r\nandroid: E/flutter : #6      FlutterBinding._handlePointerPacket (packages/flutter/src/rendering/binding.dart:222)\r\nandroid: E/flutter : #7      _dispatchPointerPacket (file:///src/flutter/engine/src/out/android_Release/gen/sky/bindings/Customhooks.dart:30)\r\n```\r\n\r\nThis might be user error, but my code doesn't have anything to do with handling a tap, so I wouldn't expect an exception to be thrown."},"comment":{"url":"https://api.github.com/repos/flutter/flutter/issues/comments/159143962","html_url":"https://github.com/flutter/flutter/issues/566#issuecomment-159143962","issue_url":"https://api.github.com/repos/flutter/flutter/issues/566","id":159143962,"user":{"login":"abarth","id":112007,"avatar_url":"https://avatars.githubusercontent.com/u/112007?v=3","gravatar_id":"","url":"https://api.github.com/users/abarth","html_url":"https://github.com/abarth","followers_url":"https://api.github.com/users/abarth/followers","following_url":"https://api.github.com/users/abarth/following{/other_user}","gists_url":"https://api.github.com/users/abarth/gists{/gist_id}","starred_url":"https://api.github.com/users/abarth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abarth/subscriptions","organizations_url":"https://api.github.com/users/abarth/orgs","repos_url":"https://api.github.com/users/abarth/repos","events_url":"https://api.github.com/users/abarth/events{/privacy}","received_events_url":"https://api.github.com/users/abarth/received_events","type":"User","site_admin":false},"created_at":"2015-11-24T04:00:32Z","updated_at":"2015-11-24T04:00:32Z","body":"This code is crazy.  It should assert much earlier than that.  Have you tried running it in checked mode?"}}