Skip to content

Analyzer crash on new language_strong tests #29030

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

Closed
vsmenon opened this issue Mar 10, 2017 · 4 comments
Closed

Analyzer crash on new language_strong tests #29030

vsmenon opened this issue Mar 10, 2017 · 4 comments
Labels
legacy-area-analyzer Use area-devexp instead. P2 A bug or feature request we're likely to work on type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)

Comments

@vsmenon
Copy link
Member

vsmenon commented Mar 10, 2017

I'm seeing dartanalyzer crashes on recently added tests:

dartanalyzer --strong tests/language_strong/generic_methods_generic_class_tearoff_test.dart 
Analyzing [tests/language_strong/generic_methods_generic_class_tearoff_test.dart]...
Unhandled exception:
NoSuchMethodError: The getter 'name' was called on null.
Receiver: null
Tried calling: name
#0      Object._noSuchMethod (dart:core-patch/object_patch.dart:44)
#1      Object.noSuchMethod (dart:core-patch/object_patch.dart:47)
#2      _SummarizeAstVisitor.serializeParameter (package:analyzer/src/summary/summarize_ast.dart:804)
#3      _SummarizeAstVisitor.visitSimpleFormalParameter (package:analyzer/src/summary/summarize_ast.dart:1377)
#4      SimpleFormalParameterImpl.accept (package:analyzer/src/dart/ast/ast.dart:9284)
#5      NodeListImpl.accept (package:analyzer/src/dart/ast/ast.dart:8044)
#6      FormalParameterListImpl.visitChildren (package:analyzer/src/dart/ast/ast.dart:4846)
#7      RecursiveAstVisitor.visitFormalParameterList (package:analyzer/dart/ast/visitor.dart:845)
#8      FormalParameterListImpl.accept (package:analyzer/src/dart/ast/ast.dart:4842)
#9      GenericFunctionTypeImpl.visitChildren (package:analyzer/src/dart/ast/ast.dart:5773)
#10     RecursiveAstVisitor.visitGenericFunctionType (package:analyzer/dart/ast/visitor.dart:893)
#11     GenericFunctionTypeImpl.accept (package:analyzer/src/dart/ast/ast.dart:5766)
#12     GenericTypeAliasImpl.visitChildren (package:analyzer/src/dart/ast/ast.dart:5856)
#13     RecursiveAstVisitor.visitGenericTypeAlias (package:analyzer/dart/ast/visitor.dart:899)
#14     GenericTypeAliasImpl.accept (package:analyzer/src/dart/ast/ast.dart:5847)
#15     NodeListImpl.accept (package:analyzer/src/dart/ast/ast.dart:8044)
#16     _SummarizeAstVisitor.serializeCompilationUnit (package:analyzer/src/summary/summarize_ast.dart:520)
#17     serializeAstUnlinked (package:analyzer/src/summary/summarize_ast.dart:22)
#18     FileState.refresh.<anonymous closure> (package:analyzer/src/dart/analysis/file_state.dart:403)
#19     PerformanceLog.run (package:analyzer/src/dart/analysis/driver.dart:1642)
#20     FileState.refresh (package:analyzer/src/dart/analysis/file_state.dart:402)
#21     FileSystemState.getFileForPath (package:analyzer/src/dart/analysis/file_state.dart:638)
#22     AnalysisDriver.getSourceKind (package:analyzer/src/dart/analysis/driver.dart:595)
<asynchronous suspension>
#23     Driver._analyzeAllImpl (package:analyzer_cli/src/driver.dart:233)
<asynchronous suspension>
#24     Driver._analyzeAll (package:analyzer_cli/src/driver.dart:170)
<asynchronous suspension>
#25     Driver.start (package:analyzer_cli/src/driver.dart:149)
<asynchronous suspension>
#26     main (file:///b/build/slave/dart-sdk-mac-dev/build/sdk/pkg/analyzer_cli/bin/analyzer.dart:11)
@vsmenon
Copy link
Member Author

vsmenon commented Mar 10, 2017

FYI, tests were introduced here:

https://codereview.chromium.org/2737933002

@bwilkerson @leafpetersen @stefantsov

@leafpetersen
Copy link
Member

I think the analyzer is crashing on the new function type syntax. This snippet seems to cause the same crash:

typedef Foo = int Function();

what's the status of this syntax? Is it still behind a flag?

@bwilkerson
Copy link
Member

It is not complete yet, but it is being worked on (#27969).

@bwilkerson bwilkerson added P2 A bug or feature request we're likely to work on type-bug Incorrect behavior (everything from a crash to more subtle misbehavior) labels Mar 13, 2017
@chloestefantsova
Copy link
Contributor

Originally I put the names of the new tests into tests/language_strong/language_strong.status file and marked them with Skip, but then moved the lines to tests/language_strong/language_strong_kernel.status and marked them with whatever status they run into currently. Perhaps, that's why that issue wasn't caught by the reviewers. Sorry for that!

This is fixed recently by @johnniwinther in this commit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
legacy-area-analyzer Use area-devexp instead. P2 A bug or feature request we're likely to work on type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)
Projects
None yet
Development

No branches or pull requests

4 participants