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

The null object does not have a method 'accept'. #25092

Closed
zoechi opened this issue Dec 2, 2015 · 3 comments
Closed

The null object does not have a method 'accept'. #25092

zoechi opened this issue Dec 2, 2015 · 3 comments
Assignees
Labels
analyzer-linter Issues with the analyzer's support for the linter package area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. P1 A high priority bug; for example, a single project is unusable or has many test failures

Comments

@zoechi
Copy link
Contributor

zoechi commented Dec 2, 2015

https://github.com/bwu-dart/bwu_polymer_routing polymer1 branch
is a repo.
I run pub run grinder (with strong-mode disabled, not tried with strong-mode enabled)

myuser@mypc ~/dart/bwu_polymer_routing
(polymer1) $ pub run grinder
Wrong script snapshot version, expected '3acc9c3982c3d8bb80ce2ca34a4be0fa' found '0cf29d77ab95cd4861fbb07ce569ae91'
grinder running [analyze] [check-format] [lint] [test] [check]

[analyze]
dartanalyzer lib/di.dart lib/static_keys.dart lib/bind_view.dart lib/module.dart lib/bind_route.dart test/some_test.dart
tool/grind.dart
Analyzing [lib/di.dart, lib/static_keys.dart, lib/bind_view.dart, lib/module.dart, lib/bind_route.dart, test/some_test.d
art, tool/grind.dart]...
Unhandled exception:
AnalysisException: Cannot compute DART_ERRORS for /home/myuser/dart/bwu_polymer_routing/lib/di.dart
Caused by Unexpected exception while performing GenerateLintsTask for source /home/myuser/dart/bwu_polymer_routing/lib/d
i.dart
#0 AnalysisTask._safelyPerform (package:analyzer/task/model.dart:320)
#57147 AnalysisTask.perform (package:analyzer/task/model.dart:210)
#57148 AnalysisDriver.performWorkItem (package:analyzer/src/task/driver.dart:272)
#57149 AnalysisDriver.computeResult (package:analyzer/src/task/driver.dart:110)
#57150 AnalysisContextImpl.computeResult (package:analyzer/src/context/context.dart:675)
#57151 AnalysisContextImpl.computeErrors (package:analyzer/src/context/context.dart:608)
#57152 AnalyzerImpl.prepareErrors (package:analyzer_cli/src/analyzer_impl.dart:125)
#57153 AnalyzerImpl._analyzeSync (package:analyzer_cli/src/analyzer_impl.dart:161)
#57154 AnalyzerImpl.analyzeSync (package:analyzer_cli/src/analyzer_impl.dart:119)
#57155 Driver._runAnalyzer (package:analyzer_cli/src/driver.dart:516)
#57156 Driver._analyzeAll (package:analyzer_cli/src/driver.dart:168)
#57157 Driver.start (package:analyzer_cli/src/driver.dart:107)
#57158 main (file:///mnt/data/b/build/slave/dart-sdk-linux-be/build/sdk/pkg/analyzer_cli/bin/analyzer.dart:14)
#57159 _startIsolate. (dart:isolate-patch/isolate_patch.dart:259)
#57160 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:148)

Caused by The null object does not have a method 'accept'.

NoSuchMethodError: method not found: 'accept'
Receiver: null
Arguments: [Instance of '_VisitoHelper']
#0 Object._noSuchMethod (dart:core-patch/object_patch.dart:42)
#57147 Object.noSuchMethod (dart:core-patch/object_patch.dart:45)
#57148 Visitor.visitMethodDeclaration (package:linter/src/rules/type_annotate_public_apis.dart:101)
#57149 DelegatingAstVisitor.visitMethodDeclaration. (package:analyzer/src/generated/visitors.dart:47
5)
#57150 Iterable.forEach (dart:core/iterable.dart:218)
#57151 DelegatingAstVisitor.visitMethodDeclaration (package:analyzer/src/generated/visitors.dart:475)
#57152 MethodDeclaration.accept (package:analyzer/src/generated/ast.dart:12173)
#57153 NodeList.accept (package:analyzer/src/generated/ast.dart:12778)
#57154 ClassDeclaration.visitChildren (package:analyzer/src/generated/ast.dart:4419)
#57155 DelegatingAstVisitor.visitClassDeclaration (package:analyzer/src/generated/visitors.dart:116)
#57156 ClassDeclaration.accept (package:analyzer/src/generated/ast.dart:4349)
#57157 NodeList.accept (package:analyzer/src/generated/ast.dart:12778)
#57158 CompilationUnit.visitChildren (package:analyzer/src/generated/ast.dart:4975)
#57159 DelegatingAstVisitor.visitCompilationUnit (package:analyzer/src/generated/visitors.dart:144)
#57160 CompilationUnit.accept (package:analyzer/src/generated/ast.dart:4968)
#57161 GenerateLintsTask.internalPerform (package:analyzer/src/task/dart.dart:2822)
#57162 AnalysisTask._safelyPerform (package:analyzer/task/model.dart:310)
#57163 AnalysisTask.perform (package:analyzer/task/model.dart:210)
#57164 AnalysisDriver.performWorkItem (package:analyzer/src/task/driver.dart:272)
#57165 AnalysisDriver.computeResult (package:analyzer/src/task/driver.dart:110)
#57166 AnalysisContextImpl.computeResult (package:analyzer/src/context/context.dart:675)
#57167 AnalysisContextImpl.computeErrors (package:analyzer/src/context/context.dart:608)
#57168 AnalyzerImpl.prepareErrors (package:analyzer_cli/src/analyzer_impl.dart:125)
#57169 AnalyzerImpl._analyzeSync (package:analyzer_cli/src/analyzer_impl.dart:161)
#57170 AnalyzerImpl.analyzeSync (package:analyzer_cli/src/analyzer_impl.dart:119)
#57171 Driver._runAnalyzer (package:analyzer_cli/src/driver.dart:516)
#57172 Driver._analyzeAll (package:analyzer_cli/src/driver.dart:168)
#57173 Driver.start (package:analyzer_cli/src/driver.dart:107)
#57174 main (file:///mnt/data/b/build/slave/dart-sdk-linux-be/build/sdk/pkg/analyzer_cli/bin/analyzer.dart:14)
#57175 _startIsolate. (dart:isolate-patch/isolate_patch.dart:259)
#57176 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:148)

#0 AnalysisContextImpl.computeResult (package:analyzer/src/context/context.dart:679)
#57147 AnalysisContextImpl.computeErrors (package:analyzer/src/context/context.dart:608)
#57148 AnalyzerImpl.prepareErrors (package:analyzer_cli/src/analyzer_impl.dart:125)
#57149 AnalyzerImpl._analyzeSync (package:analyzer_cli/src/analyzer_impl.dart:161)
#57150 AnalyzerImpl.analyzeSync (package:analyzer_cli/src/analyzer_impl.dart:119)
#57151 Driver._runAnalyzer (package:analyzer_cli/src/driver.dart:516)
#57152 Driver._analyzeAll (package:analyzer_cli/src/driver.dart:168)
#57153 Driver.start (package:analyzer_cli/src/driver.dart:107)
#57154 main (file:///mnt/data/b/build/slave/dart-sdk-linux-be/build/sdk/pkg/analyzer_cli/bin/analyzer.dart:14)
#57155 _startIsolate. (dart:isolate-patch/isolate_patch.dart:259)
#57156 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:148)

dartanalyzer failed with:
exit code: 255

stdout:

Analyzing [lib/di.dart, lib/static_keys.dart, lib/bind_view.dart, lib/module.dart, lib/bind_route.dart, test/some_test.dart, tool/grind.dart]...

stderr:

Unhandled exception:
AnalysisException: Cannot compute DART_ERRORS for /home/myuser/dart/bwu_polymer_routing/lib/di.dart
Caused by Unexpected exception while performing GenerateLintsTask for source /home/myuser/dart/bwu_polymer_routing/lib/di.dart

0 AnalysisTask._safelyPerform (package:analyzer/task/model.dart:320)

1 AnalysisTask.perform (package:analyzer/task/model.dart:210)

2 AnalysisDriver.performWorkItem (package:analyzer/src/task/driver.dart:272)

3 AnalysisDriver.computeResult (package:analyzer/src/task/driver.dart:110)

4 AnalysisContextImpl.computeResult (package:analyzer/src/context/context.dart:675)

5 AnalysisContextImpl.computeErrors (package:analyzer/src/context/context.dart:608)

6 AnalyzerImpl.prepareErrors (package:analyzer_cli/src/analyzer_impl.dart:125)

7 AnalyzerImpl._analyzeSync (package:analyzer_cli/src/analyzer_impl.dart:161)

8 AnalyzerImpl.analyzeSync (package:analyzer_cli/src/analyzer_impl.dart:119)

9 Driver._runAnalyzer (package:analyzer_cli/src/driver.dart:516)

10 Driver._analyzeAll (package:analyzer_cli/src/driver.dart:168)

11 Driver.start (package:analyzer_cli/src/driver.dart:107)

12 main (file:///mnt/data/b/build/slave/dart-sdk-linux-be/build/sdk/pkg/analyzer_cli/bin/analyzer.dart:14)

13 _startIsolate. (dart:isolate-patch/isolate_patch.dart:259)

14 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:148)

Caused by The null object does not have a method 'accept'.

NoSuchMethodError: method not found: 'accept'
Receiver: null
Arguments: [Instance of '_VisitoHelper']

0 Object._noSuchMethod (dart:core-patch/object_patch.dart:42)

1 Object.noSuchMethod (dart:core-patch/object_patch.dart:45)

2 Visitor.visitMethodDeclaration (package:linter/src/rules/type_annotate_public_apis.dart:101)

3 DelegatingAstVisitor.visitMethodDeclaration. (package:analyzer/src/generated/visitors.dart:475)

4 Iterable.forEach (dart:core/iterable.dart:218)

5 DelegatingAstVisitor.visitMethodDeclaration (package:analyzer/src/generated/visitors.dart:475)

6 MethodDeclaration.accept (package:analyzer/src/generated/ast.dart:12173)

7 NodeList.accept (package:analyzer/src/generated/ast.dart:12778)

8 ClassDeclaration.visitChildren (package:analyzer/src/generated/ast.dart:4419)

9 DelegatingAstVisitor.visitClassDeclaration (package:analyzer/src/generated/visitors.dart:116)

10 ClassDeclaration.accept (package:analyzer/src/generated/ast.dart:4349)

11 NodeList.accept (package:analyzer/src/generated/ast.dart:12778)

12 CompilationUnit.visitChildren (package:analyzer/src/generated/ast.dart:4975)

13 DelegatingAstVisitor.visitCompilationUnit (package:analyzer/src/generated/visitors.dart:144)

14 CompilationUnit.accept (package:analyzer/src/generated/ast.dart:4968)

15 GenerateLintsTask.internalPerform (package:analyzer/src/task/dart.dart:2822)

16 AnalysisTask._safelyPerform (package:analyzer/task/model.dart:310)

17 AnalysisTask.perform (package:analyzer/task/model.dart:210)

18 AnalysisDriver.performWorkItem (package:analyzer/src/task/driver.dart:272)

19 AnalysisDriver.computeResult (package:analyzer/src/task/driver.dart:110)

20 AnalysisContextImpl.computeResult (package:analyzer/src/context/context.dart:675)

21 AnalysisContextImpl.computeErrors (package:analyzer/src/context/context.dart:608)

22 AnalyzerImpl.prepareErrors (package:analyzer_cli/src/analyzer_impl.dart:125)

23 AnalyzerImpl._analyzeSync (package:analyzer_cli/src/analyzer_impl.dart:161)

24 AnalyzerImpl.analyzeSync (package:analyzer_cli/src/analyzer_impl.dart:119)

25 Driver._runAnalyzer (package:analyzer_cli/src/driver.dart:516)

26 Driver._analyzeAll (package:analyzer_cli/src/driver.dart:168)

27 Driver.start (package:analyzer_cli/src/driver.dart:107)

28 main (file:///mnt/data/b/build/slave/dart-sdk-linux-be/build/sdk/pkg/analyzer_cli/bin/analyzer.dart:14)

29 _startIsolate. (dart:isolate-patch/isolate_patch.dart:259)

30 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:148)

0 AnalysisContextImpl.computeResult (package:analyzer/src/context/context.dart:679)

1 AnalysisContextImpl.computeErrors (package:analyzer/src/context/context.dart:608)

2 AnalyzerImpl.prepareErrors (package:analyzer_cli/src/analyzer_impl.dart:125)

3 AnalyzerImpl._analyzeSync (package:analyzer_cli/src/analyzer_impl.dart:161)

4 AnalyzerImpl.analyzeSync (package:analyzer_cli/src/analyzer_impl.dart:119)

5 Driver._runAnalyzer (package:analyzer_cli/src/driver.dart:516)

6 Driver._analyzeAll (package:analyzer_cli/src/driver.dart:168)

7 Driver.start (package:analyzer_cli/src/driver.dart:107)

8 main (file:///mnt/data/b/build/slave/dart-sdk-linux-be/build/sdk/pkg/analyzer_cli/bin/analyzer.dart:14)

9 _startIsolate. (dart:isolate-patch/isolate_patch.dart:259)

10 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:148)

0 run (package:grinder/src/run.dart:46:5)

1 Analyzer.analyze (package:grinder/grinder_sdk.dart:349:5)

2 main. (file:///home/myuser/dart/bwu_polymer_routing/tool/grind.dart:13:35)

3 analyze (package:bwu_grinder_tasks/bwu_grinder_tasks.dart:22:25)

4 _LocalLibraryMirror._invoke (dart:mirrors-patch/mirrors_impl.dart:1286)

5 _LocalObjectMirror.invoke (dart:mirrors-patch/mirrors_impl.dart:364)

6 TaskDiscovery.discoverDeclaration. (package:grinder/src/discover_tasks.dart:79:38)

7 _rootRun (dart:async/zone.dart:907)

8 _CustomZone.run (dart:async/zone.dart:802)

9 runZoned (dart:async/zone.dart:1245)

10 ZonedValue.withValue (package:grinder/src/utils.dart:115:12)

11 GrinderTask.execute (package:grinder/grinder.dart:189:27)

12 Grinder._executeTask (package:grinder/grinder.dart:404:23)

13 Grinder.start. (package:grinder/grinder.dart:379:16)

14 Future.forEach.. (dart:async/future.dart:336)

15 Future.Future.sync (dart:async/future.dart:168)

16 Future.forEach. (dart:async/future.dart:336)

17 Future.Future.sync (dart:async/future.dart:168)

18 Future.doWhile. (dart:async/future.dart:361)

19 _RootZone.runUnaryGuarded (dart:async/zone.dart:1087)

20 _RootZone.bindUnaryCallback. (dart:async/zone.dart:1116)

21 Future.doWhile (dart:async/future.dart:367)

22 Future.forEach (dart:async/future.dart:334)

23 Grinder.start (package:grinder/grinder.dart:378:21)

24 cli (package:grinder/src/cli.dart:67:39)

25 Function._apply (dart:core-patch/function_patch.dart:7)

26 Function.apply (dart:core-patch/function_patch.dart:28)

27 FunctionScript._getTopCommandResult (package:unscripted/src/script_impl.dart:156:67)

28 DeclarationScript._handleResults (package:unscripted/src/script_impl.dart:107:21)

29 ScriptImpl.execute.. (package:unscripted/src/script_impl.dart:49:11)

.

Dart VM version: 1.14.0-edge.d0ea4371c9bab943b31b41299e1627e48a22e1f3 (Tue Dec 1 17:47:48 2015) on "linux_x64"

.

Wrong script snapshot version

seems unrelated. When I run again I get the same exception.

@zoechi
Copy link
Contributor Author

zoechi commented Dec 2, 2015

just saw, looks like #57247

@bwilkerson bwilkerson added Type-Defect P1 A high priority bug; for example, a single project is unusable or has many test failures area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. analyzer-linter Issues with the analyzer's support for the linter package labels Dec 2, 2015
@pq
Copy link
Member

pq commented Dec 2, 2015

just saw, looks like #57247

Yep. Thanks @zoechi! 👍

@pq pq closed this as completed in 94f7322 Dec 2, 2015
@pq
Copy link
Member

pq commented Dec 2, 2015

Fixed in dart-lang/linter@978780d, published as version 0.1.9 to pub, landed in the SDK as of 94f7322.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
analyzer-linter Issues with the analyzer's support for the linter package area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. P1 A high priority bug; for example, a single project is unusable or has many test failures
Projects
None yet
Development

No branches or pull requests

3 participants