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 crashes during code completion request due to unmatched parens #37798

Closed
lambdabaa opened this issue Aug 9, 2019 · 2 comments
Assignees
Labels
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. P1 A high priority bug; for example, a single project is unusable or has many test failures type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)

Comments

@lambdabaa
Copy link
Contributor

  • IDEA IU-191.7141.44
  • Dart SDK 2.5.0-edge.d5d00c847a9731a6d972f6e3df4335302fb28f24
  • IU-191.7141.44, JRE 1.8.0_202-release-1483-b49x64 JetBrains s.r.o, OS Linux(amd64) v4.19.37-5rodete2-amd64, screens 3840x2160

Exception
Dart analysis server, SDK version 2.5.0-edge.d5d00c847a9731a6d972f6e3df4335302fb28f24, server version 1.27.2, error: Failed to handle completion domain request: {id: 170, method: completion.getSuggestions, params: {file: /google/src/cloud/ariaye/ariaye-test-removing-statistician/google3/dart/tools/gdart/lib/src/main.dart, offset: 54}, clientRequestTime: 1565375774488}
Can't find ')' to match '('.
#0 ErrorToken.lexeme (package:front_end/src/fasta/scanner/error_token.dart:90:5)
#1 constructQuery (package:analysis_server/src/services/completion/dart/completion_ranking_internal.dart:164:24)
#2 CompletionRanking.predict (package:analysis_server/src/services/completion/dart/completion_ranking.dart:67:19)

#3 DartCompletionManager.computeSuggestions (package:analysis_server/src/services/completion/dart/completion_manager.dart:99:35)

#4 CompletionDomainHandler.computeSuggestions (package:analysis_server/src/domain_completion.dart:122:42)

#5 CompletionDomainHandler.processRequest (package:analysis_server/src/domain_completion.dart:392:5)

#6 CompletionDomainHandler.handleRequest. (package:analysis_server/src/domain_completion.dart:282:9)
#7 _rootRun (dart:async/zone.dart:1124:13)
#8 _CustomZone.run (dart:async/zone.dart:1021:19)
#9 _runZoned (dart:async/zone.dart:1516:10)
#10 runZoned (dart:async/zone.dart:1500:12)
#11 CompletionDomainHandler.handleRequest (package:analysis_server/src/domain_completion.dart:275:12)
#12 AnalysisServer.handleRequest.. (package:analysis_server/src/analysis_server.dart:325:45)
#13 _PerformanceTagImpl.makeCurrentWhile (package:analyzer/src/generated/utilities_general.dart:258:15)
#14 AnalysisServer.handleRequest. (package:analysis_server/src/analysis_server.dart:321:50)
#15 _rootRun (dart:async/zone.dart:1124:13)
#16 _CustomZone.run (dart:async/zone.dart:1021:19)
#17 _runZoned (dart:async/zone.dart:1516:10)
#18 runZoned (dart:async/zone.dart:1500:12)
#19 AnalysisServer.handleRequest (package:analysis_server/src/analysis_server.dart:320:5)
#20 ByteStreamServerChannel._readRequest. (package:analysis_server/src/channel/byte_stream_channel.dart:174:16)
#21 _PerformanceTagImpl.makeCurrentWhile (package:analyzer/src/generated/utilities_general.dart:258:15)
#22 ByteStreamServerChannel._readRequest (package:analysis_server/src/channel/byte_stream_channel.dart:165:47)
#23 ByteStreamServerChannel.listen. (package:analysis_server/src/channel/byte_stream_channel.dart:110:26)
#24 _rootRunUnary (dart:async/zone.dart:1132:38)
#25 _CustomZone.runUnary (dart:async/zone.dart:1029:19)
#26 _CustomZone.runUnaryGuarded (dart:async/zone.dart:931:7)
#27 _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:336:11)
#28 _BufferingStreamSubscription._add (dart:async/stream_impl.dart:263:7)
#29 _SinkTransformerStreamSubscription._add (dart:async/stream_transformers.dart:68:11)
#30 _EventSinkWrapper.add (dart:async/stream_transformers.dart:15:11)
#31 _StringAdapterSink.add (dart:convert/string_conversion.dart:236:11)
#32 _LineSplitterSink._addLines (dart:convert/line_splitter.dart:150:13)
#33 _LineSplitterSink.addSlice (dart:convert/line_splitter.dart:125:5)
#34 StringConversionSinkMixin.add (dart:convert/string_conversion.dart:163:5)
#35 _SinkTransformerStreamSubscription._handleData (dart:async/stream_transformers.dart:120:24)
#36 _rootRunUnary (dart:async/zone.dart:1132:38)
#37 _CustomZone.runUnary (dart:async/zone.dart:1029:19)
#38 _CustomZone.runUnaryGuarded (dart:async/zone.dart:931:7)
#39 _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:336:11)
#40 _BufferingStreamSubscription._add (dart:async/stream_impl.dart:263:7)
#41 _SinkTransformerStreamSubscription._add (dart:async/stream_transformers.dart:68:11)
#42 _EventSinkWrapper.add (dart:async/stream_transformers.dart:15:11)
#43 _StringAdapterSink.add (dart:convert/string_conversion.dart:236:11)
#44 _StringAdapterSink.addSlice (dart:convert/string_conversion.dart:241:7)
#45 _Utf8ConversionSink.addSlice (dart:convert/string_conversion.dart:312:20)
#46 _Utf8ConversionSink.add (dart:convert/string_conversion.dart:305:5)
#47 _ConverterStreamEventSink.add (dart:convert/chunked_conversion.dart:72:18)
#48 _SinkTransformerStreamSubscription._handleData (dart:async/stream_transformers.dart:120:24)
#49 _rootRunUnary (dart:async/zone.dart:1132:38)
#50 _CustomZone.runUnary (dart:async/zone.dart:1029:19)
#51 _CustomZone.runUnaryGuarded (dart:async/zone.dart:931:7)
#52 _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:336:11)
#53 _BufferingStreamSubscription._add (dart:async/stream_impl.dart:263:7)
#54 _SyncStreamController._sendData (dart:async/stream_controller.dart:764:19)
#55 _StreamController._add (dart:async/stream_controller.dart:640:7)
#56 _StreamController.add (dart:async/stream_controller.dart:586:5)
#57 _Socket._onData (dart:io-patch/socket_patch.dart:1789:41)
#58 _rootRunUnary (dart:async/zone.dart:1136:13)
#59 _CustomZone.runUnary (dart:async/zone.dart:1029:19)
#60 _CustomZone.runUnaryGuarded (dart:async/zone.dart:931:7)
#61 _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:336:11)
#62 _BufferingStreamSubscription._add (dart:async/stream_impl.dart:263:7)
#63 _SyncStreamController._sendData (dart:async/stream_controller.dart:764:19)
#64 _StreamController._add (dart:async/stream_controller.dart:640:7)
#65 _StreamController.add (dart:async/stream_controller.dart:586:5)
#66 new _RawSocket. (dart:io-patch/socket_patch.dart:1337:33)
#67 _NativeSocket.issueReadEvent.issue (dart:io-patch/socket_patch.dart:858:14)
#68 _microtaskLoop (dart:async/schedule_microtask.dart:41:21)
#69 _startMicrotaskLoop (dart:async/schedule_microtask.dart:50:5)
#70 _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:116:13)
#71 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:173:5)

/cc @bwilkerson

@bwilkerson
Copy link
Member

I'll let @danrubel weigh in, but my guess is that completion ranking should ignore any error tokens it finds. I'm not certain, though, because those tokens are created for bookkeeping purposes and I think they should be removed by the time we see the token stream, so it seems like you shouldn't be able to run into them.

@a-siva a-siva added area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. type-bug Incorrect behavior (everything from a crash to more subtle misbehavior) analyzer-crash-report Issues which have been reported due to an analysis server crash P1 A high priority bug; for example, a single project is unusable or has many test failures labels Aug 9, 2019
@lambdabaa
Copy link
Contributor Author

dart-bot pushed a commit that referenced this issue Aug 12, 2019
Bug: #37798
Change-Id: I65b2b57d874ccf8e748841f3d0742e883a91ec46
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/112702
Commit-Queue: Ari Aye <ariaye@google.com>
Reviewed-by: Dan Rubel <danrubel@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
@lambdabaa lambdabaa self-assigned this Aug 12, 2019
dart-bot pushed a commit that referenced this issue Aug 15, 2019
Bug: #37798
Change-Id: I65b2b57d874ccf8e748841f3d0742e883a91ec46
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/112702
Commit-Queue: Ari Aye <ariaye@google.com>
Reviewed-by: Dan Rubel <danrubel@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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. P1 A high priority bug; for example, a single project is unusable or has many test failures type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)
Projects
None yet
Development

No branches or pull requests

3 participants