Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Intermittent NoSuchMethodError in Flutter unit test #29230

Closed
jason-simmons opened this issue Apr 3, 2017 · 1 comment
Closed

Intermittent NoSuchMethodError in Flutter unit test #29230

jason-simmons opened this issue Apr 3, 2017 · 1 comment
Labels
area-vm Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends.

Comments

@jason-simmons
Copy link
Contributor

One of the Flutter unit tests is occasionally failing with a NoSuchMethodError in an unexpected place.

Log at https://build.chromium.org/p/client.flutter/builders/Mac/builds/3140/steps/test.dart/logs/stdio
(search for "Card Collection smoke test")

To reproduce it, go to dev/manual_tests in the Flutter source tree and run:
../../bin/flutter test

I usually need to run the test 10-20 times to reproduce a failure.

The failure starts with a stack trace like:
The following NoSuchMethodError was thrown during performLayout():
Class 'int' has no instance getter 'offstage'.
Receiver: 0
Tried calling: offstage

When the exception was thrown, this was the stack:
#0      Object._noSuchMethod (dart:core-patch/object_patch.dart:43)
#1      Object.noSuchMethod (dart:core-patch/object_patch.dart:47)
#2      RenderBox._computeIntrinsicDimension (package:flutter/src/rendering/box.dart:985:20)
...

_computeIntrinsicDimension should be calling RenderOffstage.computeMinIntrinsicWidth, which reads the "offstage" property of the "this" object. Most of the time this works as expected, but in a failing run it looks like "offstage" is being read from an int.

@a-siva a-siva added the area-vm Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends. label Apr 3, 2017
Hixie added a commit to Hixie/flutter that referenced this issue Apr 4, 2017
Hixie added a commit to flutter/flutter that referenced this issue Apr 5, 2017
@rmacnak-google
Copy link
Contributor

The background compiler and the mutator are racing creating the implicit closure for the tear off of computeMinIntrinsicWidth. One of them wins the race and becomes the one pointed to by the parent function, and the loser now incorrectly believes it is not an implicit closure function.

Shell: thread=0x7fefec0009b0 create implicit closure for RenderOffstage.computeMinIntrinsicWidth
Shell: thread=0x7feffc0f0af0 create implicit closure for RenderOffstage.computeMinIntrinsicWidth
Shell: thread=0x7feffc0f0af0 RenderOffstage.computeMinIntrinsicWidth_computeMinIntrinsicWidth is_implicit=0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-vm Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends.
Projects
None yet
Development

No branches or pull requests

3 participants