sonic-pi-net / sonic-pi

Code. Music. Live.
https://sonic-pi.net
Other
10.86k stars 924 forks source link

refusing to start #58

Closed tonystrange closed 10 years ago

tonystrange commented 10 years ago

I start using the command ./sonic-pi/bin/sonic-pi The front panel opens (Version 2.0 in rh bottom corner

however the lxterminal has the message QGtkStyle was unable to detect the current GTK+ theme starting OSC Serverruby /home/pi/sonic-pi ...... some stuff..... /start-server.rb listening on port 4558

it then just waits .....I guess I may have done something wrong

samaaron commented 10 years ago

Hi @tonystrange,

sorry that you're having issues. Could you let me know which platform you're running, and which version of Sonic Pi you're running.

I'm assuming you're running RC3 on a RP.

There's currently an (unreproducible) bug that occasionally occurs on boot. I still haven't figure out how yet. Sometimes the jackd process can go a bit awry. Could you try running the following on the terminal and then starting SP again: killall jackd.

Let me know if that helps.

tonystrange commented 10 years ago

Hi Sam,

I tried the killall jackd but it did not seem to improve matters

I am using RC3 and I have an original (mark 1  Pi - smaller memory)

I am using the latest NOOBs raspberian (1.3.7)

see below

Regards tony PS I enjoyed your - "lets teach sorting" presentation at the CamJam and thought both sonic-pi v1 and v2 look great  as a means of introducing and enthusing programming. I think the Sonic-pi 2 will be great for bring in individuals who look at programming and ask "what is the point" -thanks

I opened a terminal window and did the following command 

pi@raspberrypi ~ $ ./sonic-pi/bin/sonic-pi QGtkStyle was unable to detect the current GTK+ theme. starting OSC Serverruby /home/pi/sonic-pi/app/gui/qt/../../server/bin/start-server.rb

Listening on port 4558

The panel appears on the screen and then it sits and waits or sometimes times-out

I randomly ran 3 commands below - just in case it helped (please do not assume from this I know anything much about linux)

pi@raspberrypi ~ $ uname -a Linux raspberrypi 3.10.25+ #622 PREEMPT Fri Jan 3 18:41:00 GMT 2014 armv6l GNU/Linux

pi@raspberrypi ~ $ /opt/vc/bin/vcgencmd version

Jan  6 2014 21:16:43  Copyright (c) 2012 Broadcom version b00bb3ae73bd2799df0e938b7a5f17f45303fb53 (clean) (release)

pi@raspberrypi ~ $ ps -ef

UID        PID  PPID  C STIME TTY          TIME CMD root         1     0  0 01:10 ?        00:00:03 init [2]   root         2     0  0 01:10 ?        00:00:00 [kthreadd] root         3     2  0 01:10 ?        00:00:02 [ksoftirqd/0] root         5     2  0 01:10 ?        00:00:00 [kworker/0:0H] root         6     2  0 01:10 ?        00:00:01 [kworker/u2:0] root         7     2  0 01:10 ?        00:00:02 [rcu_preempt] root         8     2  0 01:10 ?        00:00:00 [rcu_bh] root         9     2  0 01:10 ?        00:00:00 [rcu_sched] root        10     2  0 01:10 ?        00:00:00 [khelper] root        11     2  0 01:10 ?        00:00:00 [kdevtmpfs] root        12     2  0 01:10 ?        00:00:00 [netns] root        14     2  0 01:10 ?        00:00:00 [writeback] root        15     2  0 01:10 ?        00:00:00 [bioset] root        16     2  0 01:10 ?        00:00:00 [kblockd] root        17     2  0 01:10 ?        00:00:00 [khubd] root        18     2  0 01:10 ?        00:00:00 [rpciod] root        19     2  0 01:10 ?        00:00:00 [khungtaskd] root        20     2  0 01:10 ?        00:00:02 [kswapd0] root        21     2  0 01:10 ?        00:00:00 [fsnotify_mark] root        22     2  0 01:10 ?        00:00:00 [nfsiod] root        23     2  0 01:10 ?        00:00:00 [crypto] root        29     2  0 01:10 ?        00:00:00 [kthrotld] root        30     2  0 01:10 ?        00:03:58 [VCHIQ-0] root        31     2  0 01:10 ?        00:01:22 [VCHIQr-0] root        32     2  0 01:10 ?        00:00:00 [VCHIQs-0] root        33     2  0 01:10 ?        00:00:00 [iscsi_eh] root        34     2  0 01:10 ?        00:00:00 [dwc_otg] root        35     2  0 01:10 ?        00:00:00 [DWC Notificatio] root        37     2  0 01:10 ?        00:00:39 [mmcqd/0] root        38     2  0 01:10 ?        00:00:00 [deferwq] root        44     2  0 01:10 ?        00:00:00 [kworker/0:1H] root        45     2  0 01:10 ?        00:00:00 [jbd2/mmcblk0p6-] root        46     2  0 01:10 ?        00:00:00 [ext4-dio-unwrit] root       161     1  0 01:10 ?        00:00:00 udevd --daemon root       310   161  0 01:10 ?        00:00:00 udevd --daemon root       317   161  0 01:10 ?        00:00:00 udevd --daemon root      1637     1  0 01:10 ?        00:00:03 /usr/sbin/ifplugd -i lo -q -f -u root      1664     1  0 01:10 ?        00:00:14 /usr/sbin/ifplugd -i eth0 -q -f  root      1966     1  0 01:10 ?        00:00:00 /usr/sbin/rsyslogd -c5 root      2038     1  0 01:11 ?        00:00:00 /usr/sbin/cron 104       2045     1  0 01:11 ?        00:00:00 /usr/bin/dbus-daemon --system ntp       2106     1  0 01:11 ?        00:00:05 /usr/sbin/ntpd -p /var/run/ntpd. root      2162     1  0 01:11 ?        00:00:00 dhclient -v -pf /run/dhclient.et nobody    2203     1  0 01:11 ?        00:00:01 /usr/sbin/thd --daemon --trigger root      2224     1  0 01:11 tty1     00:00:00 /bin/login --    root      2225     1  0 01:11 tty2     00:00:00 /sbin/getty 38400 tty2 root      2226     1  0 01:11 tty3     00:00:00 /sbin/getty 38400 tty3 root      2227     1  0 01:11 tty4     00:00:00 /sbin/getty 38400 tty4 root      2228     1  0 01:11 tty5     00:00:00 /sbin/getty 38400 tty5 root      2229     1  0 01:11 tty6     00:00:00 /sbin/getty 38400 tty6 root      2230     1  0 01:11 ?        00:00:00 /sbin/getty -L ttyAMA0 115200 vt root      2238     1  0 01:11 ?        00:00:00 /usr/sbin/sshd pi        2246  2224  0 01:11 tty1     00:00:01 -bash root      2308     1  0 01:11 ?        00:00:00 /usr/sbin/console-kit-daemon --n root      2375     1  0 01:11 ?        00:00:00 /usr/lib/policykit-1/polkitd --n root      2416     1  0 01:11 ?        00:00:00 /usr/lib/udisks/udisks-daemon root      2417  2416  0 01:11 ?        00:00:07 udisks-daemon: not polling any d root      2430     2  0 01:11 ?        00:00:00 [jbd2/mmcblk0p3-] root      2431     2  0 01:11 ?        00:00:00 [ext4-dio-unwrit] root      2451     1  0 01:12 ?        00:00:00 /usr/bin/dbus-daemon --fork --pr root      2457     1  0 01:12 ?        00:00:00 /usr/lib/arm-linux-gnueabihf/gco root      2475     2  0 01:12 ?        00:00:00 [VCHIQka-0] root      2563     2  0 01:26 ?        00:00:02 [kworker/u2:1] root      3273     2  0 08:06 ?        00:00:03 [kworker/0:0] root      3284     2  0 08:25 ?        00:00:00 [kworker/0:1] pi        3290  2246  0 08:26 tty1     00:00:00 /bin/sh /usr/bin/startx pi        3307  3290  0 08:26 tty1     00:00:00 xinit /etc/X11/xinit/xinitrc --  root      3308  3307  2 08:26 tty8     00:00:13 /usr/bin/X -nolisten tcp :0 -aut pi        3315  3307  0 08:26 tty1     00:00:00 /usr/bin/ck-launch-session /usr/ pi        3337  3315  0 08:26 ?        00:00:00 /usr/bin/ssh-agent /usr/bin/ck-l pi        3342  3315  0 08:26 tty1     00:00:00 /usr/bin/lxsession -s LXDE -e LX pi        3345     1  0 08:26 tty1     00:00:00 /usr/bin/dbus-launch --exit-with pi        3346     1  0 08:26 ?        00:00:00 /usr/bin/dbus-daemon --fork --pr pi        3352  3342  0 08:26 tty1     00:00:02 openbox --config-file /home/pi/. pi        3355  3342  0 08:26 tty1     00:00:03 lxpanel --profile LXDE pi        3357  3342  0 08:26 tty1     00:00:03 pcmanfm --desktop --profile LXDE pi        3361     1  0 08:26 tty1     00:00:00 /usr/lib/arm-linux-gnueabihf/lxp pi        3364     1  0 08:26 ?        00:00:00 /usr/lib/gvfs/gvfsd pi        3366     1  0 08:26 tty1     00:00:00 /usr/lib/arm-linux-gnueabihf/lib pi        3374     1  0 08:26 ?        00:00:00 /usr/lib/gvfs/gvfs-gdu-volume-mo pi        3382     1  0 08:26 ?        00:00:00 /usr/lib/gvfs/gvfs-afc-volume-mo pi        3385     1  0 08:26 ?        00:00:00 /usr/lib/gvfs/gvfs-gphoto2-volum pi        3387     1  1 08:26 tty1     00:00:06 lxterminal pi        3388  3387  0 08:26 tty1     00:00:00 gnome-pty-helper pi        3389  3387  0 08:26 pts/0    00:00:00 /bin/bash pi        3403     1  0 08:27 ?        00:00:00 /usr/bin/dbus-daemon --fork --pr pi        3409     1  0 08:27 ?        00:00:00 /usr/lib/arm-linux-gnueabihf/gco pi        3462     1  0 08:29 ?        00:00:00 /usr/bin/dbus-daemon --fork --pr pi        3468     1  0 08:29 ?        00:00:00 /usr/lib/arm-linux-gnueabihf/gco pi        3539     1  4 08:33 tty1     00:00:02 leafpad /home/pi/Desktop/error m pi        3542  3389  0 08:34 pts/0    00:00:00 ps -ef


From: Sam Aaron notifications@github.com To: samaaron/sonic-pi sonic-pi@noreply.github.com Cc: tonystrange tony.strange@talk21.com Sent: Sunday, 18 May 2014, 7:37 Subject: Re: [sonic-pi] refusing to start (#58)

Hi @tonystrange, sorry that you're having issues. Could you let me know which platform you're running, and which version of Sonic Pi you're running. I'm assuming you're running RC3 on a RP. There's currently an (unreproducible) bug that occasionally occurs on boot. I still haven't figure out how yet. Sometimes the jackd process can go a bit awry. Could you try running the following on the terminal and then starting SP again: killall jackd. Let me know if that helps. — Reply to this email directly or view it on GitHub.

samaaron commented 10 years ago

Hi @tonystrange,

very strange indeed. Just a quick tip - to massively improve readability you should wrap your code snippets in either back ticks inline-snippets or add lines like this:

around longer chucks of code

OK, a couple of questions:

tonystrange commented 10 years ago

I decided to do a re-install of raspberrian, "just in case". The only thing I changed was the time zone. Sonic-pi version 1 works fine

I tried the ruby command and it then, after many messages repeated the output

JackAudioDriver::ProcessGraphAsyncMaster: Process error
JackEngine::XRun: client = SuperCollider was not run: state = 1

Full Output below -hope it is readable

pi@raspberrypi ~ $  ./sonic-pi/bin/sonic-pi
QGtkStyle was unable to detect the current GTK+ theme.
starting OSC Serverruby /home/pi/sonic-pi/app/gui/qt/../../server/bin/start-server.rb

Listening on port 4558
^C

pi@raspberrypi ~ $ killall jackd
jackd: no process found

pi@raspberrypi ~ $ ruby sonic-pi/app/server/bin/start-server.rb
jackdmp 1.9.9
Copyright 2001-2005 Paul Davis and others.
Copyright 2004-2012 Grame.
jackdmp comes with ABSOLUTELY NO WARRANTY
This is free software, and you are welcome to redistribute it
under certain conditions; see the file COPYING for details
JACK server starting in realtime mode with priority 10
control device hw:0
control device hw:0
audio_reservation_init
Acquire audio card Audio0
creating alsa driver ... hw:0|hw:0|1024|3|48000|0|0|nomon|swmeter|-|32bit
control device hw:0
ALSA: Cannot open PCM device alsa_pcm for capture. Falling back to playback-only mode
configuring for 48000Hz, period = 1024 frames (21.3 ms), buffer = 3 periods
ALSA: final selected sample format for playback: 16bit little-endian
ALSA: use 3 periods for playback
*** ERROR: open directory failed '/home/pi/share/SuperCollider/synthdefs'
JackDriver: client name is 'SuperCollider'
SC_AudioDriver: sample rate = 48000.000000, driver's block size = 1024
SuperCollider 3 server ready..
Zeroconf: failed to create client: Daemon not running
JackDriver: max output latency 64.0 ms
JackEngine::XRun: client SuperCollider finished after current callback
JackAudioDriver::ProcessGraphAsyncMaster: Process error
JackEngine::XRun: client = SuperCollider was not run: state = 1
JackAudioDriver::ProcessGraphAsyncMaster: Process error
JackEngine::XRun: client = SuperCollider was not run: state = 1
JackAudioDriver::ProcessGraphAsyncMaster: Process error
JackEngine::XRun: client = SuperCollider was not run: state = 1
JackAudioDriver::ProcessGraphAsyncMaster: Process error
JackEngine::XRun: client = SuperCollider was not run: state = 1
JackAudioDriver::ProcessGraphAsyncMaster: Process error
JackEngine::XRun: client = SuperCollider was not run: state = 1
JackAudioDriver::ProcessGraphAsyncMaster: Process error
JackEngine::XRun: client = SuperCollider was not run: state = 1
JackAudioDriver::ProcessGraphAsyncMaster: Process error
JackEngine::XRun: client = SuperCollider was not run: state = 1
JackAudioDriver::ProcessGraphAsyncMaster: Process error
JackEngine::XRun: client = SuperCollider was not run: state = 1
JackAudioDriver::ProcessGraphAsyncMaster: Process error
JackEngine::XRun: client = SuperCollider was not run: state = 1
JackAudioDriver::ProcessGraphAsyncMaster: Process error
JackEngine::XRun: client = SuperCollider was not run: state = 1
JackAudioDriver::ProcessGraphAsyncMaster: Process error
JackEngine::XRun: client = SuperCollider was not run: state = 1
JackAudioDriver::ProcessGraphAsyncMaster: Process error
^CExiting - shutting down scsynth server...
JackEngine::XRun: client = SuperCollider was not run: state = 1
JackAudioDriver::ProcessGraphAsyncMaster: Process error
JackEngine::XRun: client = SuperCollider was not run: state = 1
Jack main caught signal 15
JackAudioDriver::ProcessGraphAsyncMaster: Process error
/home/pi/sonic-pi/app/server/vendor/osc-ruby/lib/osc-ruby/client.rb:10:in `send': Connection refused - send(2) (Errno::ECONNREFUSED)
    from /home/pi/sonic-pi/app/server/vendor/osc-ruby/lib/osc-ruby/client.rb:10:in `send'
    from sonic-pi/app/server/bin/start-server.rb:32:in `block in <main>'
control device hw:0
Released audio card Audio0
audio_reservation_finish
control device hw:0
Cannot read socket fd = 9 err = Success
CheckRes error
JackSocketClientChannel read fail
JackDriver: killed by jack
Cannot write socket fd = 3 err = Broken pipe
CheckRes error
CheckRes error
Could not write request type = 7
sonic-pi/app/server/bin/start-server.rb:210:in `join': Interrupt
    from sonic-pi/app/server/bin/start-server.rb:210:in `<main>'
[xcb] Unknown request in queue while dequeuing
[xcb] Most likely this is a multi-threaded client and XInitThreads has not been called
[xcb] Aborting, sorry about that.
scsynth: ../../src/xcb_io.c:179: dequeue_pending_request: Assertion `!xcb_xlib_unknown_req_in_deq' failed.

pi@raspberrypi ~ $ ^C
pi@raspberrypi ~ $ ./sonic-pi/bin/sonic-pi
QGtkStyle was unable to detect the current GTK+ theme.
starting OSC Server
ruby /home/pi/sonic-pi/app/gui/qt/../../server/bin/start-server.rb
Listening on port 4558
^C
pi@raspberrypi ~ $ 
samaaron commented 10 years ago

Thanks for this, it's useful.

Could you ensure that you're running the latest kernel by doing a sudo rpi-update, restarting and then trying again.

tonystrange commented 10 years ago

I performed the update re-started......there seemed to be some warning messages on boot-up so shutdown and I restarted again. It came up cleanly (as far as I could see).

I ran \' ./sonic-pi/bin/sonic-pi \'

whilst it still said \'listening on port 4558\' I tried to run sonic-pi v1 - V1 came up but then would not execute a previously executable programme

I shutdown and restarted. Without attempting to start V2, I started V1 and again got errors and it refused to play (I suspect this happened before and was the reason why I re-installed raspberrian)

I tried \'play 80\' and still got the output below

.... opt/sonic-pi/app/scripts/vendor/osc-ruby/lib/osc-ruby/client.rb:10:in send': Connection refused - send(2) (Errno::ECONNREFUSED) from /opt/sonic-pi/app/scripts/vendor/osc-ruby/lib/osc-ruby/client.rb:10:insend' from /opt/sonic-pi/app/gui/../../app/scripts/run-code.rb:180:in block in osc' from <internal:prelude>:10:insynchronize' from /opt/sonic-pi/app/gui/../../app/scripts/run-code.rb:178:in osc' from /opt/sonic-pi/app/gui/../../app/scripts/run-code.rb:149:inclear_scsynth' from /opt/sonic-pi/app/gui/../../app/scripts/run-code.rb:132:in reset_scsynth!' from /opt/sonic-pi/app/gui/../../app/scripts/run-code.rb:41:ininitialize' from /opt/sonic-pi/app/gui/../../app/scripts/run-code.rb:225:in new' from /opt/sonic-pi/app/gui/../../app/scripts/run-code.rb:225:ininitialize' from /opt/sonic-pi/app/gui/../../app/scripts/run-code.rb:320:in new' from /opt/sonic-pi/app/gui/../../app/scripts/run-code.rb:320:in

' .....

samaaron commented 10 years ago

This continues to be strange!

Could you do the following and then restart and try again: apt-get update && sudo apt-get install jackd2

tonystrange commented 10 years ago

Sonic-pi V1 worked fine after this.

I started Sonic-pi V2 and after a tense few moments it started to work. I grabbed some code from your Magpi article and it burst into musical life. So was the answer jackd2?

I am really looking forward to showing your article and the programme to some of the students. I am hoping this will hook more in. We have a lot of talented musicians on all sorts of instruments. The commitment they make to music is impressive. I am hoping that this would appeal to them. Another string to their bow!

samaaron commented 10 years ago

Wow, fantastic news, thanks for all your patience!

I guess the answer was ensuring your software was up-to-date. I haven't been developing/testing with anything other than the latest stuff, so it's possible there are issues with certain combinations of older software.

Let me know how you get on with this.

samaaron commented 10 years ago

BTW, thanks for putting ticks around your code, however you needed to use back ticks: ` rather full-stops: .

tonystrange commented 10 years ago

Ahhhh found them on the keyboard ` - sorry "spec saver moment"...actually I do need to go to the optician! Thank you for all your help

samaaron commented 10 years ago

No problem at all. It should be me thanking you for playing with Sonic Pi and for your patience with these v2.0 teething issues...