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

LocalReferenceContributor exception #24509

Closed
danrubel opened this issue Oct 6, 2015 · 2 comments
Closed

LocalReferenceContributor exception #24509

danrubel opened this issue Oct 6, 2015 · 2 comments
Assignees
Labels
analyzer-completion Issues with the analysis server's code completion feature area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. P2 A bug or feature request we're likely to work on

Comments

@danrubel
Copy link

danrubel commented Oct 6, 2015

Dart analysis server, SDK version 1.13.0-edge.0b01edac173d9e10422ce1ef530482e9d1ab1bd3, server version 1.9.0,

FATAL error: RangeError: Invalid value: Not in range 0..5489, inclusive: 6012 
#0 _StringBase.startsWith (dart:core-patch/string_patch.dart:305) 
#1 _LocalVisitor._LocalVisitor (package:analysis_server/src/services/completion/local_reference_contributor.dart:362) 
#2 LocalReferenceContributor.computeFast (package:analysis_server/src/services/completion/local_reference_contributor.dart:35) 
#3 DartCompletionManager.computeFast. . .  (package:analysis_server/src/services/completion/dart_completion_manager.dart:180) 
#4 CompletionPerformance.logElapseTime (package:analysis_server/src/services/completion/completion_manager.dart:165) 
#5 DartCompletionManager.computeFast. .  (package:analysis_server/src/services/completion/dart_completion_manager.dart:179) 
#6 ListMixin._filter (dart:collection/list.dart:282) 
#7 Object&ListMixin.removeWhere (dart:collection/list.dart:268) 
#8 DartCompletionManager.computeFast.  (package:analysis_server/src/services/completion/dart_completion_manager.dart:178) 
#9 CompletionPerformance.logElapseTime (package:analysis_server/src/services/completion/completion_manager.dart:165) 
#10 DartCompletionManager.computeFast (package:analysis_server/src/services/completion/dart_completion_manager.dart:146) 
@danrubel danrubel added Priority-Medium area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. analyzer-completion Issues with the analysis server's code completion feature labels Oct 6, 2015
@danrubel danrubel self-assigned this Oct 6, 2015
@danrubel
Copy link
Author

danrubel commented Oct 6, 2015

It appears that the replacement offset for the requested completion is outside the current source range, meaning that what the client and server do not agree on what content is being edited. One possibility is that the client requested a code completion before updating the buffer content. I'll add guard code to ensure that the replacement range and offset is within the source bounds, but this does not address the underlying problem.

@danrubel
Copy link
Author

danrubel commented Oct 6, 2015

Strike that. It appears I'm using the wrong API to get the source. Fixing.

@kevmoo kevmoo added P2 A bug or feature request we're likely to work on and removed Priority-Medium labels Mar 1, 2016
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 area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. P2 A bug or feature request we're likely to work on
Projects
None yet
Development

No branches or pull requests

3 participants