overtone / overtone

Collaborative Programmable Music
http://overtone.github.io
Other
5.94k stars 449 forks source link

Exception in Thread-9,11 and 6 for (boot-external-server) and TimeoutException for (connect-external-server) #383

Closed quazi-irfan closed 7 years ago

quazi-irfan commented 7 years ago

I am trying to run Overtone 0.10.1 with SuperCollider 3.8.0 on my Windows 10 64bit system and I am getting the following errors,

I was following the tutorial Connecting scsynth, and instead of (use 'overtone.core) I had to use (ns scratch.core (:require [overtone.core :refer :all])) or (ns user (:require [overtone.core :refer :all])) otherwise I'd get unresolved symbol error for (boot-external-server) and (connect-external-server 57110)

Using RELP - user namespace

With (boot-external-server)

user=>  (ns user (:require [overtone.core :refer :all]))
--> Loading Overtone...
--> Please boot a server to start making noise:
    * (boot-server)             ; boot default server (honours config)
    * (boot-internal-server)    ; boot an internal server
    * (boot-external-server)    ; boot an external server
    * (connect-external-server) ; connect to an existing external server

nil

user=> (boot-external-server)
--> Booting external SuperCollider server...
--> Connecting to external SuperCollider server: 127.0.0.1:36131
Exception in thread "Thread-9" java.lang.NullPointerException
        at java.io.File.<init>(File.java:277)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
        at clojure.lang.Reflector.invokeConstructor(Reflector.java:180)
        at overtone.sc.machinery.server.connection$external_booter.invokeStatic(connection.clj:229)
        at overtone.sc.machinery.server.connection$external_booter.invoke(connection.clj:224)
        at overtone.sc.machinery.server.connection$boot_external_server$fn__4091.invoke(connection.clj:308)
        at clojure.lang.AFn.run(AFn.java:22)
        at java.lang.Thread.run(Thread.java:748)

Exception Error: unable to connect to externally booted server after 50 attempts.  overtone.sc.machinery.server.connection/external-connection-runner (connection.clj:150)

With (connect-external-server 57110) when SuperCollider server running at port 57110

user=> (connect-external-server 57110)
--> Connecting to external SuperCollider server: 127.0.0.1:57110
java.util.concurrent.TimeoutException: deref! timeout error. Dereference took longer than 5000 ms whilst whilst turning server notifications on
        at overtone.helpers.lib$deref_BANG_.invokeStatic(lib.clj:275)
        at overtone.helpers.lib$deref_BANG_.invoke(lib.clj:261)
        at overtone.helpers.lib$deref_BANG_.invokeStatic(lib.clj:269)
        at overtone.helpers.lib$deref_BANG_.invoke(lib.clj:261)
        at overtone.sc.machinery.server.connection$server_notifications_on.invokeStatic(connection.clj:61)
        at overtone.sc.machinery.server.connection$server_notifications_on.invoke(connection.clj:30)
        at overtone.sc.machinery.server.connection$setup_connect_handlers$handler_fn__4041.invoke(connection.clj:109)
        at overtone.libs.handlers$run_handler.invokeStatic(handlers.clj:135)
        at overtone.libs.handlers$run_handler.invoke(handlers.clj:129)
        at overtone.libs.handlers$run_one_shot_handlers.invokeStatic(handlers.clj:199)
        at overtone.libs.handlers$run_one_shot_handlers.invoke(handlers.clj:193)
        at overtone.libs.handlers$emhs_handle_async_one_shots$fn__2671.invoke(handlers.clj:206)
        at clojure.lang.AFn.run(AFn.java:22)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:748)

Exception The following deps took too long (20 seconds) to be satisfied: :server-ready  overtone.libs.deps/wait-until-deps-satisfied (deps.clj:184)

Using RELP - scratch.core namespace

Using (boot-external-server)

user=> (ns scratch.core (:require [overtone.core :refer :all]))
--> Loading Overtone...
--> Please boot a server to start making noise:
    * (boot-server)             ; boot default server (honours config)
    * (boot-internal-server)    ; boot an internal server
    * (boot-external-server)    ; boot an external server
    * (connect-external-server) ; connect to an existing external server

nil
scratch.core=> (boot-external-server)
--> Booting external SuperCollider server...
--> Connecting to external SuperCollider server: 127.0.0.1:14696
Exception in thread "Thread-11" java.lang.NullPointerException
        at java.io.File.<init>(File.java:277)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
        at clojure.lang.Reflector.invokeConstructor(Reflector.java:180)
        at overtone.sc.machinery.server.connection$external_booter.invokeStatic(connection.clj:229)
        at overtone.sc.machinery.server.connection$external_booter.invoke(connection.clj:224)
        at overtone.sc.machinery.server.connection$boot_external_server$fn__4091.invoke(connection.clj:308)
        at clojure.lang.AFn.run(AFn.java:22)
        at java.lang.Thread.run(Thread.java:748)

Exception Error: unable to connect to externally booted server after 50 attempts.  overtone.sc.machinery.server.connection/external-connection-runner (connection.clj:150)

Using (connect-external-server 57110) when SuperCollider server running at port 57110

scratch.core=> (connect-external-server 57110)
--> Connecting to external SuperCollider server: 127.0.0.1:57110
java.util.concurrent.TimeoutException: deref! timeout error. Dereference took longer than 5000 ms whilst whilst turning server notifications on
        at overtone.helpers.lib$deref_BANG_.invokeStatic(lib.clj:275)
        at overtone.helpers.lib$deref_BANG_.invoke(lib.clj:261)
        at overtone.helpers.lib$deref_BANG_.invokeStatic(lib.clj:269)
        at overtone.helpers.lib$deref_BANG_.invoke(lib.clj:261)
        at overtone.sc.machinery.server.connection$server_notifications_on.invokeStatic(connection.clj:61)
        at overtone.sc.machinery.server.connection$server_notifications_on.invoke(connection.clj:30)
        at overtone.sc.machinery.server.connection$setup_connect_handlers$handler_fn__4041.invoke(connection.clj:109)
        at overtone.libs.handlers$run_handler.invokeStatic(handlers.clj:135)
        at overtone.libs.handlers$run_handler.invoke(handlers.clj:129)
        at overtone.libs.handlers$run_one_shot_handlers.invokeStatic(handlers.clj:199)
        at overtone.libs.handlers$run_one_shot_handlers.invoke(handlers.clj:193)
        at overtone.libs.handlers$emhs_handle_async_one_shots$fn__2671.invoke(handlers.clj:206)
        at clojure.lang.AFn.run(AFn.java:22)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:748)

Exception The following deps took too long (20 seconds) to be satisfied: :server-ready  overtone.libs.deps/wait-until-deps-satisfied (deps.clj:184)

Using Source File

With (boot-external-server)

src/scratch/core.clj contains,

(ns scratch.core (:require [overtone.core :refer :all]))

(defn -main []
    (boot-external-server)
)

lein run yeilds the following output,

--> Loading Overtone...
--> Please boot a server to start making noise:
    * (boot-server)             ; boot default server (honours config)
    * (boot-internal-server)    ; boot an internal server
    * (boot-external-server)    ; boot an external server
    * (connect-external-server) ; connect to an existing external server

--> Booting external SuperCollider server...
--> Connecting to external SuperCollider server: 127.0.0.1:47831
Exception in thread "Thread-6" java.lang.NullPointerException
        at java.io.File.<init>(File.java:277)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
        at clojure.lang.Reflector.invokeConstructor(Reflector.java:180)
        at overtone.sc.machinery.server.connection$external_booter.invokeStatic(connection.clj:229)
        at overtone.sc.machinery.server.connection$external_booter.invoke(connection.clj:224)
        at overtone.sc.machinery.server.connection$boot_external_server$fn__2865.invoke(connection.clj:308)
        at clojure.lang.AFn.run(AFn.java:22)
        at java.lang.Thread.run(Thread.java:748)
Exception in thread "main" java.lang.Exception: Error: unable to connect to externally booted server after 50 attempts., compiling:(C:\Users\irfan\AppData\Local\Temp\form-init4394510259547250245.clj:1:108)
        at clojure.lang.Compiler.load(Compiler.java:7391)
        at clojure.lang.Compiler.loadFile(Compiler.java:7317)
        at clojure.main$load_script.invokeStatic(main.clj:275)
        at clojure.main$init_opt.invokeStatic(main.clj:277)
        at clojure.main$init_opt.invoke(main.clj:277)
        at clojure.main$initialize.invokeStatic(main.clj:308)
        at clojure.main$null_opt.invokeStatic(main.clj:342)
        at clojure.main$null_opt.invoke(main.clj:339)
        at clojure.main$main.invokeStatic(main.clj:421)
        at clojure.main$main.doInvoke(main.clj:384)
        at clojure.lang.RestFn.invoke(RestFn.java:421)
        at clojure.lang.Var.invoke(Var.java:383)
        at clojure.lang.AFn.applyToHelper(AFn.java:156)
        at clojure.lang.Var.applyTo(Var.java:700)
        at clojure.main.main(main.java:37)
Caused by: java.lang.Exception: Error: unable to connect to externally booted server after 50 attempts.
        at overtone.sc.machinery.server.connection$external_connection_runner.invokeStatic(connection.clj:150)
        at overtone.sc.machinery.server.connection$external_connection_runner.invoke(connection.clj:128)
        at overtone.sc.machinery.server.connection$connect$fn__2833.invoke(connection.clj:173)
        at clojure.lang.AFn.run(AFn.java:22)
        at java.lang.Thread.run(Thread.java:748)
        at overtone.sc.machinery.server.connection$connect.invokeStatic(connection.clj:173)
        at overtone.sc.machinery.server.connection$connect.invoke(connection.clj:153)
        at overtone.sc.machinery.server.connection$boot_external_server.invokeStatic(connection.clj:316)
        at overtone.sc.machinery.server.connection$boot_external_server.invoke(connection.clj:297)
        at overtone.sc.machinery.server.connection$boot$fn__2874.invoke(connection.clj:354)
        at overtone.sc.machinery.server.connection$boot.invokeStatic(connection.clj:340)
        at overtone.sc.machinery.server.connection$boot.invoke(connection.clj:327)
        at overtone.sc.server$boot_external_server.invokeStatic(server.clj:135)
        at overtone.sc.server$boot_external_server.invoke(server.clj:128)
        at overtone.sc.server$boot_external_server.invokeStatic(server.clj:133)
        at overtone.sc.server$boot_external_server.invoke(server.clj:128)
        at overtone.sc.server$boot_external_server.invokeStatic(server.clj:132)
        at overtone.sc.server$boot_external_server.invoke(server.clj:128)
        at clojure.lang.Var.invoke(Var.java:375)
        at scratch2.core$_main.invokeStatic(core.clj:4)
        at scratch2.core$_main.invoke(core.clj:3)
        at clojure.lang.Var.invoke(Var.java:375)
        at user$eval5.invokeStatic(form-init4394510259547250245.clj:1)
        at user$eval5.invoke(form-init4394510259547250245.clj:1)
        at clojure.lang.Compiler.eval(Compiler.java:6927)
        at clojure.lang.Compiler.eval(Compiler.java:6917)
        at clojure.lang.Compiler.load(Compiler.java:7379)
        ... 14 more

Using (connect-external-server 57110) when SuperCollider server running at port 57110

src/scratch/core.clj contains,

(ns scratch2.core (:require [overtone.core :refer :all]))

(defn -main []
    (connect-external-server 57110)
)

lein run yeilds the following output,

--> Loading Overtone...
--> Please boot a server to start making noise:
    * (boot-server)             ; boot default server (honours config)
    * (boot-internal-server)    ; boot an internal server
    * (boot-external-server)    ; boot an external server
    * (connect-external-server) ; connect to an existing external server

--> Connecting to external SuperCollider server: 127.0.0.1:57110
java.util.concurrent.TimeoutException: deref! timeout error. Dereference took longer than 5000 ms whilst whilst turning server notifications on
        at overtone.helpers.lib$deref_BANG_.invokeStatic(lib.clj:275)
        at overtone.helpers.lib$deref_BANG_.invoke(lib.clj:261)
        at overtone.helpers.lib$deref_BANG_.invokeStatic(lib.clj:269)
        at overtone.helpers.lib$deref_BANG_.invoke(lib.clj:261)
        at overtone.sc.machinery.server.connection$server_notifications_on.invokeStatic(connection.clj:61)
        at overtone.sc.machinery.server.connection$server_notifications_on.invoke(connection.clj:30)
        at overtone.sc.machinery.server.connection$setup_connect_handlers$handler_fn__2815.invoke(connection.clj:109)
        at overtone.libs.handlers$run_handler.invokeStatic(handlers.clj:135)
        at overtone.libs.handlers$run_handler.invoke(handlers.clj:129)
        at overtone.libs.handlers$run_one_shot_handlers.invokeStatic(handlers.clj:199)
        at overtone.libs.handlers$run_one_shot_handlers.invoke(handlers.clj:193)
        at overtone.libs.handlers$emhs_handle_async_one_shots$fn__1445.invoke(handlers.clj:206)
        at clojure.lang.AFn.run(AFn.java:22)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:748)
Exception in thread "main" java.lang.Exception: The following deps took too long (20 seconds) to be satisfied: :server-ready, compiling:(C:\Users\irfan\AppData\Local\Temp\form-init5611101397773523451.clj:1:108)
        at clojure.lang.Compiler.load(Compiler.java:7391)
        at clojure.lang.Compiler.loadFile(Compiler.java:7317)
        at clojure.main$load_script.invokeStatic(main.clj:275)
        at clojure.main$init_opt.invokeStatic(main.clj:277)
        at clojure.main$init_opt.invoke(main.clj:277)
        at clojure.main$initialize.invokeStatic(main.clj:308)
        at clojure.main$null_opt.invokeStatic(main.clj:342)
        at clojure.main$null_opt.invoke(main.clj:339)
        at clojure.main$main.invokeStatic(main.clj:421)
        at clojure.main$main.doInvoke(main.clj:384)
        at clojure.lang.RestFn.invoke(RestFn.java:421)
        at clojure.lang.Var.invoke(Var.java:383)
        at clojure.lang.AFn.applyToHelper(AFn.java:156)
        at clojure.lang.Var.applyTo(Var.java:700)
        at clojure.main.main(main.java:37)
Caused by: java.lang.Exception: The following deps took too long (20 seconds) to be satisfied: :server-ready
        at overtone.libs.deps$wait_until_deps_satisfied.invokeStatic(deps.clj:184)
        at overtone.libs.deps$wait_until_deps_satisfied.invoke(deps.clj:168)
        at overtone.libs.deps$wait_until_deps_satisfied.invokeStatic(deps.clj:174)
        at overtone.libs.deps$wait_until_deps_satisfied.invoke(deps.clj:168)
        at overtone.sc.server$connect_external_server.invokeStatic(server.clj:125)
        at overtone.sc.server$connect_external_server.invoke(server.clj:118)
        at overtone.sc.server$connect_external_server.invokeStatic(server.clj:122)
        at overtone.sc.server$connect_external_server.invoke(server.clj:118)
        at clojure.lang.Var.invoke(Var.java:379)
        at scratch2.core$_main.invokeStatic(core.clj:4)
        at scratch2.core$_main.invoke(core.clj:3)
        at clojure.lang.Var.invoke(Var.java:375)
        at user$eval5.invokeStatic(form-init5611101397773523451.clj:1)
        at user$eval5.invoke(form-init5611101397773523451.clj:1)
        at clojure.lang.Compiler.eval(Compiler.java:6927)
        at clojure.lang.Compiler.eval(Compiler.java:6917)
        at clojure.lang.Compiler.load(Compiler.java:7379)
        ... 14 more
hlolli commented 7 years ago

Solved here: https://groups.google.com/forum/#!topic/overtone/oXr08tUYG2Y

quazi-irfan commented 7 years ago

No, this issue isn't solved at the google group discussion.

The Google group discussion is about not able to resolve 'boot-external-server', and importing namespace correctly solves it. It's an user error.

But this issue is the what happens after you initiate the process of booting an external or internal supercollider server. And it's probably an internal overtone issue. That's why I posted it here.

(All of those posts including the Stackoverflow thread is created by me.)

hlolli commented 7 years ago

Ok, I've spotted some boot-external-server bugs that I'm going to fix in next days, I let you know and you can give it a try. Sorry for the false assumption that thos posts were related, nobody has gone trough the tickets for such a long time so I've been trying to filter some of them out.

KelvinL95 commented 7 years ago

Any update i am currently having trouble with the same bug

With (connect-external-server 57110) when SuperCollider server running at port 57110

quazi-irfan commented 7 years ago

@KelvinL95 One temporary solution is to install 32bit JRE, and point leiningen to 32bit JRE.

hlolli commented 7 years ago

@KelvinL95 A bit terminology confusion, understandibly, (got me confused too).

(boot-internal-server) = uses JNA to load native supercollider library files (so supercollider does not need to installed on your system) (boot-external-server) = uses your supercollider installation, runs scsynth and boots it on a given port number. (connect-to-external-server) = uses no installation, just connects to scsynth via osc (but most likely you end up using this when you start supercollider and boot it yousrself on your computer).

What you are doing, is that you are starting Supercollider yourself and when Overtone tries to boot on that port number, it is ocupied and you wont connect. You can only do either, have Overtone boot SC or you boot SC, but you can't do both (at least on the same port number).

KelvinL95 commented 7 years ago

I am on a windows computer and cant use "internal servers" bc of native libraries or something so i changed my config to 'external'

Code

Havent started supercollider

user=> (use 'overtone.core) (boot-external-server)
--> Loading Overtone...
--> Please boot a server to start making noise:
    * (boot-server)             ; boot default server (honours config)
    * (boot-internal-server)    ; boot an internal server
    * (boot-external-server)    ; boot an external server
    * (connect-external-server) ; connect to an existing external server

nil
--> Booting external SuperCollider server...
--> Connecting to external SuperCollider server: 127.0.0.1:7401

Exception Error: unable to connect to externally booted server after 50 attempts.  overtone.sc.machinery.server.connection/external-connection-runner (connection.clj:150)

user=> (use 'overtone.core)
nil

user=> (use 'overtone.live)

IllegalStateException ->ShellStringList already refers to: #'overtone.core/->ShellStringList in namespace: user  clojure.lang.Namespace.warnOrFailOnReplace (Namespace.java:88)

When having supercollider boot and run a server

user=> (use 'overtone.core) (connect-external-server 57110)
nil
--> Connecting to external SuperCollider server: 127.0.0.1:57110
java.util.concurrent.TimeoutException: deref! timeout error. Dereference took longer than 5000 ms whilst whilst turning server notifications on
        at overtone.helpers.lib$deref_BANG_.invokeStatic(lib.clj:275)
        at overtone.helpers.lib$deref_BANG_.invoke(lib.clj:261)
        at overtone.helpers.lib$deref_BANG_.invokeStatic(lib.clj:269)
        at overtone.helpers.lib$deref_BANG_.invoke(lib.clj:261)
        at overtone.sc.machinery.server.connection$server_notifications_on.invokeStatic(connection.clj:61)
        at overtone.sc.machinery.server.connection$server_notifications_on.invoke(connection.clj:30)
        at overtone.sc.machinery.server.connection$setup_connect_handlers$handler_fn__4032.invoke(connection.clj:109)
        at overtone.libs.handlers$run_handler.invokeStatic(handlers.clj:135)
        at overtone.libs.handlers$run_handler.invoke(handlers.clj:129)
        at overtone.libs.handlers$run_one_shot_handlers.invokeStatic(handlers.clj:199)
        at overtone.libs.handlers$run_one_shot_handlers.invoke(handlers.clj:193)
        at overtone.libs.handlers$emhs_handle_async_one_shots$fn__2667.invoke(handlers.clj:206)
        at clojure.lang.AFn.run(AFn.java:22)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:748)
KelvinL95 commented 7 years ago

and after shutting down server and closing out of supercollider, i tried this

user=> (use 'overtone.core) (connect-external-server 57110)
nil
--> Connecting to external SuperCollider server: 127.0.0.1:57110
java.util.concurrent.TimeoutException: deref! timeout error. Dereference took longer than 5000 ms whilst whilst turning server notifications on
        at overtone.helpers.lib$deref_BANG_.invokeStatic(lib.clj:275)
        at overtone.helpers.lib$deref_BANG_.invoke(lib.clj:261)
        at overtone.helpers.lib$deref_BANG_.invokeStatic(lib.clj:269)
        at overtone.helpers.lib$deref_BANG_.invoke(lib.clj:261)
        at overtone.sc.machinery.server.connection$server_notifications_on.invokeStatic(connection.clj:61)
        at overtone.sc.machinery.server.connection$server_notifications_on.invoke(connection.clj:30)
        at overtone.sc.machinery.server.connection$setup_connect_handlers$handler_fn__4032.invoke(connection.clj:109)
        at overtone.libs.handlers$run_handler.invokeStatic(handlers.clj:135)
        at overtone.libs.handlers$run_handler.invoke(handlers.clj:129)
        at overtone.libs.handlers$run_one_shot_handlers.invokeStatic(handlers.clj:199)
        at overtone.libs.handlers$run_one_shot_handlers.invoke(handlers.clj:193)
        at overtone.libs.handlers$emhs_handle_async_one_shots$fn__2667.invoke(handlers.clj:206)
        at clojure.lang.AFn.run(AFn.java:22)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:748)

Also tried on different port number

user=> (use 'overtone.core) (boot-external-server 57112)
nil

Exception Can't boot as a server is already connected/connecting!  overtone.sc.machinery.server.connection/boot/fn--4091 (connection.clj:341)
hlolli commented 7 years ago

What strikes me here is this message

IllegalStateException ->ShellStringList already refers to: #'overtone.core/->ShellStringList in namespace: user  clojure.lang.Namespace.warnOrFailOnReplace (Namespace.java:88)

For completion, (sorry for being bit annoying, this is annoying system and needs to be updated), then because Overtone has a bug where you can only make one connection attempt per repl session (it doesn't clear the connection state on failure), could you exit the repl and repeat this

user=> (use 'overtone.core) (boot-external-server 57112)
nil

and before doing that, make sure that there's no scsynth zombie process running.

KelvinL95 commented 7 years ago

I am gonna try again after rebooting computer, but this happened just now

user=> (use 'overtone.core) (boot-external-server 57112)
--> Loading Overtone...
--> Please boot a server to start making noise:
    * (boot-server)             ; boot default server (honours config)
    * (boot-internal-server)    ; boot an internal server
    * (boot-external-server)    ; boot an external server
    * (connect-external-server) ; connect to an existing external server

nil
--> Booting external SuperCollider server...
--> Connecting to external SuperCollider server: 127.0.0.1:57112

Exception Error: unable to connect to externally booted server after 50 attempts.  overtone.sc.machinery.server.connection/external-connection-runner (connection.clj:150)

I just tried again after restart and getting the same problem, even tried port 57110

hlolli commented 7 years ago

Ok I borrowed my mom's old HP laptop. Installed Java 1.8 and leiningen. Then I downloaded Overtone 10.1 https://github.com/overtone/overtone/archive/0.10.1.zip Unzipped it (into a directory I called Supercollider but its misleading directory since Supercollider is not installed on this computer). And ran it. Worked at first try on this HP Windows 10 64bit. I give the upstream branch a try and post those results (or bug) in few moments.

Microsoft Windows [Version 10.0.14393]
(c) 2016 Microsoft Corporation. All rights reserved.

C:\Users\Obby>java
Usage: java [-options] class [args...]
           (to execute a class)
   or  java [-options] -jar jarfile [args...]
           (to execute a jar file)
where options include:
    -d32          use a 32-bit data model if available
    -d64          use a 64-bit data model if available
    -client       to select the "client" VM
    -server       to select the "server" VM
                  The default VM is client.

    -cp <class search path of directories and zip/jar files>
    -classpath <class search path of directories and zip/jar files>
                  A ; separated list of directories, JAR archives,
                  and ZIP archives to search for class files.
    -D<name>=<value>
                  set a system property
    -verbose:[class|gc|jni]
                  enable verbose output
    -version      print product version and exit
    -version:<value>
                  Warning: this feature is deprecated and will be removed
                  in a future release.
                  require the specified version to run
    -showversion  print product version and continue
    -jre-restrict-search | -no-jre-restrict-search
                  Warning: this feature is deprecated and will be removed
                  in a future release.
                  include/exclude user private JREs in the version search
    -? -help      print this help message
    -X            print help on non-standard options
    -ea[:<packagename>...|:<classname>]
    -enableassertions[:<packagename>...|:<classname>]
                  enable assertions with specified granularity
    -da[:<packagename>...|:<classname>]
    -disableassertions[:<packagename>...|:<classname>]
                  disable assertions with specified granularity
    -esa | -enablesystemassertions
                  enable system assertions
    -dsa | -disablesystemassertions
                  disable system assertions
    -agentlib:<libname>[=<options>]
                  load native agent library <libname>, e.g. -agentlib:hprof
                  see also, -agentlib:jdwp=help and -agentlib:hprof=help
    -agentpath:<pathname>[=<options>]
                  load native agent library by full pathname
    -javaagent:<jarpath>[=<options>]
                  load Java programming language agent, see java.lang.instrument
    -splash:<imagepath>
                  show splash screen with specified image
See http://www.oracle.com/technetwork/java/javase/documentation/index.html for more details.

C:\Users\Obby>lein
Leiningen is a tool for working with Clojure projects.

Several tasks are available:
change              Rewrite project.clj by applying a function.
check               Check syntax and warn on reflection.
classpath           Print the classpath of the current project.
clean               Remove all files from project's target-path.
compile             Compile Clojure source into .class files.
deploy              Build and deploy jar to remote repository.
deps                Download all dependencies.
do                  Higher-order task to perform other tasks in succession.
help                Display a list of tasks or help for a given task.
install             Install the current project to the local repository.
jar                 Package up all the project's files into a jar file.
javac               Compile Java source files.
new                 Generate project scaffolding based on a template.
plugin              DEPRECATED. Please use the :user profile instead.
pom                 Write a pom.xml file to disk for Maven interoperability.
release             Perform :release-tasks.
repl                Start a repl session either with the current project or standalone.
retest              Run only the test namespaces which failed last time around.
run                 Run a -main function with optional command-line arguments.
search              Search remote maven repositories for matching jars.
show-profiles       List all available profiles or display one if given an argument.
test                Run the project's tests.
trampoline          Run a task without nesting the project's JVM inside Leiningen's.
uberjar             Package up the project files and dependencies into a jar file.
update-in           Perform arbitrary transformations on your project map.
upgrade             Upgrade Leiningen to specified version or latest stable.
vcs                 Interact with the version control system.
version             Print version for Leiningen and the current JVM.
with-profile        Apply the given task with the profile(s) specified.

Run `lein help $TASK` for details.

Global Options:
  -o             Run a task offline.
  -U             Run a task after forcing update of snapshots.
  -h, --help     Print this help or help for a specific task.
  -v, --version  Print Leiningen's version.

These aliases are available:
downgrade, expands to upgrade

See also: readme, faq, tutorial, news, sample, profiles, deploying, gpg,
mixed-source, templates, and copying.
C:\Users\Obby>lein upgrade

C:\Users\Obby>cd Documents\supercollider\overtone-0.10.1

C:\Users\Obby\Documents\supercollider\overtone-0.10.1>lein repl
Retrieving org/clojure/clojure/1.5.1/clojure-1.5.1.pom from central
Retrieving org/sonatype/oss/oss-parent/5/oss-parent-5.pom from central
Retrieving org/clojure/data.json/0.2.3/data.json-0.2.3.pom from central
Retrieving org/clojure/pom.contrib/0.1.2/pom.contrib-0.1.2.pom from central
Retrieving org/sonatype/oss/oss-parent/7/oss-parent-7.pom from central
Retrieving org/clojure/clojure/1.4.0/clojure-1.4.0.pom from central
Retrieving clj-native/clj-native/0.9.3/clj-native-0.9.3.pom from clojars
Retrieving net/java/dev/jna/jna/3.4.0/jna-3.4.0.pom from central
Retrieving overtone/at-at/1.2.0/at-at-1.2.0.pom from clojars
Retrieving org/clojure/clojure/1.3.0/clojure-1.3.0.pom from central
Retrieving overtone/osc-clj/0.9.0/osc-clj-0.9.0.pom from clojars
Retrieving javax/jmdns/jmdns/3.4.1/jmdns-3.4.1.pom from central
Retrieving commons-net/commons-net/3.0.1/commons-net-3.0.1.pom from central
Retrieving org/apache/commons/commons-parent/21/commons-parent-21.pom from central
Retrieving org/apache/apache/9/apache-9.pom from central
Retrieving overtone/at-at/1.1.1/at-at-1.1.1.pom from clojars
Retrieving overtone/byte-spec/0.3.1/byte-spec-0.3.1.pom from clojars
Retrieving overtone/midi-clj/0.5.0/midi-clj-0.5.0.pom from clojars
Retrieving overtone/at-at/1.0.0/at-at-1.0.0.pom from clojars
Retrieving overtone/libs.handlers/0.2.0/libs.handlers-0.2.0.pom from clojars
Retrieving overtone/scsynth/3.5.7.0/scsynth-3.5.7.0.pom from clojars
Retrieving overtone/scsynth-extras/3.5.7.0/scsynth-extras-3.5.7.0.pom from clojars
Retrieving clj-glob/clj-glob/1.0.0/clj-glob-1.0.0.pom from clojars
Retrieving org/clojure/clojure/1.2.0/clojure-1.2.0.pom from central
Retrieving org/clojure/tools.nrepl/0.2.12/tools.nrepl-0.2.12.pom from central
Retrieving clojure-complete/clojure-complete/0.2.4/clojure-complete-0.2.4.pom from clojars
Retrieving org/clojure/data.json/0.2.3/data.json-0.2.3.jar from central
Retrieving org/clojure/clojure/1.5.1/clojure-1.5.1.jar from central
Retrieving net/java/dev/jna/jna/3.4.0/jna-3.4.0.jar from central
Retrieving javax/jmdns/jmdns/3.4.1/jmdns-3.4.1.jar from central
Retrieving commons-net/commons-net/3.0.1/commons-net-3.0.1.jar from central
Retrieving org/clojure/tools.nrepl/0.2.12/tools.nrepl-0.2.12.jar from central
Retrieving overtone/at-at/1.2.0/at-at-1.2.0.jar from clojars
Retrieving overtone/byte-spec/0.3.1/byte-spec-0.3.1.jar from clojars
Retrieving overtone/midi-clj/0.5.0/midi-clj-0.5.0.jar from clojars
Retrieving overtone/libs.handlers/0.2.0/libs.handlers-0.2.0.jar from clojars
Retrieving overtone/osc-clj/0.9.0/osc-clj-0.9.0.jar from clojars
Retrieving clj-native/clj-native/0.9.3/clj-native-0.9.3.jar from clojars
Retrieving clj-glob/clj-glob/1.0.0/clj-glob-1.0.0.jar from clojars
Retrieving clojure-complete/clojure-complete/0.2.4/clojure-complete-0.2.4.jar from clojars
Retrieving overtone/scsynth/3.5.7.0/scsynth-3.5.7.0.jar from clojars
Retrieving overtone/scsynth-extras/3.5.7.0/scsynth-extras-3.5.7.0.jar from clojars
nREPL server started on port 50985 on host 127.0.0.1 - nrepl://127.0.0.1:50985
REPL-y 0.3.7, nREPL 0.2.12
Clojure 1.5.1
Java HotSpot(TM) Client VM 1.8.0_131-b11
    Docs: (doc function-name-here)
          (find-doc "part-of-name-here")
  Source: (source function-name-here)
 Javadoc: (javadoc java-object-or-class-here)
    Exit: Control+D or (exit) or (quit)
 Results: Stored in vars *1, *2, *3, an exception in *e

user=> (use 'overtone.live)
--> Loading Overtone...
--> Booting internal SuperCollider server...
--> Connecting to internal SuperCollider server...
--> Connection established

    _____                 __
   / __  /_  _____  _____/ /_____  ____  ___
  / / / / | / / _ \/ ___/ __/ __ \/ __ \/ _ \
 / /_/ /| |/ /  __/ /  / /_/ /_/ / / / /  __/
 \____/ |___/\___/_/   \__/\____/_/ /_/\___/

   Collaborative Programmable Music. v0.10.1

Hello Obby, may this be the start of a beautiful music hacking session...

nil
user=> (demo (sin-osc))
#<synth-node[loading]: user/audition-synth 33>
user=> (demo (sin-osc))
#<synth-node[loading]: user/audition-synth 34>
user=> Bye for now!

user=>
hlolli commented 7 years ago

Same computer with the latest upstream branch I downloaded https://github.com/overtone/overtone/archive/master.zip

C:\Users\Obby\Documents\supercollider\overtone-0.10.1>cd ..

C:\Users\Obby\Documents\supercollider>cd overtone-master

C:\Users\Obby\Documents\supercollider\overtone-master>cd overtone-master

C:\Users\Obby\Documents\supercollider\overtone-master\overtone-master>lein repl                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         Retrieving org/clojure/clojure/1.9.0-alpha17/clojure-1.9.0-alpha17.pom from central
Retrieving org/clojure/spec.alpha/0.1.123/spec.alpha-0.1.123.pom from central
Retrieving org/clojure/pom.contrib/0.2.2/pom.contrib-0.2.2.pom from central
Retrieving org/clojure/core.specs.alpha/0.1.10/core.specs.alpha-0.1.10.pom from central
Retrieving org/clojure/data.json/0.2.6/data.json-0.2.6.pom from central
Retrieving clj-native/clj-native/0.9.5/clj-native-0.9.5.pom from clojars
Retrieving org/clojure/clojure/1.6.0/clojure-1.6.0.pom from central
Retrieving net/java/dev/jna/jna/4.1.0/jna-4.1.0.pom from central
Retrieving org/clojure/data.json/0.2.6/data.json-0.2.6.jar from central
Retrieving org/clojure/spec.alpha/0.1.123/spec.alpha-0.1.123.jar from central
Retrieving org/clojure/core.specs.alpha/0.1.10/core.specs.alpha-0.1.10.jar from central
Retrieving net/java/dev/jna/jna/4.1.0/jna-4.1.0.jar from central
Retrieving org/clojure/clojure/1.9.0-alpha17/clojure-1.9.0-alpha17.jar from central
Retrieving clj-native/clj-native/0.9.5/clj-native-0.9.5.jar from clojars
nREPL server started on port 54354 on host 127.0.0.1 - nrepl://127.0.0.1:54354
REPL-y 0.3.7, nREPL 0.2.12
Clojure 1.9.0-alpha17
Java HotSpot(TM) Client VM 1.8.0_131-b11
    Docs: (doc function-name-here)
          (find-doc "part-of-name-here")
  Source: (source function-name-here)
 Javadoc: (javadoc java-object-or-class-here)
    Exit: Control+D or (exit) or (quit)
 Results: Stored in vars *1, *2, *3, an exception in *e

user=> (use 'overtone.live)
--> Loading Overtone...
--> Booting internal SuperCollider server...
--> Connecting to internal SuperCollider server...
--> Connection established

    _____                 __
   / __  /_  _____  _____/ /_____  ____  ___
  / / / / | / / _ \/ ___/ __/ __ \/ __ \/ _ \
 / /_/ /| |/ /  __/ /  / /_/ /_/ / / / /  __/
 \____/ |___/\___/_/   \__/\____/_/ /_/\___/

   Collaborative Programmable Music. v0.10.2

Hey Obby, I feel something magical is only just beyond the horizon...

nil
user=> (demo (sin-osc))
#<synth-node[loading]: user/audition-synth 33>
user=> (demo (sin-osc))
#<synth-node[loading]: user/audition-synth 34>
user=>
KelvinL95 commented 7 years ago

i just tried this and i got a error for live

C:\Apps\supercollider\overtone-master>lein repl
nREPL server started on port 51271 on host 127.0.0.1 - nrepl://127.0.0.1:51271
REPL-y 0.3.7, nREPL 0.2.12
Clojure 1.9.0-alpha17
Java HotSpot(TM) 64-Bit Server VM 1.8.0_141-b15
    Docs: (doc function-name-here)
          (find-doc "part-of-name-here")
  Source: (source function-name-here)
 Javadoc: (javadoc java-object-or-class-here)
    Exit: Control+D or (exit) or (quit)
 Results: Stored in vars *1, *2, *3, an exception in *e

user=> (use 'overtone.live)
--> Loading Overtone...

CompilerException java.lang.Exception: Unable to locate a valid scsynth executable on your system. I looked in the following places: ["\\scsynth.exe"], compiling:(overtone/live.clj:6:1)

And i just tried overtone.core and boot external on 51770

> 
> user=> (use 'overtone.core) (boot-internal-server 51770)
> nil
> 
> ArityException Wrong number of args (1) passed to: server/boot-internal-server  clojure.lang.AFn.throwArity (AFn.java:429)
> user=> (use 'overtone.core) (boot-external-server 51770)
> nil
> Exception Unable to locate a valid scsynth executable on your system. I looked in the following places: ["\\scsynth.exe"]  overtone.sc.machinery.server.connection/find-sc-path (connection.clj:258)
KelvinL95 commented 7 years ago

I have a windows 64 bit computer Java 1.8.0_ 144 Lein 2.7.1 Reinstalled SuperCollider 3.8.0 and downloaded newest overtone.zip from github java and lein are on path

tried (use 'overtone.core) (boot-external-server 51770)


user=> (use 'overtone.core) (boot-external-server 51770)

FileNotFoundException Could not locate overtone/core__init.class or overtone/core.clj on classpath.  clojure.lang.RT.load (RT.java:456)

CompilerException java.lang.RuntimeException: Unable to resolve symbol: boot-external-server in this context, compiling:(C:\Users\Divin\AppData\Local\Temp\form-init279893754776830558.clj:1:1)
hlolli commented 7 years ago

Ok! very good! I believe this function here is causing the problem https://github.com/overtone/overtone/blob/f8d6323868a7c60442cc18ec075a12ec5aa18f26/src/overtone/helpers/lib.clj#L348

the path for sysynth.exe is not found. That means either you have Supercollider not fully installed on your computer, or, Supercollider installation path has changed from when this function was written. I guess I'll have to install supercollider on my moms computer to confirm and fix. Thanks for your patience, let's fix this! Otherwise (boot-internal-server) should work right?

KelvinL95 commented 7 years ago

The path for my supercollider is C:\Program Files\SuperCollider-3.8.0 i uninstalled SC to try it without it, after you said it worked without it on your moms comp but it didnt work so i tried with it and still no budge

just tried internal server

user=> (use 'overtone.core) (boot-internal-server)

FileNotFoundException Could not locate overtone/core__init.class or overtone/core.clj on classpath.  clojure.lang.RT.load (RT.java:456)

CompilerException java.lang.RuntimeException: Unable to resolve symbol: boot-internal-server in this context, compiling:(C:\Users\Divin\AppData\Local\Temp\form-init7345522770128248615.clj:1:1)
KelvinL95 commented 7 years ago

so i looked for that file and its in my overtone folder and my projects folder C:\Apps\overtone-master\src\overtone C:\Users\Divin\Documents\CodingSpace\LeinProjects\overtonetry\src\overtonetry

Wait does SC need to be in my system environment variables also?

hlolli commented 7 years ago

No it tries to find Supercollider only inside Program Files(x86) if that directory exists

p-files-dir (System/getenv "PROGRAMFILES(X86)")
p-files-dir (or p-files-dir (System/getenv "PROGRAMFILES"))

I will make a fix later tonight as for your boot-internal-server, you are sure you launced the clojure repl when you were inside the overtone root directory(where project.clj lives) in the CMD?

nai888 commented 7 years ago

I'm running into all of the same problems as previous posters.

hlolli commented 7 years ago

@nai888 thanks for this bug report, I believe the internal-server causes a zombie process, in effect, blocking the port number, related to this issue: https://github.com/overtone/overtone/issues/391

The search path for 64 bit is easy to add, I'll do that this week.

too many users is actually a server setting that needs to be changed: s.options.maxLogins = 5, you can add this manually or into a startup file.

nai888 commented 7 years ago

Thanks, @hlolli. I just tried updating s.options.maxLogins within SuperCollider and ran into the same error. SuperCollider's console still printed too many users, and the REPL still printed:

java.util.concurrent.TimeoutException: deref! timeout error. Dereference took longer than 5000 ms whilst whilst turning server notifications on
    at overtone.helpers.lib$deref_BANG_.invokeStatic(lib.clj:275)
    at overtone.helpers.lib$deref_BANG_.invoke(lib.clj:261)
    at overtone.helpers.lib$deref_BANG_.invokeStatic(lib.clj:269)
    at overtone.helpers.lib$deref_BANG_.invoke(lib.clj:261)
    at overtone.sc.machinery.server.connection$server_notifications_on.invokeStatic(connection.clj:61)
    at overtone.sc.machinery.server.connection$server_notifications_on.invoke(connection.clj:30)
    at overtone.sc.machinery.server.connection$setup_connect_handlers$handler_fn__4866.invoke(connection.clj:109)
    at overtone.libs.handlers$run_handler.invokeStatic(handlers.clj:135)
    at overtone.libs.handlers$run_handler.invoke(handlers.clj:129)
    at overtone.libs.handlers$run_one_shot_handlers.invokeStatic(handlers.clj:199)
    at overtone.libs.handlers$run_one_shot_handlers.invoke(handlers.clj:193)
    at overtone.libs.handlers$emhs_handle_async_one_shots$fn__3415.invoke(handlers.clj:206)
    at clojure.lang.AFn.run(AFn.java:22)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:748)
Exception The following deps took too long (20 seconds) to be satisfied: :server-ready  overtone.libs.deps/wait-until-deps-satisfied (deps.clj:184)

I tried setting the maxLogins to 5, 25, 100, 500… All with the same result.

hlolli commented 7 years ago

@nai888 is s the name of your server object, do you start it with s.boot; ? That's strange, I had too many users error before, but the maxLogins fixed it.

nai888 commented 7 years ago

@hlolli You were right to ask! I had just booted the server from the toolbar in the SC IDE.

For some reason s.options.maxLogins = 5 still didn't work, but s.options.maxLogins = 50 did. I'm now listening to some super-sweet sounds of saw synths!

GustavBertram commented 7 years ago

@hlolli I think you can close this ticket after approving #399. I've added a bit of info to the wiki that details gotchas for Windows.