Fork me on GitHub
#calva
<
2022-05-24
>
Geoffrey Gaillard08:05:12

Hello! My vscode window crashes regularly. I suspect clojure-lsp suggestions or documentation on hover, or a calva related feature. I disabled every extension but calva. How may I diagnose these crashes?

👍 1
Pragyan Tripathi09:05:45

I have been facing the similar issues with vscode and calva.

seancorfield14:05:23

What platform are you running it on and what version is it? If you disable Calva, is it more stable?

seancorfield15:05:09

(I have VS Code open for days with Calva and several other "big" extensions and it never crashes -- macOS 10.12 and VS Code 1.67.2 and Calva v2.0.275, but I'm just about to update to .276)

pez15:05:39

VS Code has crashed on me once, ever. I juggle on average 6-8 VS Code windows, each with their own Calva + clojure-lsp running. Not saying this isn't Calva or clojure-lsp, but there must be something special happening. Not that I have a clue about what it could be. When did this start to happen? Is it the window that crashes or the whole VS Code? (You can test this by having a separate VS Code window open and see if that one crashes together with the one where you use Calva.) Since you suspect documentation hovers, could it be some special var you are hovering? Could be something there that makes Calva or clojure-lsp to croak.

Geoffrey Gaillard17:05:46

Thank you for your answers 🙂 • On macOS 11.6.5, vscode 1.67.2, calva 2.0.276. • Yes it is more stable if I disable calva. It is stable if calva is enabled but clojure-lsp is stopped. • It started to happen 5 days ago. • The window is crashing, not the whole VS Code. • It happens on any vars, randomly. Is there a way to get a crash report for the window?

ericdallo18:05:59

clojure-lsp is a separated process from editor, I never saw a editor crash because of this external process with issues (if any)

pez19:05:54

Very strange. Check the clojure-lsp logs after the crashes and see what's being logged last thing. Maybe we can see some pattern to it.

Geoffrey Gaillard14:05:07

This is not a calva nor clojure-lsp bug. The bug is triggered when clojure-lsp is running in my vscode instance, but the issue itself is in the electron renderer. I don't think clojure-lsp is responsible for it. It could be anything, like corrupted cache files or font rendering issues, for instance.

☝️ 1
matthew15:05:00

First, thanks to the Calva devs! Second, any recommendations for interacting with Calva from the command line? Perhaps it defeats the purpose of Calva… Looking to automate a fullstack dev boot.

matthew15:05:43

dev-server-calva-REPL:
	clojure -Sdeps '{:deps {nrepl/nrepl {:mvn/version,"0.9.0"},cider/cider-nrepl {:mvn/version,"0.27.4"}}}' -M -m nrepl.cmdline --middleware "[cider.nrepl/cider-middleware]"

dev-server-calva-load-core:
	calva.loadfile(...) ?

pez16:05:01

I don't know of a way to do that. Could a https://calva.io/connect-sequences/ be of use maybe? It has a badly named afterCLJReplJackInCode option that will allow you to run code once the Clojure REPL has been connected.

❤️ 1
matthew14:05:52

Thanks, pez. Will look into it

avi16:05:44

👋 hi, thank you Calva devs! I’m super impressed. Can someone clue me in as to why the REPL output would display ; Error printing return value (ExceptionInfo) at ... — what’s up with “error printing return value”?

avi16:05:03

it’s a fairly vanilla ExceptionInfo object… could it have something to do with the data map attached to the object? Maybe there’s an unprintable value in the map?

pez16:05:38

I get those at times, not just with ExceptionInfo objects. Never investigated what it could be about because it always happens when I need to focus on something else, I guess. Does it matter if you have pretty printing enabled or not?

avi16:05:55

I didn't know pretty printing was a thing. I'll try toggling it to see what happens. Thanks!

avi16:05:57

Doesn’t seem to make a difference

avi16:05:45

My guess is that maybe this is happening if the result of the form that’s evaluated is a lazy seq, and while it’s being realized for printing by the REPL, an exception is thrown out

avi17:05:10

If that’s right then perhaps the error message could be improved, because Error printing return value (ExceptionInfo) at … made me think that the return value itself was itself an ExceptionInfo object. So perhaps instead if could be something like Error printing return value (an ExceptionInfo was thrown while printing) at…

pez19:05:42

Issue welcome. PR too. 😃

avi19:05:19

:thumbsup: An issue, I can do. A PR, probably not any time soon. 🙃 Issue coming soon — thanks!!

🙏 1
bringe02:05:58

This post mentions this error, though idk if it’s helpful to you: https://souenzzo.com.br/reading-and-understanding-clojure-errors.html > Here a new thing: Error printing return value. it’s not a Execution error anymore. The code was executed, and returns a value. clojure.core/map returns a lazy-seq, and when the printer tryies to print the result, it throws. It seems your guess it correct.

pez07:05:59

Thanks for checking that up, @U9A1RLFNV! I did wonder why I had no clue about this error message. Generally, I think some way to help with understanding upstream error messages would be great. No idea how to do it, though. 😃

👍 1
avi16:05:29

Thanks Brandon!

👍 1