Skip to content

Crash while trying to find the compilation unit for an element #56070

Open
@bwilkerson

Description

@bwilkerson

The following crash occurred while trying to find the compilation unit for an element:

StateError: Bad state: No unit: as prefix0
at _getUnitElement	(protocol_server.dart:303)
at newLocation_fromElement	(protocol_server.dart:191)
at convertElement	(protocol_dart.dart:33)
at addDartOccurrences.<fn>	(occurrences_dart.dart:18)
at _LinkedHashMapMixin.forEach	(dart:collection)
at addDartOccurrences	(occurrences_dart.dart:16)
at DocumentHighlightsHandler.handle.<fn>	(handler_document_highlights.dart:41)
at ErrorOrRecord2Extension.mapResults	(error_or.dart:125)
at DocumentHighlightsHandler.handle	(handler_document_highlights.dart:39)
at <asynchronous gap>	(async)
at ServerStateMessageHandler.handleMessage	(handlers.dart:397)
at <asynchronous gap>	(async)
at LspAnalysisServer._handleRequestMessage	(lsp_analysis_server.dart:1022)
at <asynchronous gap>	(async)
at LspAnalysisServer.handleMessage.<fn>.<fn>	(lsp_analysis_server.dart:477)
at <asynchronous gap>	(async)
at OperationPerformanceImpl.runAsync	(operation_performance.dart:174)
at <asynchronous gap>	(async)
at LspAnalysisServer.handleMessage.<fn>	(lsp_analysis_server.dart:460)

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2A bug or feature request we're likely to work onanalyzer-crash-reportIssues which have been reported due to an analysis server crasharea-dart-modelFor issues related to conformance to the language spec in the parser, compilers or the CLI analyzer.type-bugIncorrect behavior (everything from a crash to more subtle misbehavior)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions