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

Panics when opening tutor. #3683

Closed
getreu opened this issue Sep 4, 2022 · 1 comment
Closed

Panics when opening tutor. #3683

getreu opened this issue Sep 4, 2022 · 1 comment
Labels
C-bug Category: This is a bug

Comments

@getreu
Copy link
Contributor

getreu commented Sep 4, 2022

Summary

$ hx --tutor
thread 'main' panicked at 'called `Option::unwrap()` on a `None` value', /home/runner/work/helix/helix/helix-term/src/application.rs:509:43
```


### Reproduction Steps

I tried this:

1. `hx`
2. Type `:tutor`
3. Wait a bit and move around with cursor.

I expected this to happen:

No panic.

Instead, this happened:

```sh
$ hx
thread 'main' panicked at 'called `Option::unwrap()` on a `None` value', /home/runner/work/helix/helix/helix-term/src/application.rs:509:43
```


### Helix log

<details><summary>~/.cache/helix/helix.log</summary>

```
2022-09-04T09:36:41.199 helix_loader [DEBUG] Located configuration folders: []
2022-09-04T09:36:41.208 helix_view::clipboard [INFO] Using xclip to interact with the system and selection (primary) clipboard
2022-09-04T09:36:41.274 helix_lsp::transport [INFO] -> {"jsonrpc":"2.0","method":"initialize","params":{"capabilities":{"textDocument":{"codeAction":{"codeActionLiteralSupport":{"codeActionKind":{"valueSet":["","quickfix","refactor","refactor.extract","refactor.inline","refactor.rewrite","source","source.organizeImports"]}}},"completion":{"completionItem":{"resolveSupport":{"properties":["documentation","detail","additionalTextEdits"]},"snippetSupport":false},"completionItemKind":{}},"hover":{"contentFormat":["markdown"]},"publishDiagnostics":{},"rename":{"dynamicRegistration":false,"honorsChangeAnnotations":false,"prepareSupport":false},"signatureHelp":{"signatureInformation":{"activeParameterSupport":true,"documentationFormat":["markdown"],"parameterInformation":{"labelOffsetSupport":true}}}},"window":{"workDoneProgress":true},"workspace":{"applyEdit":true,"configuration":true,"didChangeConfiguration":{"dynamicRegistration":false},"symbol":{"dynamicRegistration":false},"workspaceFolders":true}},"processId":6202,"rootUri":null,"workspaceFolders":[]},"id":0}
2022-09-04T09:36:44.764 helix_lsp::transport [ERROR] err <- "Sep 04, 2022 9:36:44 AM org.bsplines.ltexls.server.LtexLanguageServer initialize\n"
2022-09-04T09:36:44.764 helix_lsp::transport [ERROR] err <- "INFO: ltex-ls 15.2.1-alpha.1.nightly.2022-04-18 - initializing...\n"
2022-09-04T09:36:44.799 helix_lsp::transport [INFO] <- {"jsonrpc":"2.0","id":0,"result":{"capabilities":{"textDocumentSync":1,"completionProvider":{},"codeActionProvider":{"codeActionKinds":["quickfix.ltex.acceptSuggestions"]},"executeCommandProvider":{"commands":["_ltex.checkDocument","_ltex.getServerStatus"]}}}}
2022-09-04T09:36:44.800 helix_lsp::transport [INFO] <- {"capabilities":{"codeActionProvider":{"codeActionKinds":["quickfix.ltex.acceptSuggestions"]},"completionProvider":{},"executeCommandProvider":{"commands":["_ltex.checkDocument","_ltex.getServerStatus"]},"textDocumentSync":1}}
2022-09-04T09:36:44.800 helix_lsp::transport [INFO] -> {"jsonrpc":"2.0","method":"initialized","params":{}}
```

</details>


### Platform

Linux

### Terminal Emulator

xfce4-terminal 0.8.10 (Xfce 4.16)

### Helix Version

helix 22.08 (ee94031f)
@getreu getreu added the C-bug Category: This is a bug label Sep 4, 2022
@archseer
Copy link
Member

archseer commented Sep 4, 2022

Seems to be the LSP:

doc.url().unwrap(),

We should only send didOpen events for documents with a path

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug
Projects
None yet
Development

No branches or pull requests

2 participants