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

analysis server crash #36031

Closed
gururangan77 opened this issue Feb 26, 2019 · 3 comments
Closed

analysis server crash #36031

gururangan77 opened this issue Feb 26, 2019 · 3 comments
Labels
analyzer-server area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion.

Comments

@gururangan77
Copy link

Analysis server version: 1.21.1
Dart SDK: 2.1.1-dev.0.1.flutter-ec86471ccc (Thu Jan 3 22:43:43 2019 +0000) on "windows_x64"
Android Studio 3.3.1 on Windows,

Stopped recognizing a particular type. Issue persisted even after multiple restarts, and crashed when used Ctrl+X to see if the problem goes away. The name of the type having problem is at the top of the stack trace below, pasting the type definition here if it helps..

class SwaraTarget{
static final int groupStartMarker = -1000;
static final int groupEndMarker = -2000;
final int group;
final int index;
final int swara;
final int ticks;
SwaraTarget(this.swara, {this.group, this.index, this.ticks} );
}

Exceptions
Exceptions from the analysis server.

Exception Exception: Element not found in summary: package:practice_app/main.dart;package:practice_app/graders.dart;SwaraTarget #0 SummaryResynthesizer.getElement (package:analyzer/src/summary/resynthesize.dart:314:9) #1 ElementHandle.actualElement (package:analyzer/src/dart/element/handle.dart:353:42) #2 ClassElementHandle.actualElement (package:analyzer/src/dart/element/handle.dart:34:43) #3 ClassElementHandle.type (package:analyzer/src/dart/element/handle.dart:113:29) #4 _ReferenceInfo._buildType (package:analyzer/src/summary/resynthesize.dart:1006:24) #5 _ReferenceInfo.type (package:analyzer/src/summary/resynthesize.dart:952:15) #6 _ReferenceInfo.buildType (package:analyzer/src/summary/resynthesize.dart:977:15) #7 _UnitResynthesizer.buildType (package:analyzer/src/summary/resynthesize.dart:1372:28) #8 _UnitResynthesizer.buildType.getTypeArgument (package:analyzer/src/summary/resynthesize.dart:1360:18) #9 _ReferenceInfo._buildTypeArguments (package:analyzer/src/summary/resynthesize.dart:1140:43) #10 _ReferenceInfo._buildType (package:analyzer/src/summary/resynthesize.dart:1008:25) #11 _ReferenceInfo.buildType (package:analyzer/src/summary/resynthesize.dart:978:15) #12 _UnitResynthesizer.buildType (package:analyzer/src/summary/resynthesize.dart:1372:28) #13 SummaryResynthesizerContext.resolveTypeRef (package:analyzer/src/summary/resynthesize.dart:472:30) #14 NonParameterVariableElementImpl.type (package:analyzer/src/dart/element/element.dart:6744:12) #15 PropertyInducingElementImpl.type (package:analyzer/src/dart/element/element.dart:7629:18) #16 DeclarationResolver.visitVariableDeclarationList (package:analyzer/src/generated/declaration_resolver.dart:474:56) #17 VariableDeclarationListImpl.accept (package:analyzer/src/dart/ast/ast.dart:11610:15) #18 FieldDeclarationImpl.visitChildren (package:analyzer/src/dart/ast/ast.dart:4395:17) #19 RecursiveAstVisitor.visitFieldDeclaration (package:analyzer/dart/ast/visitor.dart:835:10) #20 DeclarationResolver.visitFieldDeclaration (package:analyzer/src/generated/declaration_resolver.dart:195:11) #21 FieldDeclarationImpl.accept (package:analyzer/src/dart/ast/ast.dart:4390:49) #22 NodeListImpl.accept (package:analyzer/src/dart/ast/ast.dart:8366:20) #23 ClassDeclarationImpl.visitChildren (package:analyzer/src/dart/ast/ast.dart:1795:13) #24 RecursiveAstVisitor.visitClassDeclaration (package:analyzer/dart/ast/visitor.dart:691:10) #25 DeclarationResolver.visitClassDeclaration. (package:analyzer/src/generated/declaration_resolver.dart:87:13) #26 DeclarationResolver._walk (package:analyzer/src/generated/declaration_resolver.dart:541:13) #27 DeclarationResolver.visitClassDeclaration (package:analyzer/src/generated/declaration_resolver.dart:86:5) #28 ClassDeclarationImpl.accept (package:analyzer/src/dart/ast/ast.dart:1765:49) #29 NodeListImpl.accept (package:analyzer/src/dart/ast/ast.dart:8366:20) #30 CompilationUnitImpl.visitChildren (package:analyzer/src/dart/ast/ast.dart:2437:21) #31 RecursiveAstVisitor.visitCompilationUnit (package:analyzer/dart/ast/visitor.dart:715:10) #32 CompilationUnitImpl.accept (package:analyzer/src/dart/ast/ast.dart:2430:49) #33 DeclarationResolver.resolve (package:analyzer/src/generated/declaration_resolver.dart:49:12) #34 LibraryAnalyzer._resolveFile (package:analyzer/src/dart/analysis/library_analyzer.dart:597:31) #35 LibraryAnalyzer.analyzeSync. (package:analyzer/src/dart/analysis/library_analyzer.dart:118:7) #36 __InternalLinkedHashMap&_HashVMBase&MapMixin&_LinkedHashMapMixin.forEach (dart:collection/runtime/libcompact_hash.dart:367:8) #37 LibraryAnalyzer.analyzeSync (package:analyzer/src/dart/analysis/library_analyzer.dart:117:11) #38 LibraryAnalyzer.analyze. (package:analyzer/src/dart/analysis/library_analyzer.dart:91:14) #39 _PerformanceTagImpl.makeCurrentWhile (package:analyzer/src/generated/utilities_general.dart:258:15) #40 LibraryAnalyzer.analyze (package:analyzer/src/dart/analysis/library_analyzer.dart:90:43) #41 AnalysisDriver._computeAnalysisResult. (package:analyzer/src/dart/analysis/driver.dart:1431:63) #42 PerformanceLog.run (package:analyzer/src/dart/analysis/performance_logger.dart:34:15) #43 AnalysisDriver._computeAnalysisResult (package:analyzer/src/dart/analysis/driver.dart:1409:20) #44 AnalysisDriver.performWork (package:analyzer/src/dart/analysis/driver.dart:1203:17) #45 AnalysisDriverScheduler._run (package:analyzer/src/dart/analysis/driver.dart:2116:24) #46 AnalysisDriverScheduler.start (package:analyzer/src/dart/analysis/driver.dart:2057:5) #47 new AnalysisServer (package:analysis_server/src/analysis_server.dart:236:29) #48 SocketServer.createAnalysisServer (package:analysis_server/src/socket_server.dart:79:26) #49 StdioAnalysisServer.serveStdio (package:analysis_server/src/server/stdio_server.dart:37:18) #50 Driver.startAnalysisServer. (package:analysis_server/src/server/driver.dart:519:21) #51 _rootRun (dart:async/zone.dart:1124:13) #52 _CustomZone.run (dart:async/zone.dart:1021:19) #53 _runZoned (dart:async/zone.dart:1516:10) #54 runZoned (dart:async/zone.dart:1463:12) #55 Driver._captureExceptions (package:analysis_server/src/server/driver.dart:585:12) #56 Driver.startAnalysisServer (package:analysis_server/src/server/driver.dart:517:7) #57 Driver.start (package:analysis_server/src/server/driver.dart:414:7) #58 main (file:///E:/b/rr/tmpqlvyqu/w/src/third_party/dart/pkg/analysis_server/bin/server.dart:12:11) #59 _AsyncAwaitCompleter.start (dart:async/runtime/libasync_patch.dart:49:6) #60 main (file:///E:/b/rr/tmpqlvyqu/w/src/third_party/dart/pkg/analysis_server/bin/server.dart:10:10) #61 _startIsolate. (dart:isolate/runtime/libisolate_patch.dart:287:32) #62 _RawReceivePortImpl._handleMessage (dart:isolate/runtime/libisolate_patch.dart:171:12)

@gururangan77
Copy link
Author

analysis_options.yaml
analyzer:
strong-mode:
implicit-casts: false
implicit-dynamic: false
errors:
exclude:
- flutter/**
- lib/api/*.dart

@gururangan77
Copy link
Author

gururangan77 commented Feb 26, 2019

Turns out it was due to a function declaration returning SwaraTarget[] instead of List<>. This threw the analyzer off, strangely none of the errors it generated pointed me to the above problematic statement.

@kevmoo kevmoo added area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. analyzer-server labels Feb 27, 2019
@kevmoo kevmoo changed the title dart analyzer analysis server crash Feb 27, 2019
@stereotype441
Copy link
Member

Duplicate of #35620

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
analyzer-server area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion.
Projects
None yet
Development

No branches or pull requests

3 participants