The Wayback Machine - https://web.archive.org/web/20200905102455/https://github.com/crucialfelix/supercolliderjs/issues/32
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

Error booting #32

Open
tatecarson opened this issue Jun 30, 2017 · 9 comments
Open

Error booting #32

tatecarson opened this issue Jun 30, 2017 · 9 comments
Labels
bug

Comments

@tatecarson
Copy link

@tatecarson tatecarson commented Jun 30, 2017

Hello,

I get an error while booting attempting to boot:

node synthdef.js
debug  : Start process: /Applications/SuperCollider/SuperCollider.app/Contents/Resources/scsynth -u 57110
debug  : pid: 22767
stdout : Found 0 LADSPA plugins
stderr : {
             "type": "Buffer",
             "data": [
               50,
               48,
               49,
               55,
               45,
               48,
               54,
               45,
               50,
               57,
               32,
               49,
               56,
               58,
               49,
               56,
               58,
               49,
               50,
               46,
               56,
               52,
               50,
               32,
               115,
               99,
               115,
               121,
               110,
               116,
               104,
               91,
               50,
               50,
               55,
               54,
               55,
               58,
               55,
               50,
               57,
               49,
               49,
               51,
               93,
               32,
               69,
               114,
               114,
               111,
               114,
               32,
               108,
               111,
               97,
               100,
               105,
               110,
               103,
               32,
               47,
               76,
               105,
               98,
               114,
               97,
               114,
               121,
               47,
               65,
               117,
               100,
               105,
               111,
               47,
               80,
               108,
               117,
               103,
               45,
               73,
               110,
               115,
               47,
               72,
               65,
               76,
               47,
               68,
               105,
               103,
               105,
               100,
               101,
               115,
               105,
               103,
               110,
               32,
               67,
               111,
               114,
               101,
               65,
               117,
               100,
               105,
               111,
               46,
               112,
               108,
               117,
               103,
               105,
               110,
               47,
               67,
               111,
               110,
               116,
               101,
               110,
               116,
               115,
               47,
               77,
               97,
               99,
               79,
               83,
               47,
               68,
               105,
               103,
               105,
               100,
               101,
               115,
               105,
               103,
               110,
               32,
               67,
               111,
               114,
               101,
               65,
               117,
               100,
               105,
               111,
               58,
               32,
               32,
               100,
               108,
               111,
               112,
               101,
               110,
               40,
               47,
               76,
               105,
               98,
               114,
               97,
               114,
               121,
               47,
               65,
               117,
               100,
               105,
               111,
               47,
               80,
               108,
               117,
               103,
               45,
               73,
               110,
               115,
               47,
               72,
               65,
               76,
               47,
               68,
               105,
               103,
               105,
               100,
               101,
               115,
               105,
               103,
               110,
               32,
               67,
               111,
               114,
               101,
               65,
               117,
               100,
               105,
               111,
               46,
               112,
               108,
               117,
               103,
               105,
               110,
               47,
               67,
               111,
               110,
               116,
               101,
               110,
               116,
               115,
               47,
               77,
               97,
               99,
               79,
               83,
               47,
               68,
               105,
               103,
               105,
               100,
               101,
               115,
               105,
               103,
               110,
               32,
               67,
               111,
               114,
               101,
               65,
               117,
               100,
               105,
               111,
               44,
               32,
               50,
               54,
               50,
               41,
               58,
               32,
               110,
               111,
               32,
               115,
               117,
               105,
               116,
               97,
               98,
               108,
               101,
               32,
               105,
               109,
               97,
               103,
               101,
               32,
               102,
               111,
               117,
               110,
               100,
               46,
               32,
               32,
               68,
               105,
               100,
               32,
               102,
               105,
               110,
               100,
               58,
               10,
               9,
               47,
               76,
               105,
               98,
               114,
               97,
               114,
               121,
               47,
               65,
               117,
               100,
               105,
               111,
               47,
               80,
               108,
               117,
               103,
               45,
               73,
               110,
               115,
               47,
               72,
               65,
               76,
               47,
               68,
               105,
               103,
               105,
               100,
               101,
               115,
               105,
               103,
               110,
               32,
               67,
               111,
               114,
               101,
               65,
               117,
               100,
               105,
               111,
               46,
               112,
               108,
               117,
               103,
               105,
               110,
               47,
               67,
               111,
               110,
               116,
               101,
               110,
               116,
               115,
               47,
               77,
               97,
               99,
               79,
               83,
               47,
               68,
               105,
               103,
               105,
               100,
               101,
               115,
               105,
               103,
               110,
               32,
               67,
               111,
               114,
               101,
               65,
               117,
               100,
               105,
               111,
               58,
               32,
               110,
               111,
               32,
               109,
               97,
               116,
               99,
               104,
               105,
               110,
               103,
               32,
               97,
               114,
               99,
               104,
               105,
               116,
               101,
               99,
               116,
               117,
               114,
               101,
               32,
               105,
               110,
               32,
               117,
               110,
               105,
               118,
               101,
               114,
               115,
               97,
               108,
               32,
               119,
               114,
               97,
               112,
               112,
               101,
               114,
               10,
               9,
               47,
               76,
               105,
               98,
               114,
               97,
               114,
               121,
               47,
               65,
               117,
               100,
               105,
               111,
               47,
               80,
               108,
               117,
               103,
               45,
               73,
               110,
               115,
               47,
               72,
               65,
               76,
               47,
               68,
               105,
               103,
               105,
               100,
               101,
               115,
               105,
               103,
               110,
               32,
               67,
               111,
               114,
               101,
               65,
               117,
               100,
               105,
               111,
               46,
               112,
               108,
               117,
               103,
               105,
               110,
               47,
               67,
               111,
               110,
               116,
               101,
               110,
               116,
               115,
               47,
               77,
               97,
               99,
               79,
               83,
               47,
               68,
               105,
               103,
               105,
               100,
               101,
               115,
               105,
               103,
               110,
               32,
               67,
               111,
               114,
               101,
               65,
               117,
               100,
               105,
               111,
               58,
               32,
               110,
               111,
               32,
               109,
               97,
               116,
               99,
               104,
               105,
               110,
               103,
               32,
               97,
               114,
               99,
               104,
               105,
               116,
               101,
               99,
               116,
               117,
               114,
               101,
               32,
               105,
               110,
               32,
               117,
               110,
               105,
               118,
               101,
               114,
               115,
               97,
               108,
               32,
               119,
               114,
               97,
               112,
               112,
               101,
               114,
               10
             ]
           }
error  : Server exited. Exit code: null signal: SIGABRT
Unhandled rejection Error: Server failed to start in 3000ms
    at Timeout._onTimeout (/Users/tatecarson/Documents/Supercollider/_OrgExamples/Tutorials/crucialfelix/supercolliderjs-examples/node/node_modules/supercolliderjs/lib/server/server.js:338:20)
    at ontimeout (timers.js:365:14)
    at tryOnTimeout (timers.js:237:5)
    at Timer.listOnTimeout (timers.js:207:5)

I'm pretty sure my paths are correct because when installing I get this readout:

npm install

> [email protected] postinstall /Users/tatecarson/Documents/Supercollider/_OrgExamples/Tutorials/crucialfelix/supercolliderjs-examples/node
> npm run check-install


> [email protected] check-install /Users/tatecarson/Documents/Supercollider/_OrgExamples/Tutorials/crucialfelix/supercolliderjs-examples/node
> node -e "require('supercolliderjs').checkInstall()"

Checking supercollider.js install...
Default options:
{
  "debug": true,
  "echo": true,
  "stdin": true,
  "langPort": 57120,
  "serverPort": 57110,
  "host": "127.0.0.1",
  "protocol": "udp",
  "websocketPort": 4040,
  "sclang": "/Applications/SuperCollider/SuperCollider.app/Contents/MacOS/sclang",
  "scsynth": "/Applications/SuperCollider/SuperCollider.app/Contents/Resources/scsynth",
  "sclang_conf": "~/Library/Application Support/SuperCollider/sclang_conf.yaml",
  "configPath": "/Users/tatecarson/.supercollider.yaml"
}
Paths OK: /Applications/SuperCollider/SuperCollider.app/Contents/MacOS/sclang, /Applications/SuperCollider/SuperCollider.app/Contents/Resources/scsynth

Any obvious problems you can see? Anything I might be forgetting?

Also, i'm looking into ths again because I would like to be able to use some of sclang to control webaudio instead of scsynth so everythign can run in the browser. Can you see any reasons why this wouldn't work? It seems better than trying to rewrite all of the useful features of sclang again.

@crucialfelix
Copy link
Owner

@crucialfelix crucialfelix commented Jun 30, 2017

Well that is a SIGABRT that scsynth threw.

abort() sends the calling process the SIGABRT signal, this is how abort() basically works. abort() is usually called by library functions which detect an internal error or some seriously broken constraint.

It spat out a buffer to stderr which is odd. That seems like it was compiling the SynthDef. So it started scsynth and it started sclang and then posted that buffer to stderr.

Can you check that they the processes are starting up ? Maybe you already had a server running and there is an OSC address collision.

https://github.com/crucialfelix/supercolliderjs-examples/blob/develop/node/server/server-plus/synthdef.js#L30

you really want to use sclang ? hmm.

@tatecarson
Copy link
Author

@tatecarson tatecarson commented Jun 30, 2017

How do I go about checking if the processes are starting up? I was just trying again from a reboot so I don't think any servers were running. I get the same error, stdeer buffer, when trying to run examples that don't contain synthdefs such as boot-server.js.

As for sclang, it's not the language necessarily but the all the useful functionality that web audio or tonejs lacks. I'm thinking specifically of the patterns library.

@crucialfelix
Copy link
Owner

@crucialfelix crucialfelix commented Jul 1, 2017

I was thinking about porting the patterns library to javascript. It would actually be simpler to write it in js than sc. That library could be used with supercollider.js or for tone.js or for graphics. They are just numerical patterns.

@crucialfelix
Copy link
Owner

@crucialfelix crucialfelix commented Jul 1, 2017

Good news, I just got the same error. So I can figure it out now.

It acknowledges the notify request and then it quits. The synthdef send is after that.

server-plus ❯ node synthdef.js
stderr : *** ERROR: open directory failed './/Library/Application Support/SuperCollider/synthdefs'
stdout : Number of Devices: 6
stdout :    0 : "Built-in Microph"
stdout :    1 : "Built-in Output"
stdout :    2 : "HDMI"
stdout :    3 : "Soundflower (2ch)"
stdout :    4 : "Soundflower (64ch)"
stdout :    5 : "Multi-Output Device"
stdout : "Built-in Microph" Input Device
stdout :    Streams: 1
                 0  channels 2
stdout : "Built-in Output" Output Device
              Streams: 1
                 0  channels 2
stdout : SC_AudioDriver: sample rate = 44100.000000, driver's block size = 512
stdout : PublishPortToRendezvous 0 5855
           SuperCollider 3 server ready.
sendosc: {
             "oscType": "message",
             "address": "/notify",
             "args": [
               1
             ]
           }
rcvosc : [
             "/done",
             "/notify",
             0
           ]
error  : Server exited. Exit code: null signal: SIGKILL
sendosc: {
             "oscType": "message",
             "address": "/d_recv",
             "args": [
               {
                 "type": "Buffer",
                 "data": "534367660002017627562626c6573000c3f8d9168000040400042a000402d85393d23d7a3e4ccccd4080003f800040000c2c6003c23d7a000400003ecccccd41000408000000436f757400006776f62626c650001b696e6e6572576f62626c650002b72656c6561736554696d650003000157436f6e74726f6c100000004001111c42696e6172794f705547656e1000200010400000002ffffffff0000154c465361771000200010000010000ffffffff0001164d756c4164641000300010000020000ffffffff0002ffffffff0003154c465361771000200010000000002ffffffff0001164d756c4164641000300010000040000ffffffff0002ffffffff0003154c465361771000200010000000001ffffffff0001164d756c4164641000300010000060000ffffffff0004000500001b556e6172794f705547656e100010001011000700001653696e4f73632000200010000080000ffffffff00012c42696e6172794f705547656e2000200010200090000ffffffff000525436f6d624e20004000100000a0000ffffffff0006ffffffff0006ffffffff0007264d756c4164641000300010000060000ffffffff0004000300001b556e6172794f705547656e100010001011000c00001653696e4f736320002000100000d0000ffffffff00012c42696e6172794f705547656e20002000102000e0000ffffffff000525436f6d624e20004000100000f0000ffffffff0006ffffffff0006ffffffff000726456e7647656e100015000100ffffffff0008ffffffff0008ffffffff0001ffffffff0008ffffffff0009ffffffff0001ffffffff0002ffffffff000affffffff000affffffff0008ffffffff000bffffffff0008ffffffff0001ffffffff0008ffffffff0008ffffffff0008ffffffff0001ffffffff000100000003ffffffff0008ffffffff00011c42696e6172794f705547656e20002000102000b00000001100002c42696e6172794f705547656e20002000102000100000000110000234f7574200030000000000000000012000000013000000"
               },
               null
             ]
           }
(node:22832) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: Timed out waiting for OSC response: ["/done","/d_recv"]
(node:22832) DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
(node:22832) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 2): Error: Timed out waiting for OSC response: ["/done","/d_recv"]
@crucialfelix
Copy link
Owner

@crucialfelix crucialfelix commented Jul 1, 2017

watch -n 1 "ps aux | grep [s]csynth"

will watch for processes named scsynth, updating every second

@crucialfelix crucialfelix added the bug label Jul 1, 2017
@tatecarson
Copy link
Author

@tatecarson tatecarson commented Jul 1, 2017

I was thinking about porting the patterns library to javascript. It would actually be simpler to write it in js than sc. That library could be used with supercollider.js or for tone.js or for graphics. They are just numerical patterns.

I thought that's what you had already done with the server/patterns examples. Are those entirely unusable without booting the server first? My goal, for now, is really just to be able to use those patterns with tonejs. The methods for sequencing are much less advanced there, everything basically has to be built from scratch.

Good news, I just got the same error. So I can figure it out now.
It acknowledges the notify request and then it quits. The synthdef send is after that.

Do you know why this is happening. Is it just with this example or all of them?

watch -n 1 "ps aux | grep [s]csynth"
will watch for processes named scsynth, updating every second

When trying this is get an error command not found: watch

I can do this:

ps aux | grep scsynth
tatecarson        4573   1.1  0.1  3851924  14224   ??  S     3:54PM  17:04.25 /Applications/SuperCollider/SuperCollider.app/Contents/Resources/../Resources/scsynth -u 57110 -a 116 -i 2 -o 2 -b 1026 -m 3486784401 -S 96000 -R 0 -C 0 -l 1
tatecarson       15852   0.0  0.0  2442020    796 s004  S+   11:28AM   0:00.00 grep --color=auto --exclude-dir=.bzr --exclude-dir=CVS --exclude-dir=.git --exclude-dir=.hg --exclude-dir=.svn scsynth

I think that's just searching for my scsynth right? [s]csynth as you had written gave an error.

Having the patterns library availible in js would really be amazing and highly used. Let me know if I could be of any help if you decide to do it.

@crucialfelix
Copy link
Owner

@crucialfelix crucialfelix commented Jul 2, 2017

So it does start it. Then scsynth bails for some reason.

With [s]csynth it just means to pattern match only things that start with that s. So it doesn't match the one that starts grep ... scsynth.

@crucialfelix
Copy link
Owner

@crucialfelix crucialfelix commented Jul 2, 2017

Working on it a bit this morning. It sure would be helpful if scsynth bothered to tell us why it is killing itself. It only happens when it loads a synth def. The plugins path looks right. I can run it on the command line fine. Maybe something to do with environment variables. Still investigating.

@crucialfelix
Copy link
Owner

@crucialfelix crucialfelix commented Jul 3, 2017

It's actually something to do with sclang booting up and some installed quark doing something that causes the already running scsynth to quit. I removed all my quarks and it now runs fine. I'll track it down further.

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

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.