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

VSCode Calva hangs REPL Connection when launching synths/instruments #477

Open
triss opened this issue Dec 24, 2021 · 1 comment
Open

VSCode Calva hangs REPL Connection when launching synths/instruments #477

triss opened this issue Dec 24, 2021 · 1 comment

Comments

@triss
Copy link
Contributor

triss commented Dec 24, 2021

My connection to the REPL in VSCode Calva drops when launching a synth or an instrument. Nothing is reported output.calva-repl,

All other interactions with REPL seem ok.

This hang only appears to occur after playing an instrument/synth. The sound plays but then I can no longer send any more code to REPL and I stop seeing responses to any commands I submit to it.

It is only when playing sounds that connection to REPL stops working. definst, defsynth etc all work ok.

(NB:- I can copy and paste code to REPL running on command line and everything is ok.)

How do I begin to debug this?

@Chickensoupwithrice
Copy link

Chickensoupwithrice commented Apr 2, 2022

I'm facing the same issue when using an nrepl through Conjure on Nvim, I don't think it's any "plugin" specific but something to do with the nrepl itself. I managed to largely mitigate this issue by loading overtone.core instead of overtone.live and booting up an external scsynth instance that I connect to. So long as I only use my repl connection, things don't seem to break. When they do I need to restart the repl which is annoying, but at least it's working?

After much bashing (interrupts to make the sound work again) of the nrepl I managed to get it to produce this error

Exception in thread "nREPL-session-b460f9e7-1c3b-439f-9e5c-f2ea5b55d8ec" java.net.SocketException: Socket closed
	at java.base/sun.nio.ch.NioSocketImpl.ensureOpenAndConnected(NioSocketImpl.java:165)
	at java.base/sun.nio.ch.NioSocketImpl.beginWrite(NioSocketImpl.java:366)
	at java.base/sun.nio.ch.NioSocketImpl.implWrite(NioSocketImpl.java:411)
	at java.base/sun.nio.ch.NioSocketImpl.write(NioSocketImpl.java:440)
	at java.base/sun.nio.ch.NioSocketImpl$2.write(NioSocketImpl.java:826)
	at java.base/java.net.Socket$SocketOutputStream.write(Socket.java:1035)
	at java.base/java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:81)
	at java.base/java.io.BufferedOutputStream.flush(BufferedOutputStream.java:142)
	at nrepl.transport$bencode$fn__12953.invoke(transport.clj:121)
	at nrepl.transport.FnTransport.send(transport.clj:28)
	at nrepl.middleware.print$send_nonstreamed.invokeStatic(print.clj:159)
	at nrepl.middleware.print$send_nonstreamed.invoke(print.clj:138)
	at nrepl.middleware.print$printing_transport$reify__13385.send(print.clj:174)
	at nrepl.middleware.caught$caught_transport$reify__13420.send(caught.clj:58)
	at nrepl.middleware.interruptible_eval$evaluate$fn__13486.invoke(interruptible_eval.clj:132)
	at clojure.main$repl$fn__8581.invoke(main.clj:263)
	at clojure.main$repl.invokeStatic(main.clj:261)
	at clojure.main$repl.doInvoke(main.clj:177)
	at clojure.lang.RestFn.invoke(RestFn.java:1523)
	at nrepl.middleware.interruptible_eval$evaluate.invokeStatic(interruptible_eval.clj:84)
	at nrepl.middleware.interruptible_eval$evaluate.invoke(interruptible_eval.clj:56)
	at nrepl.middleware.interruptible_eval$interruptible_eval$fn__13494$fn__13498.invoke(interruptible_eval.clj:152)
	at clojure.lang.AFn.run(AFn.java:22)
	at nrepl.middleware.session$session_exec$main_loop__13561$fn__13565.invoke(session.clj:202)
	at nrepl.middleware.session$session_exec$main_loop__13561.invoke(session.clj:201)
	at clojure.lang.AFn.run(AFn.java:22)
	at java.base/java.lang.Thread.run(Thread.java:833)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants