VS Code crash ("The window is not responding") after running "Organize Usings"
This was filed at https://github.com/Dart-Code/Dart-Code/issues/4486, but I believe the crash is a VS Code issue.

I can reproduce the issue by doing the following:

- Set up a Dart SDK and install the Dart extension
- Open an empty folder and create a `foo.dart` file with the following contents (**and no trailing newline**):
    ```dart
    export 'interior_material_selector.dart';
    export 'mileage_selector.dart';
    export 'owners_selector.dart';
    export 'price_selector.dart';
    export 'seat_count_selector.dart';
    export 'year_selector.dart';
    export 'winter_options_selector.dart';export 'camera_selector.dart';
    ```
- Run the "Organize Imports" command
- VS Code immediately hangs and the cursor stops flashing, eventually reporting the crash and asking to reopen/close

I ran the Dart language server from source and stripped out a lot of the capabilities to reduce the traffic. When removing the Semantic Tokens capability, the issue stops occurring, so it may be related to semantic tokens but I'm not certain.

Here is the LSP log (the version running the reduced set of Dart server capabilities):

```
==> {"jsonrpc":"2.0","id":0,"method":"initialize","params":{"processId":11548,"clientInfo":{"name":"Visual Studio Code","version":"1.77.0"},"locale":"en-gb","rootPath":"/Users/danny/Desktop/dart_samples/dartcode_4486","rootUri":"file:///Users/danny/Desktop/dart_samples/dartcode_4486","capabilities":{"workspace":{"applyEdit":true,"workspaceEdit":{"documentChanges":true,"resourceOperations":["create","rename","delete"],"failureHandling":"textOnlyTransactional","normalizesLineEndings":true,"changeAnnotationSupport":{"groupsOnLabel":true}},"configuration":true,"didChangeWatchedFiles":{"dynamicRegistration":true,"relativePatternSupport":true},"symbol":{"dynamicRegistration":true,"symbolKind":{"valueSet":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26]},"tagSupport":{"valueSet":[1]},"resolveSupport":{"properties":["location.range"]}},"codeLens":{"refreshSupport":true},"executeCommand":{"dynamicRegistration":true},"didChangeConfiguration":{"dynamicRegistration":true},"workspaceFolders":true,"semanticTokens":{"refreshSupport":true},"fileOperations":{"dynamicRegistration":true,"didCreate":true,"didRename":true,"didDelete":true,"willCreate":true,"willRename":true,"willDelete":true},"inlineValue":{"refreshSupport":true},"inlayHint":{"refreshSupport":true},"diagnostics":{"refreshSupport":true}},"textDocument":{"publishDiagnostics":{"relatedInformation":true,"versionSupport":false,"tagSupport":{"valueSet":[1,2]},"codeDescriptionSupport":true,"dataSupport":true},"synchronization":{"dynamicRegistration":true,"willSave":true,"willSaveWaitUntil":true,"didSave":true},"completion":{"dynamicRegistration":true,"contextSupport":true,"completionItem":{"snippetSupport":true,"commitCharactersSupport":true,"documentationFormat":["markdown","plaintext"],"deprecatedSupport":true,"preselectSupport":true,"tagSupport":{"valueSet":[1]},"insertReplaceSupport":true,"resolveSupport":{"properties":["documentation","detail","additionalTextEdits"]},"insertTextModeSupport":{"valueSet":[1,2]},"labelDetailsSupport":true},"insertTextMode":2,"completionItemKind":{"valueSet":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25]},"completionList":{"itemDefaults":["commitCharacters","editRange","insertTextFormat","insertTextMode"]}},"hover":{"dynamicRegistration":true,"contentFormat":["markdown","plaintext"]},"signatureHelp":{"dynamicRegistration":true,"signatureInformation":{"documentationFormat":["markdown","plaintext"],"parameterInformation":{"labelOffsetSupport":true},"activeParameterSupport":true},"contextSupport":true},"definition":{"dynamicRegistration":true,"linkSupport":true},"references":{"dynamicRegistration":true},"documentHighlight":{"dynamicRegistration":true},"documentSymbol":{"dynamicRegistration":true,"symbolKind":{"valueSet":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26]},"hierarchicalDocumentSymbolSupport":true,"tagSupport":{"valueSet":[1]},"labelSupport":true},"codeAction":{"dynamicRegistration":true,"isPreferredSupport":true,"disabledSupport":true,"dataSupport":true,"resolveSupport":{"properties":["edit"]},"codeActionLiteralSupport":{"codeActionKind":{"valueSet":["","quickfix","refactor","refactor.extract","refactor.inline","refactor.rewrite","source","source.organizeImports"]}},"honorsChangeAnnotations":false},"codeLens":{"dynamicRegistration":true},"formatting":{"dynamicRegistration":true},"rangeFormatting":{"dynamicRegistration":true},"onTypeFormatting":{"dynamicRegistration":true},"rename":{"dynamicRegistration":true,"prepareSupport":true,"prepareSupportDefaultBehavior":1,"honorsChangeAnnotations":true},"documentLink":{"dynamicRegistration":true,"tooltipSupport":true},"typeDefinition":{"dynamicRegistration":true,"linkSupport":true},"implementation":{"dynamicRegistration":true,"linkSupport":true},"colorProvider":{"dynamicRegistration":true},"foldingRange":{"dynamicRegistration":true,"rangeLimit":5000,"lineFoldingOnly":true,"foldingRangeKind":{"valueSet":["comment","imports","region"]},"foldingRange":{"collapsedText":false}},"declaration":{"dynamicRegistration":true,"linkSupport":true},"selectionRange":{"dynamicRegistration":true},"callHierarchy":{"dynamicRegistration":true},"semanticTokens":{"dynamicRegistration":true,"tokenTypes":["namespace","type","class","enum","interface","struct","typeParameter","parameter","variable","property","enumMember","event","function","method","macro","keyword","modifier","comment","string","number","regexp","operator","decorator"],"tokenModifiers":["declaration","definition","readonly","static","deprecated","abstract","async","modification","documentation","defaultLibrary"],"formats":["relative"],"requests":{"range":true,"full":{"delta":true}},"multilineTokenSupport":false,"overlappingTokenSupport":false,"serverCancelSupport":true,"augmentsSyntaxTokens":true},"linkedEditingRange":{"dynamicRegistration":true},"typeHierarchy":{"dynamicRegistration":true},"inlineValue":{"dynamicRegistration":true},"inlayHint":{"dynamicRegistration":true,"resolveSupport":{"properties":["tooltip","textEdits","label.tooltip","label.location","label.command"]}},"diagnostic":{"dynamicRegistration":true,"relatedDocumentSupport":false}},"window":{"showMessage":{"messageActionItem":{"additionalPropertiesSupport":true}},"showDocument":{"support":true},"workDoneProgress":true},"general":{"staleRequestSupport":{"cancel":true,"retryOnContentModified":["textDocument/semanticTokens/full","textDocument/semanticTokens/range","textDocument/semanticTokens/full/delta"]},"regularExpressions":{"engine":"ECMAScript","version":"ES2020"},"markdown":{"parser":"marked","version":"1.1.0","allowedTags":["ul","li","p","code","blockquote","ol","h1","h2","h3","h4","h5","h6","hr","em","pre","table","thead","tbody","tr","th","td","div","del","a","strong","br","img","span"]},"positionEncodings":["utf-16"]},"notebookDocument":{"synchronization":{"dynamicRegistration":true,"executionSummarySupport":true}},"experimental":{"supportsWindowShowMessageRequest":true,"snippetTextEdit":true,"dartCodeAction":{"commandParameterSupport":{"supportedKinds":["saveUri"]}}}},"initializationOptions":{"allowOpenUri":true,"appHost":"desktop","closingLabels":true,"flutterOutline":false,"onlyAnalyzeProjectsWithOpenFiles":false,"outline":true,"suggestFromUnimportedLibraries":true},"trace":"off","workspaceFolders":[{"uri":"file:///Users/danny/Desktop/dart_samples/dartcode_4486","name":"dartcode_4486"}]},"clientRequestTime":1680702758109}
<== {"id":0,"jsonrpc":"2.0","result":{"capabilities":{"executeCommandProvider":{"commands":["edit.sortMembers","edit.organizeImports","edit.fixAll","edit.sendWorkspaceEdit","refactor.perform","move_top_level_to_file"],"workDoneProgress":true},"workspace":{"workspaceFolders":{"changeNotifications":true,"supported":true}},"workspaceSymbolProvider":true},"serverInfo":{"name":"Dart SDK LSP Analysis Server","version":"3.0.0-edge.c57cbd0c193d1f2cfdfcbdd730c9cc9103cea857"}}}
==> {"jsonrpc":"2.0","method":"initialized","params":{},"clientRequestTime":1680702767138}
<== {"id":1,"jsonrpc":"2.0","method":"client/registerCapability","params":{"registrations":[{"id":"0","method":"textDocument/didOpen","registerOptions":{"documentSelector":[{"language":"dart","scheme":"file"},{"language":"yaml","pattern":"**/pubspec.yaml","scheme":"file"},{"language":"yaml","pattern":"**/analysis_options.yaml","scheme":"file"},{"language":"yaml","pattern":"**/lib/fix_data.yaml","scheme":"file"}]}},{"id":"1","method":"textDocument/didClose","registerOptions":{"documentSelector":[{"language":"dart","scheme":"file"},{"language":"yaml","pattern":"**/pubspec.yaml","scheme":"file"},{"language":"yaml","pattern":"**/analysis_options.yaml","scheme":"file"},{"language":"yaml","pattern":"**/lib/fix_data.yaml","scheme":"file"}]}},{"id":"2","method":"textDocument/didChange","registerOptions":{"documentSelector":[{"language":"dart","scheme":"file"},{"language":"yaml","pattern":"**/pubspec.yaml","scheme":"file"},{"language":"yaml","pattern":"**/analysis_options.yaml","scheme":"file"},{"language":"yaml","pattern":"**/lib/fix_data.yaml","scheme":"file"}],"syncKind":2}},{"id":"3","method":"textDocument/codeAction","registerOptions":{"codeActionKinds":["source","source.organizeImports","source.fixAll","source.sortMembers","quickfix","refactor"],"documentSelector":[{"language":"dart","scheme":"file"}]}},{"id":"4","method":"textDocument/semanticTokens","registerOptions":{"documentSelector":[{"language":"dart","scheme":"file"}],"full":{"delta":false},"legend":{"tokenModifiers":["documentation","constructor","declaration","importPrefix","instance","static","escape","annotation","control","label","interpolation","void"],"tokenTypes":["annotation","keyword","class","comment","method","variable","parameter","enum","enumMember","type","source","property","namespace","boolean","number","string","function","typeParameter"]},"range":true}}]}}
==> {"jsonrpc":"2.0","id":1,"result":null,"clientRequestTime":1680702767197}
==> {"jsonrpc":"2.0","method":"textDocument/didOpen","params":{"textDocument":{"uri":"file:///Users/danny/Desktop/dart_samples/dartcode_4486/bin/dartcode_4486.dart","languageId":"dart","version":1,"text":"export 'interior_material_selector.dart';\nexport 'mileage_selector.dart';\nexport 'owners_selector.dart';\nexport 'price_selector.dart';\nexport 'seat_count_selector.dart';\nexport 'year_selector.dart';\nexport 'winter_options_selector.dart';export 'camera_selector.dart';"}},"clientRequestTime":1680702767197}
==> {"jsonrpc":"2.0","id":1,"method":"textDocument/codeAction","params":{"textDocument":{"uri":"file:///Users/danny/Desktop/dart_samples/dartcode_4486/bin/dartcode_4486.dart"},"range":{"start":{"line":6,"character":68},"end":{"line":6,"character":68}},"context":{"diagnostics":[],"triggerKind":2}},"clientRequestTime":1680702767198}
<== {"id":1,"jsonrpc":"2.0","result":[]}
==> {"jsonrpc":"2.0","id":2,"method":"textDocument/semanticTokens/range","params":{"textDocument":{"uri":"file:///Users/danny/Desktop/dart_samples/dartcode_4486/bin/dartcode_4486.dart"},"range":{"start":{"line":0,"character":0},"end":{"line":6,"character":68}}},"clientRequestTime":1680702767502}
==> {"jsonrpc":"2.0","id":3,"method":"textDocument/semanticTokens/full","params":{"textDocument":{"uri":"file:///Users/danny/Desktop/dart_samples/dartcode_4486/bin/dartcode_4486.dart"}},"clientRequestTime":1680702767828}
<== {"id":2,"jsonrpc":"2.0","result":{"data":[0,0,6,1,0,0,7,33,15,0,1,0,6,1,0,0,7,23,15,0,1,0,6,1,0,0,7,22,15,0,1,0,6,1,0,0,7,21,15,0,1,0,6,1,0,0,7,26,15,0,1,0,6,1,0,0,7,20,15,0,1,0,6,1,0,0,7,30,15,0,0,31,6,1,0,0,7,22,15,0]}}
<== {"id":3,"jsonrpc":"2.0","result":{"data":[0,0,6,1,0,0,7,33,15,0,1,0,6,1,0,0,7,23,15,0,1,0,6,1,0,0,7,22,15,0,1,0,6,1,0,0,7,21,15,0,1,0,6,1,0,0,7,26,15,0,1,0,6,1,0,0,7,20,15,0,1,0,6,1,0,0,7,30,15,0,0,31,6,1,0,0,7,22,15,0]}}
==> {"jsonrpc":"2.0","id":4,"method":"textDocument/codeAction","params":{"textDocument":{"uri":"file:///Users/danny/Desktop/dart_samples/dartcode_4486/bin/dartcode_4486.dart"},"range":{"start":{"line":6,"character":68},"end":{"line":6,"character":68}},"context":{"diagnostics":[],"only":["source.organizeImports"],"triggerKind":1}},"clientRequestTime":1680702777207}
<== {"id":4,"jsonrpc":"2.0","result":[{"command":{"arguments":[{"path":"/Users/danny/Desktop/dart_samples/dartcode_4486/bin/dartcode_4486.dart"}],"command":"edit.organizeImports","title":"Organize Imports"},"kind":"source.organizeImports","title":"Organize Imports"}]}
==> {"jsonrpc":"2.0","id":5,"method":"workspace/executeCommand","params":{"command":"edit.organizeImports","arguments":[{"path":"/Users/danny/Desktop/dart_samples/dartcode_4486/bin/dartcode_4486.dart"}]},"clientRequestTime":1680702777229}
<== {"id":2,"jsonrpc":"2.0","method":"workspace/applyEdit","params":{"edit":{"documentChanges":[{"edits":[{"newText":"export 'camera_selector.dart';\nexport 'interior_material_selector.dart';\nexport 'mileage_selector.dart';\nexport 'owners_selector.dart';\nexport 'price_selector.dart';\nexport 'seat_count_selector.dart';\nexport 'winter_options_selector.dart';\nexport 'year","range":{"end":{"character":52,"line":6},"start":{"character":0,"line":0}}}],"textDocument":{"uri":"file:///Users/danny/Desktop/dart_samples/dartcode_4486/bin/dartcode_4486.dart","version":1}}]},"label":"Organize Imports"}}
==> {"jsonrpc":"2.0","method":"textDocument/didChange","params":{"textDocument":{"uri":"file:///Users/danny/Desktop/dart_samples/dartcode_4486/bin/dartcode_4486.dart","version":2},"contentChanges":[{"range":{"start":{"line":6,"character":51},"end":{"line":6,"character":52}},"rangeLength":1,"text":""},{"range":{"start":{"line":6,"character":48},"end":{"line":6,"character":50}},"rangeLength":2,"text":""},{"range":{"start":{"line":6,"character":46},"end":{"line":6,"character":47}},"rangeLength":1,"text":"ye"},{"range":{"start":{"line":6,"character":38},"end":{"line":6,"character":38}},"rangeLength":0,"text":"\n"},{"range":{"start":{"line":5,"character":8},"end":{"line":6,"character":8}},"rangeLength":29,"text":""},{"range":{"start":{"line":0,"character":8},"end":{"line":0,"character":8}},"rangeLength":0,"text":"camera_selector.dart';\nexport '"}]},"clientRequestTime":1680702777265}
==> {"jsonrpc":"2.0","id":2,"result":{"applied":true},"clientRequestTime":1680702777271}
<== {"id":5,"jsonrpc":"2.0","result":null}
```

Here is the crash-dump folder: [crash_dump.zip](https://github.com/microsoft/vscode/files/11159574/crash_dump.zip)
Symbolicated: [symbolicated.zip](https://github.com/microsoft/vscode/files/11159827/symbolicated.zip), though https://github.com/microsoft/vscode-electron-prebuilt (mentioned at https://github.com/Microsoft/vscode/wiki/Native-Crash-Issues) is a 404 so these may be incomplete.

I've not had any luck reproducing this without the Dart extension/server by writing extension code that just applies the same edits (possibly because it requires semantic tokens) nor have I spotted anything unusual in the LSP traffic, but I'll have another go through these and post back if I figure anything out. Hopefully the crash log will help though.

VS Code version:

```
Version: 1.77.0
Commit: 7f329fe6c66b0f86ae1574c2911b681ad5a45d63
Date: 2023-03-29T09:57:11.797Z
Electron: 19.1.11
Chromium: 102.0.5005.196
Node.js: 16.14.2
V8: 10.2.154.26-electron.0
OS: Darwin x64 22.2.0
Sandboxed: Yes
```