-
Notifications
You must be signed in to change notification settings - Fork 154
Crashes on my project in VsCode: Failure("Empty file") #525
Copy link
Copy link
Closed
Labels
Description
My code has a few dependencies so it will take some time to reproduce it. I'm trying on 4.12.1+flambda, ocamllsp 1.8.3
git clone git@github.com:Kakadu/OCanren.git -b bug-lsp-1 --depth=1 OCanren
cd OCanren
opam install z3 camlp5 ppx_expect benchmark --yes
dune build OCanren/src/OCanren.cmxa
code . OCanren/src/core/Core.mli -n
After opening the file in vscode, I get The OCaml Platform VS Code extension server crashed 5 times in the last 3 minutes. The server will not be restarted. and the following log in 'Output->OCaml Language Server': https://gist.github.com/Kakadu/d2584a02abeddb00d3450f00d2f4def9 Most interesting parts are:
[Error - 4:23:16 PM] Request textDocument/documentSymbol failed.
Message: uncaught exception
Code: -32603
[object Object]
and
ocamllsp: internal error, uncaught exception:
Abort: /-----------------------------------------------------------------------
| Internal error: Uncaught exception.
| Failure("Empty file")
| Raised at CamlinternalLazy.force_lazy_block.(fun) in file "camlinternalLazy.ml", line 35, characters 56-63
| Called from CamlinternalLazy.force_lazy_block in file "camlinternalLazy.ml", line 31, characters 17-27
| Re-raised at CamlinternalLazy.force_lazy_block in file "camlinternalLazy.ml", line 36, characters 4-11
| Called from Mpipeline.typer_result in file "ocaml-lsp-server/vendor/merlin/src/kernel/mpipeline.ml" (inlined), line 128, characters 21-30
| Called from Query_commands.dispatch in file "ocaml-lsp-server/vendor/merlin/src/frontend/query_commands.ml", line 645, characters 16-47
| Called from Merlin_utils__Std.let_ref in file "ocaml-lsp-server/vendor/merlin/src/utils/std.ml", line 685, characters 8-12
| Re-raised at Merlin_utils__Std.let_ref in file "ocaml-lsp-server/vendor/merlin/src/utils/std.ml", line 687, characters 30-39
| Called from Merlin_utils__Misc.try_finally in file "ocaml-lsp-server/vendor/merlin/src/utils/misc.ml", line 45, characters 8-15
| Re-raised at Merlin_utils__Misc.try_finally in file "ocaml-lsp-server/vendor/merlin/src/utils/misc.ml", line 62, characters 10-24
| Called from Stdlib__fun.protect in file "fun.ml", line 33, characters 8-15
| Re-raised at Stdlib__fun.protect in file "fun.ml", line 38, characters 6-52
| Called from Mocaml.with_state in file "ocaml-lsp-server/vendor/merlin/src/kernel/mocaml.ml", line 18, characters 8-38
| Re-raised at Mocaml.with_state in file "ocaml-lsp-server/vendor/merlin/src/kernel/mocaml.ml", line 20, characters 42-53
| Called from Stdune__Exn_with_backtrace.try_with in file "submodules/dune/otherlibs/stdune-unstable/exn_with_backtrace.ml", line 9, characters 8-12
| Re-raised at CamlinternalLazy.force_lazy_block.(fun) in file "camlinternalLazy.ml", line 35, characters 56-63
| Called from CamlinternalLazy.force_lazy_block in file "camlinternalLazy.ml", line 31, characters 17-27
| Re-raised at CamlinternalLazy.force_lazy_block in file "camlinternalLazy.ml", line 36, characters 4-11
| Called from Mpipeline.typer_result in file "ocaml-lsp-server/vendor/merlin/src/kernel/mpipeline.ml" (inlined), line 128, characters 21-30
| Called from Query_commands.dispatch in file "ocaml-lsp-server/vendor/merlin/src/frontend/query_commands.ml", line 656, characters 16-47
| Called from Ocaml_lsp_server.set_diagnostics.(fun) in file "ocaml-lsp-server/src/ocaml_lsp_server.ml", line 201, characters 27-67
| Called from Merlin_utils__Std.let_ref in file "ocaml-lsp-server/vendor/merlin/src/utils/std.ml", line 685, characters 8-12
| Re-raised at Merlin_utils__Std.let_ref in file "ocaml-lsp-server/vendor/merlin/src/utils/std.ml", line 687, characters 30-39
| Called from Merlin_utils__Misc.try_finally in file "ocaml-lsp-server/vendor/merlin/src/utils/misc.ml", line 45, characters 8-15
| Re-raised at Merlin_utils__Misc.try_finally in file "ocaml-lsp-server/vendor/merlin/src/utils/misc.ml", line 62, characters 10-24
| Called from Stdlib__fun.protect in file "fun.ml", line 33, characters 8-15
| Re-raised at Stdlib__fun.protect in file "fun.ml", line 38, characters 6-52
| Called from Mocaml.with_state in file "ocaml-lsp-server/vendor/merlin/src/kernel/mocaml.ml", line 18, characters 8-38
| Re-raised at Mocaml.with_state in file "ocaml-lsp-server/vendor/merlin/src/kernel/mocaml.ml", line 20, characters 42-53
| Called from Stdune__Exn_with_backtrace.try_with in file "submodules/dune/otherlibs/stdune-unstable/exn_with_backtrace.ml", line 9, characters 8-12
| Re-raised at Stdune__Exn.raise_with_backtrace in file "submodules/dune/otherlibs/stdune-unstable/exn.ml" (inlined), line 36, characters 27-56
| Called from Stdune__Exn_with_backtrace.reraise in file "submodules/dune/otherlibs/stdune-unstable/exn_with_backtrace.ml", line 18, characters 33-71
| Called from Fiber.O.(>>|).(fun) in file "submodules/dune/src/fiber/fiber.ml", line 288, characters 36-41
| Called from Fiber.Execution_context.run_jobs in file "submodules/dune/src/fiber/fiber.ml", line 204, characters 8-13
| Re-raised at Stdune__Exn.raise_with_backtrace in file "submodules/dune/otherlibs/stdune-unstable/exn.ml" (inlined), line 36, characters 27-56
| Called from Stdune__Exn_with_backtrace.reraise in file "submodules/dune/otherlibs/stdune-unstable/exn_with_backtrace.ml", line 18, characters 33-71
| Called from Fiber.Execution_context.run_jobs in file "submodules/dune/src/fiber/fiber.ml", line 208, characters 6-23
| Called from Fiber.Execution_context.run.(fun).loop in file "submodules/dune/src/fiber/fiber.ml", line 226, characters 12-27
| Called from Stdune__Exn.protectx in file "submodules/dune/otherlibs/stdune-unstable/exn.ml", line 12, characters 8-11
| Re-raised at Stdune__Exn.protectx in file "submodules/dune/otherlibs/stdune-unstable/exn.ml", line 18, characters 4-11
| Called from Fiber_unix__Scheduler.run_result in file "fiber-unix/src/scheduler.ml", line 401, characters 10-27
\-----------------------------------------------------------------------
Reactions are currently unavailable