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

NPE on _LocalVisitor.declaredGenericTypeAlias (SDK 2.4.0) #37555

Closed
nickolas-pohilets opened this issue Jul 17, 2019 · 1 comment
Closed

NPE on _LocalVisitor.declaredGenericTypeAlias (SDK 2.4.0) #37555

nickolas-pohilets opened this issue Jul 17, 2019 · 1 comment
Labels
analyzer-completion Issues with the analysis server's code completion feature analyzer-crash-report Issues which have been reported due to an analysis server crash area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion.

Comments

@nickolas-pohilets
Copy link

nickolas-pohilets commented Jul 17, 2019

Analyzer Feedback from IntelliJ

Version information

  • IDEA IU-182.4129.33
  • 2.4.0
  • IU-182.4129.33, JRE 1.8.0_152-release-1248-b8x64 JetBrains s.r.o, OS Mac OS X(x86_64) v10.14.5 unknown, screens 1440x900 Retina

Exception

Dart analysis server, SDK version 2.4.0, server version 1.27.1, error: Failed to handle completion domain request: {id: 5535, method: completion.getSuggestions, params: {file: /Users/user/project/lib/ui/nav.dart, offset: 2626}, clientRequestTime: 1563398498325}
NoSuchMethodError: The getter 'returnType' was called on null.
Receiver: null
Tried calling: returnType
#0      Object.noSuchMethod (dart:core-patch/object_patch.dart:50:5)
#1      _LocalVisitor.declaredGenericTypeAlias (package:analysis_server/src/services/completion/dart/local_reference_contributor.dart:237:36)
#2      LocalDeclarationVisitor.visitCompilationUnit.<anonymous closure> (package:analyzer_plugin/src/utilities/visitors/local_declaration_visitor.dart:130:9)
#3      _NodeListImpl
Dart analysis server, SDK version 2.4.0, server version 1.27.1, error: Failed to handle completion domain request: {id: 5535, method: completion.getSuggestions, params: {file: /Users/user/project/lib/ui/nav.dart, offset: 2626}, clientRequestTime: 1563398498325}
NoSuchMethodError: The getter 'returnType' was called on null.
Receiver: null
Tried calling: returnType
#0      Object.noSuchMethod (dart:core-patch/object_patch.dart:50:5)
#1      _LocalVisitor.declaredGenericTypeAlias (package:analysis_server/src/services/completion/dart/local_reference_contributor.dart:237:36)
#2      LocalDeclarationVisitor.visitCompilationUnit.<anonymous closure> (package:analyzer_plugin/src/utilities/visitors/local_declaration_visitor.dart:130:9)
#3      _NodeListImpl&Object&ListMixin.forEach (dart:collection/list.dart:63:13)
#4      LocalDeclarationVisitor.visitCompilationUnit (package:analyzer_plugin/src/utilities/visitors/local_declaration_visitor.dart:104:23)
#5      CompilationUnitImpl.accept (package:analyzer/src/dart/ast/ast.dart:2146:49)
#6      LocalDeclarationVisitor.visit (package:analyzer_plugin/src/utilities/visitors/local_declaration_visitor.dart:70:12)
#7      LocalReferenceContributor.computeSuggestions (package:analysis_server/src/services/completion/dart/local_reference_contributor.dart:66:17)
<asynchronous suspension>
#8      DartCompletionManager.computeSuggestions (package:analysis_server/src/services/completion/dart/completion_manager.dart:138:31)
<asynchronous suspension>
#9      CompletionDomainHandler.computeSuggestions (package:analysis_server/src/domain_completion.dart:122:42)
<asynchronous suspension>
#10     CompletionDomainHandler.processRequest (package:analysis_server/src/domain_completion.dart:392:5)
<asynchronous suspension>
#11     CompletionDomainHandler.handleRequest.<anonymous closure> (package:analysis_server/src/domain_completion.dart:282:9)
#12     _rootRun (dart:async/zone.dart:1124:13)
#13     _CustomZone.run (dart:async/zone.dart:1021:19)
#14     _runZoned (dart:async/zone.dart:1516:10)
#15     runZoned (dart:async/zone.dart:1500:12)
#16     CompletionDomainHandler.handleRequest (package:analysis_server/src/domain_completion.dart:275:12)
#17     AnalysisServer.handleRequest.<anonymous closure>.<anonymous closure> (package:analysis_server/src/analysis_server.dart:321:45)
#18     _PerformanceTagImpl.makeCurrentWhile (package:analyzer/src/generated/utilities_general.dart:258:15)
#19     AnalysisServer.handleRequest.<anonymous closure> (package:analysis_server/src/analysis_server.dart:317:50)
#20     _rootRun (dart:async/zone.dart:1124:13)
#21     _CustomZone.run (dart:async/zone.dart:1021:19)
#22     _runZoned (dart:async/zone.dart:1516:10)
#23     runZoned (dart:async/zone.dart:1500:12)
#24     AnalysisServer.handleRequest (package:analysis_server/src/analysis_server.dart:316:5)
#25     ByteStreamServerChannel._readRequest.<anonymous closure> (package:analysis_server/src/channel/byte_stream_channel.dart:174:16)
#26     _PerformanceTagImpl.makeCurrentWhile (package:analyzer/src/generated/utilities_general.dart:258:15)
#27     ByteStreamServerChannel._readRequest (package:analysis_server/src/channel/byte_stream_channel.dart:165:47)
#28     ByteStreamServerChannel.listen.<anonymous closure> (package:analysis_server/src/channel/byte_stream_channel.dart:110:26)
#29     _rootRunUnary (dart:async/zone.dart:1132:38)
#30     _CustomZone.runUnary (dart:async/zone.dart:1029:19)
#31     _CustomZone.runUnaryGuarded (dart:async/zone.dart:931:7)
#32     _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:336:11)
#33     _BufferingStreamSubscription._add (dart:async/stream_impl.dart:263:7)
#34     _SinkTransformerStreamSubscription._add (dart:async/stream_transformers.dart:68:11)
#35     _EventSinkWrapper.add (dart:async/stream_transformers.dart:15:11)
#36     _StringAdapterSink.add (dart:convert/string_conversion.dart:236:11)
#37     _LineSplitterSink._addLines (dart:convert/line_splitter.dart:150:13)
#38     _LineSplitterSink.addSlice (dart:convert/line_splitter.dart:125:5)
#39     StringConversionSinkMixin.add (dart:convert/string_conversion.dart:163:5)
#40     _SinkTransformerStreamSubscription._handleData (dart:async/stream_transformers.dart:120:24)
#41     _rootRunUnary (dart:async/zone.dart:1132:38)
#42     _CustomZone.runUnary (dart:async/zone.dart:1029:19)
#43     _CustomZone.runUnaryGuarded (dart:async/zone.dart:931:7)
#44     _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:336:11)
#45     _BufferingStreamSubscription._add (dart:async/stream_impl.dart:263:7)
#46     _SinkTransformerStreamSubscription._add (dart:async/stream_transformers.dart:68:11)
#47     _EventSinkWrapper.add (dart:async/stream_transformers.dart:15:11)
#48     _StringAdapterSink.add (dart:convert/string_conversion.dart:236:11)
#49     _StringAdapterSink.addSlice (dart:convert/string_conversion.dart:241:7)
#50     _Utf8ConversionSink.addSlice (dart:convert/string_conversion.dart:312:20)
#51     _Utf8ConversionSink.add (dart:convert/string_conversion.dart:305:5)
#52     _ConverterStreamEventSink.add (dart:convert/chunked_conversion.dart:72:18)
#53     _SinkTransformerStreamSubscription._handleData (dart:async/stream_transformers.dart:120:24)
#54     _rootRunUnary (dart:async/zone.dart:1132:38)
#55     _CustomZone.runUnary (dart:async/zone.dart:1029:19)
#56     _CustomZone.runUnaryGuarded (dart:async/zone.dart:931:7)
#57     _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:336:11)
#58     _BufferingStreamSubscription._add (dart:async/stream_impl.dart:263:7)
#59     _SyncStreamController._sendData (dart:async/stream_controller.dart:764:19)
#60     _StreamController._add (dart:async/stream_controller.dart:640:7)
#61     _StreamController.add (dart:async/stream_controller.dart:586:5)
#62     _Socket._onData (dart:io-patch/socket_patch.dart:1786:41)
#63     _rootRunUnary (dart:async/zone.dart:1136:13)
#64     _CustomZone.runUnary (dart:async/zone.dart:1029:19)
#65     _CustomZone.runUnaryGuarded (dart:async/zone.dart:931:7)
#66     _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:336:11)
#67     _BufferingStreamSubscription._add (dart:async/stream_impl.dart:263:7)
#68     _SyncStreamController._sendData (dart:async/stream_controller.dart:764:19)
#69     _StreamController._add (dart:async/stream_controller.dart:640:7)
#70     _StreamController.add (dart:async/stream_controller.dart:586:5)
#71     new _RawSocket.<anonymous closure> (dart:io-patch/socket_patch.dart:1335:33)
#72     _NativeSocket.issueReadEvent.issue (dart:io-patch/socket_patch.dart:856:14)
#73     _microtaskLoop (dart:async/schedule_microtask.dart:41:21)
#74     _startMicrotaskLoop (dart:async/schedule_microtask.dart:50:5)
#75     _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:116:13)
#76     _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:173:5)
1563398497922 <= {"event":"analysis.errors","params":{"file":"/Users/user/project/lib/main.dart","errors":[]}}
1563398497928 <= {"event":"analysis.errors","params":{"file":"/Users/user/project/lib/ui/ui.dart","errors":[]}}
1563398497930 <= {"event":"server.status","params":{"analysis":{"isAnalyzing":false}}}
1563398497930 <= {"event":"analysis.implemented","params":{"file":"/Users/user/project/lib/ui/nav.dart","classes":[{"offset":339,"length":4}],"members":[]}}
1563398498173 => {"id":"5532","method":"analysis.updateContent","params":{"files":{"/Users/user/project/lib/ui/nav.dart":{"type":"add","content":"import 'package:flutter/widgets.dar
1563398498175 => {"id":"5533","method":"edit.getAssists","params":{"file":"/Users/user/project/lib/ui/nav.dart","offset":2625,"length":0},"clientRequestTime":1563398498175}
1563398498176 <= {"id":"5532","result":{}}
1563398498176 <= {"event":"server.status","params":{"analysis":{"isAnalyzing":true}}}
1563398498211 <= {"event":"analysis.errors","params":{"file":"/Users/user/project/lib/ui/nav.dart","errors":[{"severity":"ERROR","type":"SYNTACTIC_ERROR","location":{"file":"/Users/
1563398498211 <= {"id":"5533","result":{"assists":[]}}
1563398498212 <= {"event":"analysis.highlights","params":{"file":"/Users/user/project/lib/ui/nav.dart","regions":[{"type":"DIRECTIVE","offset":0,"length":38},{"type":"BUILT_IN","off
1563398498213 <= {"event":"analysis.navigation","params":{"file":"/Users/user/project/lib/ui/nav.dart","regions":[{"offset":7,"length":30,"targets":[0]},{"offset":46,"length":31,"ta
1563398498213 <= {"event":"analysis.closingLabels","params":{"file":"/Users/user/project/lib/ui/nav.dart","labels":[{"offset":1487,"length":229,"label":"MaterialPageRoute"},{"offset
1563398498214 <= {"event":"analysis.outline","params":{"file":"/Users/user/project/lib/ui/nav.dart","kind":"LIBRARY","outline":{"element":{"kind":"COMPILATION_UNIT","name":"<unit>",
1563398498215 <= {"event":"analysis.overrides","params":{"file":"/Users/user/project/lib/ui/nav.dart","overrides":[{"offset":857,"length":5,"superclassMember":{"element":{"kind":"ME
1563398498230 <= {"event":"analysis.errors","params":{"file":"/Users/user/project/lib/ui/pages.dart","errors":[]}}
1563398498249 <= {"event":"analysis.errors","params":{"file":"/Users/user/project/lib/ui/profile/profile_widget.dart","errors":[]}}
1563398498266 <= {"event":"analysis.errors","params":{"file":"/Users/user/project/lib/ui/people/people_screen.dart","errors":[]}}
1563398498281 <= {"event":"analysis.errors","params":{"file":"/Users/user/project/lib/ui/meerkats_tab_scaffold.dart","errors":[]}}
1563398498288 <= {"event":"analysis.errors","params":{"file":"/Users/user/project/lib/ui/ui.dart","errors":[]}}
1563398498314 <= {"event":"analysis.errors","params":{"file":"/Users/user/project/lib/main.dart","errors":[]}}
1563398498316 <= {"event":"server.status","params":{"analysis":{"isAnalyzing":false}}}
1563398498316 <= {"event":"analysis.implemented","params":{"file":"/Users/user/project/lib/ui/nav.dart","classes":[{"offset":339,"length":4}],"members":[]}}
1563398498324 => {"id":"5534","method":"analysis.updateContent","params":{"files":{"/Users/user/project/lib/ui/nav.dart":{"type":"add","content":"import 'package:flutter/widgets.dar
1563398498325 => {"id":"5535","method":"completion.getSuggestions","params":{"file":"/Users/user/project/lib/ui/nav.dart","offset":2626},"clientRequestTime":1563398498325}
1563398498325 <= {"id":"5534","result":{}}
1563398498326 <= {"event":"server.status","params":{"analysis":{"isAnalyzing":true}}}
1563398498344 <= {"id":"5535","result":{"id":"664"}}
1563398498344 <= {"event":"analysis.errors","params":{"file":"/Users/user/project/lib/ui/nav.dart","errors":[{"severity":"ERROR","type":"SYNTACTIC_ERROR","location":{"file":"/Users/
1563398498346 <= {"event":"server.error","params":{"isFatal":false,"message":"Failed to handle completion domain request: {id: 5535, method: completion.getSuggestions, params: {file: /Users/user/
@devoncarew devoncarew changed the title Dart Analyzer Error NPE on _LocalVisitor.declaredGenericTypeAlias (SDK 2.4.0) Jul 18, 2019
@devoncarew devoncarew added analyzer-completion Issues with the analysis server's code completion feature analyzer-crash-report Issues which have been reported due to an analysis server crash area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. labels Jul 18, 2019
@pq
Copy link
Member

pq commented Sep 24, 2019

Fixed in ea0e48a.

@pq pq closed this as completed Sep 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
analyzer-completion Issues with the analysis server's code completion feature analyzer-crash-report Issues which have been reported due to an analysis server crash 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