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

Dart analyzer is crashing #31357

Closed
amirh opened this Issue Nov 10, 2017 · 4 comments

Comments

Projects
None yet
4 participants
@amirh

amirh commented Nov 10, 2017

Dart analyzer (run via flutter analyze on packages/flutter in the flutter repo) is crashing consistently on my machine:

command

flutter analyze --verbose

exception

AnalysisException: AnalysisException: Cannot compute DART_ERRORS for /usr/local/google/home/amirha/git/flutter/dev/integration_tests/flavors/lib/main.dart
Caused by Unexpected exception while performing ResolveUnitTypeNamesTask for source /usr/local/google/home/amirha/.pub-cache/hosted/pub.dartlang.org/test-0.12.27+1/lib/src/backend/invoker.dart
#0      AnalysisTask._safelyPerform (package:analyzer/task/model.dart:333)
#1      AnalysisTask.perform (package:analyzer/task/model.dart:220)
#2      AnalysisDriver.performWorkItem (package:analyzer/src/task/driver.dart:287)
#3      AnalysisDriver.computeResult (package:analyzer/src/task/driver.dart:112)
#4      AnalysisContextImpl.computeResult (package:analyzer/src/context/context.dart:720)
#5      AnalysisContextImpl.computeErrors (package:analyzer/src/context/context.dart:663)
#6      AnalysisDriver._analyze (package:flutter_tools/src/dart/analysis.dart:87)
#7      AnalysisDriver.analyze (package:flutter_tools/src/dart/analysis.dart:51)
#8      AnalyzeOnce.analyze (package:flutter_tools/src/commands/analyze_once.dart:154)
<asynchronous suspension>
#9      AnalyzeCommand.runCommand (package:flutter_tools/src/commands/analyze.dart:62)
#10     FlutterCommand.verifyThenRunCommand (package:flutter_tools/src/runner/flutter_command.dart:253)
<asynchronous suspension>
#11     FlutterCommand.run (package:flutter_tools/src/runner/flutter_command.dart:193)
<asynchronous suspension>
#12     CommandRunner.runCommand (package:args/command_runner.dart:194)
<asynchronous suspension>
#13     FlutterCommandRunner.runCommand (package:flutter_tools/src/runner/flutter_command_runner.dart:279)
<asynchronous suspension>
#14     CommandRunner.run.<anonymous closure> (package:args/command_runner.dart:109)
#15     new Future.sync (dart:async/future.dart:222)
#16     CommandRunner.run (package:args/command_runner.dart:109)
#17     FlutterCommandRunner.run (package:flutter_tools/src/runner/flutter_command_runner.dart:162)
#18     run.<anonymous closure> (package:flutter_tools/runner.dart:89)
<asynchronous suspension>
#19     AppContext._run (package:flutter_tools/src/base/context.dart:76)
<asynchronous suspension>
#20     AppContext.runInZone.<anonymous closure> (package:flutter_tools/src/base/context.dart:66)
#21     _rootRun (dart:async/zone.dart:1120)
#22     _CustomZone.run (dart:async/zone.dart:1001)
#23     runZoned (dart:async/zone.dart:1467)
#24     AppContext.runInZone (package:flutter_tools/src/base/context.dart:65)
#25     run (package:flutter_tools/runner.dart:60)
<asynchronous suspension>
#26     main (package:flutter_tools/executable.dart:42)
<asynchronous suspension>
#27     main (file:///usr/local/google/home/amirha/git/flutter/packages/flutter_tools/bin/flutter_tools.dart:16)
#28     _startIsolate.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:263)
#29     _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:151)

Caused by NoSuchMethodError: The getter 'element' was called on null.
Receiver: null
Tried calling: element
#0      Object._noSuchMethod (dart:core-patch/object_patch.dart:42)
#1      Object.noSuchMethod (dart:core-patch/object_patch.dart:46)
#2      TypeResolverVisitor.visitGenericFunctionType (package:analyzer/src/generated/resolver.dart:9666)
#3      GenericFunctionTypeImpl.accept (package:analyzer/src/dart/ast/ast.dart:5732)
#4      VariableDeclarationListImpl.visitChildren (package:analyzer/src/dart/ast/ast.dart:11149)
#5      UnifyingAstVisitor.visitNode (package:analyzer/dart/ast/visitor.dart:3121)
#6      TypeResolverVisitor.visitNode (package:analyzer/src/generated/resolver.dart:9827)
#7      UnifyingAstVisitor.visitVariableDeclarationList (package:analyzer/dart/ast/visitor.dart:3228)
#8      VariableDeclarationListImpl.accept (package:analyzer/src/dart/ast/ast.dart:11144)
#9      FieldDeclarationImpl.visitChildren (package:analyzer/src/dart/ast/ast.dart:4369)
#10     UnifyingAstVisitor.visitNode (package:analyzer/dart/ast/visitor.dart:3121)
#11     TypeResolverVisitor.visitNode (package:analyzer/src/generated/resolver.dart:9827)
#12     UnifyingAstVisitor.visitFieldDeclaration (package:analyzer/dart/ast/visitor.dart:3011)
#13     FieldDeclarationImpl.accept (package:analyzer/src/dart/ast/ast.dart:4364)
#14     TypeResolverVisitor.visitClassMembersInScope (package:analyzer/src/generated/resolver.dart:9528)
#15     ScopedVisitor.visitClassDeclaration (package:analyzer/src/generated/resolver.dart:7081)
#16     TypeResolverVisitor.visitClassDeclaration (package:analyzer/src/generated/resolver.dart:9474)
#17     ClassDeclarationImpl.accept (package:analyzer/src/dart/ast/ast.dart:1906)
#18     NodeListImpl.accept (package:analyzer/src/dart/ast/ast.dart:7990)
#19     CompilationUnitImpl.visitChildren (package:analyzer/src/dart/ast/ast.dart:2502)
#20     UnifyingAstVisitor.visitNode (package:analyzer/dart/ast/visitor.dart:3121)
#21     TypeResolverVisitor.visitNode (package:analyzer/src/generated/resolver.dart:9827)
#22     UnifyingAstVisitor.visitCompilationUnit (package:analyzer/dart/ast/visitor.dart:2949)
#23     CompilationUnitImpl.accept (package:analyzer/src/dart/ast/ast.dart:2495)
#24     ResolveUnitTypeNamesTask.internalPerform (package:analyzer/src/task/dart.dart:5141)
#25     AnalysisTask._safelyPerform (package:analyzer/task/model.dart:321)
#26     AnalysisTask.perform (package:analyzer/task/model.dart:220)
#27     AnalysisDriver.performWorkItem (package:analyzer/src/task/driver.dart:287)
#28     AnalysisDriver.computeResult (package:analyzer/src/task/driver.dart:112)
#29     AnalysisContextImpl.computeResult (package:analyzer/src/context/context.dart:720)
#30     AnalysisContextImpl.computeErrors (package:analyzer/src/context/context.dart:663)
#31     AnalysisDriver._analyze (package:flutter_tools/src/dart/analysis.dart:87)
#32     AnalysisDriver.analyze (package:flutter_tools/src/dart/analysis.dart:51)
#33     AnalyzeOnce.analyze (package:flutter_tools/src/commands/analyze_once.dart:154)
<asynchronous suspension>
#34     AnalyzeCommand.runCommand (package:flutter_tools/src/commands/analyze.dart:62)
#35     FlutterCommand.verifyThenRunCommand (package:flutter_tools/src/runner/flutter_command.dart:253)
<asynchronous suspension>
#36     FlutterCommand.run (package:flutter_tools/src/runner/flutter_command.dart:193)
<asynchronous suspension>
#37     CommandRunner.runCommand (package:args/command_runner.dart:194)
<asynchronous suspension>
#38     FlutterCommandRunner.runCommand (package:flutter_tools/src/runner/flutter_command_runner.dart:279)
<asynchronous suspension>
#39     CommandRunner.run.<anonymous closure> (package:args/command_runner.dart:109)
#40     new Future.sync (dart:async/future.dart:222)
#41     CommandRunner.run (package:args/command_runner.dart:109)
#42     FlutterCommandRunner.run (package:flutter_tools/src/runner/flutter_command_runner.dart:162)
#43     run.<anonymous closure> (package:flutter_tools/runner.dart:89)
<asynchronous suspension>
#44     AppContext._run (package:flutter_tools/src/base/context.dart:76)
<asynchronous suspension>
#45     AppContext.runInZone.<anonymous closure> (package:flutter_tools/src/base/context.dart:66)
#46     _rootRun (dart:async/zone.dart:1120)
#47     _CustomZone.run (dart:async/zone.dart:1001)
#48     runZoned (dart:async/zone.dart:1467)
#49     AppContext.runInZone (package:flutter_tools/src/base/context.dart:65)
#50     run (package:flutter_tools/runner.dart:60)
<asynchronous suspension>
#51     main (package:flutter_tools/executable.dart:42)
<asynchronous suspension>
#52     main (file:///usr/local/google/home/amirha/git/flutter/packages/flutter_tools/bin/flutter_tools.dart:16)
#53     _startIsolate.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:263)
#54     _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:151)


#0      AnalysisContextImpl.computeResult (package:analyzer/src/context/context.dart:725)
#1      AnalysisContextImpl.computeErrors (package:analyzer/src/context/context.dart:663)
#2      AnalysisDriver._analyze (package:flutter_tools/src/dart/analysis.dart:87)
#3      AnalysisDriver.analyze (package:flutter_tools/src/dart/analysis.dart:51)
#4      AnalyzeOnce.analyze (package:flutter_tools/src/commands/analyze_once.dart:154)
<asynchronous suspension>
#5      AnalyzeCommand.runCommand (package:flutter_tools/src/commands/analyze.dart:62)
#6      FlutterCommand.verifyThenRunCommand (package:flutter_tools/src/runner/flutter_command.dart:253)
<asynchronous suspension>
#7      FlutterCommand.run (package:flutter_tools/src/runner/flutter_command.dart:193)
<asynchronous suspension>
#8      CommandRunner.runCommand (package:args/command_runner.dart:194)
<asynchronous suspension>
#9      FlutterCommandRunner.runCommand (package:flutter_tools/src/runner/flutter_command_runner.dart:279)
<asynchronous suspension>
#10     CommandRunner.run.<anonymous closure> (package:args/command_runner.dart:109)
#11     new Future.sync (dart:async/future.dart:222)
#12     CommandRunner.run (package:args/command_runner.dart:109)
#13     FlutterCommandRunner.run (package:flutter_tools/src/runner/flutter_command_runner.dart:162)
#14     run.<anonymous closure> (package:flutter_tools/runner.dart:89)
<asynchronous suspension>
#15     AppContext._run (package:flutter_tools/src/base/context.dart:76)
<asynchronous suspension>
#16     AppContext.runInZone.<anonymous closure> (package:flutter_tools/src/base/context.dart:66)
#17     _rootRun (dart:async/zone.dart:1120)
#18     _CustomZone.run (dart:async/zone.dart:1001)
#19     runZoned (dart:async/zone.dart:1467)
#20     AppContext.runInZone (package:flutter_tools/src/base/context.dart:65)
#21     run (package:flutter_tools/runner.dart:60)
<asynchronous suspension>
#22     main (package:flutter_tools/executable.dart:42)
<asynchronous suspension>
#23     main (file:///usr/local/google/home/amirha/git/flutter/packages/flutter_tools/bin/flutter_tools.dart:16)
#24     _startIsolate.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:263)
#25     _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:151)

flutter doctor

[✓] Flutter (on Linux, locale en_US.UTF-8, channel unknown)
    • Flutter at /usr/local/google/home/amirha/git/flutter
    • Framework revision 98f844ac33 (4 hours ago), 2017-11-10 09:17:52 -0800
    • Engine revision 11d68f63da
    • Tools Dart version 1.25.0-dev.11.0

[✓] Android toolchain - develop for Android devices (Android SDK 26.0.2)
    • Android SDK at /usr/local/google/home/amirha/Android/Sdk
    • Platform android-26, build-tools 26.0.2
    • Java binary at: /usr/local/google/home/amirha/progs/android-studio/jre/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_112-release-b06)

[✓] Android Studio (version 2.3)
    • Android Studio at /opt/android-studio-with-blaze-2.3
    • Java version OpenJDK Runtime Environment (build 1.8.0_112-release-b06)

[✓] Android Studio (version 2.3)
    • Android Studio at /usr/local/google/home/amirha/progs/android-studio
    • Java version OpenJDK Runtime Environment (build 1.8.0_112-release-b06)

[✓] IntelliJ IDEA Community Edition (version 2017.2)
    • Flutter plugin version 18.0
    • Dart plugin version 172.4155.35

[✓] Connected devices
    • Pixel • FA6890301419 • android-arm • Android 8.1.0 (API 27)

@amirh

This comment has been minimized.

Show comment
Hide comment
@amirh

amirh commented Nov 10, 2017

@devoncarew

This comment has been minimized.

Show comment
Hide comment
@devoncarew

devoncarew Nov 15, 2017

Member

@amirh, Flutter's on an older Dart SDK at this point. Can you re-test w/ a more recent one? If you edit bin/internal/dart-sdk.version to contain 2.0.0-dev.7.0, and run bin/internal/update_dart_sdk.sh, you'll get the latest dev dart sdk.

Member

devoncarew commented Nov 15, 2017

@amirh, Flutter's on an older Dart SDK at this point. Can you re-test w/ a more recent one? If you edit bin/internal/dart-sdk.version to contain 2.0.0-dev.7.0, and run bin/internal/update_dart_sdk.sh, you'll get the latest dev dart sdk.

@amirh

This comment has been minimized.

Show comment
Hide comment
@amirh

amirh Nov 16, 2017

I had to blow out my local repository as I was unable to work... so don't have the repro anymore, sorry...

amirh commented Nov 16, 2017

I had to blow out my local repository as I was unable to work... so don't have the repro anymore, sorry...

@MichaelRFairhurst

This comment has been minimized.

Show comment
Hide comment
@MichaelRFairhurst

MichaelRFairhurst Nov 30, 2017

Contributor

Duplicate of #31442 which has more info so I'll close this one.

Thanks for filing!

Contributor

MichaelRFairhurst commented Nov 30, 2017

Duplicate of #31442 which has more info so I'll close this one.

Thanks for filing!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment