-
Notifications
You must be signed in to change notification settings - Fork 118
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
ocaml-lsp-server crash in Emacs #1115
Comments
Can you apply the following patch to fiber and then try reproducing again:
|
How do I apply these patches? |
You would have to clone the repe of fiber, checkout the appropriate version, apply the patch, and then pin the repo (see |
Ok, this took way longer to do then I expected to install the fiber package with the specific patches. /-----------------------------------------------------------------------
| Internal error: Uncaught exception.
| Failure("Ivar.fill")
| Raised by primitive operation at Fiber__Core.Ivar.create in file "fiber/src/core.ml", line 217, characters 17-42
| Called from Ocaml_lsp_server__Ocamlformat_rpc.create_state in file "ocaml-lsp-server/src/ocamlformat_rpc.ml", line 188, characters 17-37
| Called from Ocaml_lsp_server__Ocamlformat_rpc.create in file "ocaml-lsp-server/src/ocamlformat_rpc.ml" (inlined), line 190, characters 53-68
| Called from Ocaml_lsp_server.start in file "ocaml-lsp-server/src/ocaml_lsp_server.ml", line 753, characters 24-49
| Called from Fiber__Scheduler.exec in file "fiber/src/scheduler.ml", line 76, characters 8-11
| Called from Fiber__Scheduler.start in file "fiber/src/scheduler.ml", line 219, characters 2-42
| Called from Fiber.run.(fun) in file "fiber/src/fiber.ml" (inlined), line 17, characters 28-47
| Called from Lev_fiber.run in file "submodules/lev/lev-fiber/src/lev_fiber.ml", line 1264, characters 10-59
| Called from Ocaml_lsp_server.run in file "ocaml-lsp-server/src/ocaml_lsp_server.ml", line 868, characters 2-151
| Called from Stdune__Exn_with_backtrace.try_with in file "otherlibs/stdune/exn_with_backtrace.ml", line 9, characters 8-12
| Called from Dune__exe__Main in file "ocaml-lsp-server/bin/main.ml", line 40, characters 6-106
| Re-raised at Stdune__Exn.raise_with_backtrace in file "otherlibs/stdune/exn.ml" (inlined), line 36, characters 27-56
| Called from Stdune__Exn_with_backtrace.reraise in file "otherlibs/stdune/exn_with_backtrace.ml", line 18, characters 33-71
| Called from Fiber__Scheduler.exec in file "fiber/src/scheduler.ml", line 90, characters 32-61
| Called from Fiber__Scheduler.advance.(fun) in file "fiber/src/scheduler.ml", line 198, characters 2-58
| Called from Fiber.run.loop in file "fiber/src/fiber.ml", line 15, characters 30-61
| Called from Fiber.run.(fun) in file "fiber/src/fiber.ml" (inlined), line 17, characters 17-47
| Called from Lev_fiber.run in file "submodules/lev/lev-fiber/src/lev_fiber.ml", line 1264, characters 10-59
| Re-raised at Stdune__Exn.raise_with_backtrace in file "otherlibs/stdune/exn.ml" (inlined), line 36, characters 27-56
| Called from Stdune__Exn_with_backtrace.reraise in file "otherlibs/stdune/exn_with_backtrace.ml", line 18, characters 33-71
| Called from Stdune__Exn_with_backtrace.try_with in file "otherlibs/stdune/exn_with_backtrace.ml", line 9, characters 8-12
\-----------------------------------------------------------------------
Process ocaml-lsp-server stderr finished |
if [get_process] is alled concurrently, the ivar might be filled twice. Fixes #1115 Signed-off-by: Rudi Grinberg <me@rgrinberg.com> <!-- ps-id: d5c77719-29a5-4b46-92e8-c09f6453ba56 -->
Can you see #1132 fixes the issue for you? |
if [get_process] is alled concurrently, the ivar might be filled twice. Fixes #1115 Signed-off-by: Rudi Grinberg <me@rgrinberg.com> <!-- ps-id: d5c77719-29a5-4b46-92e8-c09f6453ba56 -->
if [get_process] is alled concurrently, the ivar might be filled twice. Fixes #1115 Signed-off-by: Rudi Grinberg <me@rgrinberg.com>
I use ocaml-lsp-server installed through opam in my Emacs(GNU Emacs 28.2 running on a M1 Mac)
For some reason if I start the lsp through
M-x lsp
it just crashes with the error message:(Side note I have
dune build --watch
running in the project, but this also happens without running it)And this is the
lsp-log
My installed ocaml-lsp-server version:
➜ ~ opam info ocaml-lsp-server <><> ocaml-lsp-server: information on all versions ><><><><><><><><><><><><> 🐫 name ocaml-lsp-server all-installed-versions 1.15.1-5.0 [5.0.0]
My emacs config for ocaml
The text was updated successfully, but these errors were encountered: