sonic-pi-net / sonic-pi

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

Sonic Pi 3.3 Windows 10 startup problem #2678

Closed PhlegmingChee closed 3 years ago

PhlegmingChee commented 3 years ago

This has been an issue since v. 3.1 for me, but 3.3 still won't start one of my Windows computers. The error log is this: `Sonic Pi Boot Error Report

System Information

GUI Log

C:\Users\Phillip\.sonic-pi\log\gui.log

[GUI] - Welcome to the Sonic Pi GUI
[GUI] - ===========================
[GUI] -                            
[GUI] - {d11d945e-086f-43ca-88d9-19c78e616331}
[GUI] - Discovering port numbers...
[GUI] - Port entry server-listen-to-gui : 51235 : 51235
[GUI] - Port entry gui-send-to-server : 51235 : 51235
[GUI] - Port entry gui-listen-to-server : 51236 : 51236
[GUI] - Port entry server-send-to-gui : 51236 : 51236
[GUI] - Port entry scsynth : 51237 : 51237
[GUI] - Port entry scsynth-send : 51237 : 51237
[GUI] - Port entry server-osc-cues : 4560 : 4560
[GUI] - Port entry erlang-router : 51238 : 51238
[GUI] - Port entry websocket : 51239 : 51239
[GUI] - Detecting port numbers...
[GUI] - GUI listen to server port 51236
[GUI] -    port: 51236 [OK]
[GUI] - Server listen to gui port 51235
[GUI] -    port: 51235 [OK]
[GUI] - Server incoming OSC cues port 4560
[GUI] -    port: 4560 [OK]
[GUI] - Scsynth port 51237
[GUI] -    port: 51237 [OK]
[GUI] - Server send to GUI port 51236
[GUI] -    port: 51236 [OK]
[GUI] - GUI send to server port 51235
[GUI] -    port: 51235 [OK]
[GUI] - Scsynth send port 51237
[GUI] -    port: 51237 [OK]
[GUI] - Erlang router port 51238
[GUI] -    port: 51238 [OK]
[GUI] - Websocket port 51239
[GUI] -    port: 51239 [OK]
[GUI] - All ports OK
[GUI] - hiding main window
[GUI] - initialising toolbar icons
[GUI] - setting up window structure
[GUI] - restoring scope states 
[GUI] - creating status bar
[GUI] - creating info panel
[GUI] - creating shortcuts
[GUI] - creating tool bar
[GUI] - initialising documentation window
[GUI] - launching Sonic Pi Runtime Server:
[GUI] - starting UDP OSC Server on port 51236...
[GUI] - UDP OSC Server ready and listening
[GUI] - Ruby server pid registered: 584
[GUI] - wait for sync
[GUI] - waiting for Sonic Pi Server to boot...
............................................................
[GUI] - Critical error! Could not boot Sonic Pi Server.
[GUI] - stopping UDP OSC Server...
[GUI] - Critical Error. Unable to connect to server..
[GUI] - UDP OSC Server no longer listening

Server Errors

C:\Users\Phillip\.sonic-pi\log\server-errors.log

Server Output

C:\Users\Phillip\.sonic-pi\log\server-output.log

Sonic Pi server booting...
The time is 2021-01-29 19:54:34 -0500
Using primary protocol: udp
Detecting port numbers...
Listen port: 51235
  - OK
Scsynth port: 51237
  - OK
Scsynth send port: 51237
  - OK
OSC cues port: 4560
  - OK
Erlang port: 51238
  - OK
Websocket port: 4562
  - OK
Opening UDP Server to listen to GUI on port: 51235
ERROR: Unable to write information for PID 20712 to path C:/Users/Phillip/AppData/Local/Temp/sonic-pi-pids/20712!
undefined method `cmdline' for nil:NilClass

Scsynth Output

C:\Users\Phillip\.sonic-pi\log\scsynth.log

# Starting SuperCollider 2021-01-29 19:54:34

Device options:
  - MME : Microsoft Sound Mapper - Input   (device #0 with 2 ins 0 outs)
  - MME : Microphone (Realtek High Defini   (device #1 with 2 ins 0 outs)
  - MME : Microsoft Sound Mapper - Output   (device #2 with 0 ins 2 outs)
  - MME : Speakers (Realtek High Definiti   (device #3 with 0 ins 6 outs)
  - MME : DELL U2419HC-C (NVIDIA High Def   (device #4 with 0 ins 2 outs)
  - MME : Realtek Digital Output (Realtek   (device #5 with 0 ins 2 outs)
  - Windows DirectSound : Primary Sound Capture Driver   (device #6 with 2 ins 0 outs)
  - Windows DirectSound : Microphone (Realtek High Definition Audio)   (device #7 with 2 ins 0 outs)
  - Windows DirectSound : Primary Sound Driver   (device #8 with 0 ins 2 outs)
  - Windows DirectSound : Speakers (Realtek High Definition Audio)   (device #9 with 0 ins 6 outs)
  - Windows DirectSound : DELL U2419HC-C (NVIDIA High Definition Audio)   (device #10 with 0 ins 2 outs)
  - Windows DirectSound : Realtek Digital Output (Realtek High Definition Audio)   (device #11 with 0 ins 2 outs)
  - Windows WASAPI : DELL U2419HC-C (NVIDIA High Definition Audio)   (device #12 with 0 ins 2 outs)
  - Windows WASAPI : Speakers (Realtek High Definition Audio)   (device #13 with 0 ins 2 outs)
  - Windows WASAPI : Realtek Digital Output (Realtek High Definition Audio)   (device #14 with 0 ins 2 outs)
  - Windows WASAPI : Microphone (Realtek High Definition Audio)   (device #15 with 2 ins 0 outs)
  - Windows WDM-KS : Speakers (Realtek HD Audio output)   (device #16 with 0 ins 6 outs)
  - Windows WDM-KS : Stereo Mix (Realtek HD Audio Stereo input)   (device #17 with 2 ins 0 outs)
  - Windows WDM-KS : Microphone (Realtek HD Audio Mic input)   (device #18 with 2 ins 0 outs)
  - Windows WDM-KS : SPDIF Out (Realtek HDA SPDIF Out)   (device #19 with 0 ins 2 outs)
  - Windows WDM-KS : Output (NVIDIA High Definition Audio)   (device #20 with 0 ins 2 outs)
  - Windows WDM-KS : Headset Earphone (@System32\drivers\bthhfenum.sys,#2;%1 Hands-Free%0

;(Bose Mini II SoundLink))   (device #21 with 0 ins 1 outs)
  - Windows WDM-KS : Headset Microphone (@System32\drivers\bthhfenum.sys,#2;%1 Hands-Free%0

;(Bose Mini II SoundLink))   (device #22 with 1 ins 0 outs)
  - Windows WDM-KS : Speakers ()   (device #23 with 0 ins 2 outs)

Requested devices:
  In:
  - (default)
  Out:
  - (default)

Selecting default system input/output devices

Booting with:
  In: MME : Microphone (Realtek High Defini
  Out: MME : Speakers (Realtek High Definiti
SC_PortAudioDriver: PortAudio failed at Pa_OpenStream with error: 'Unanticipated host error'
could not initialize audio.

Process Log

C:\Users\Phillip\.sonic-pi\log\processes.log


    ask-clear.rb

Clearing pids: []
No pids to clear :-)
Started [584] [-] "C:\Program Files\Sonic Pi\app\gui\qt\build\Release\..\..\..\..\..\app\server\native\ruby\bin\ruby.exe"  --enable-frozen-string-literal -E utf-8 "C:\Program Files\Sonic Pi\app\gui\qt\build\Release\..\..\..\..\..\app\server\ruby\bin\sonic-pi-server.rb" -u 51235 51236 51237 51237 4560 51238 51239 [-] C:/Users/Phillip/AppData/Local/Temp/sonic-pi-pids/584
ERROR: Unable to write information for PID 20712 to path C:/Users/Phillip/AppData/Local/Temp/sonic-pi-pids/20712!
undefined method `cmdline' for nil:NilClass

`

ethancrawford commented 3 years ago

Hello @PhlegmingChee 🙂

There are several similar issues floating around about this. It seems SuperCollider might be having difficulty connecting to the default sound devices. (Here is a link to a related issue on the Supercollider repository: https://github.com/supercollider/supercollider/issues/4718). Sometimes it's because microphones are disabled in Windows settings; sometimes it's because microphones are enabled... sometimes the input and output devices are using different sampling rates; sometimes because there are other incompatible pieces of software like 64 bit Jackrouter installed; and various other reasons. PortAudio, the audio I/O library that SuperCollider uses on Windows, is good but there are occasions where it gets tripped up by things.

As Sam notes here: https://github.com/sonic-pi-net/sonic-pi/issues/2528#issuecomment-764510464, you can now alter the sound devices and drivers that Sonic Pi tries to use, in the new audio configuration file - which is in .sonic-pi/config/audio-settings.toml found starting from your home directory. That may work - feel free to have a go and let us know how you get on 🙂

ethancrawford commented 3 years ago

Regarding the other error in the log files:

ERROR: Unable to write information for PID 20712 to path C:/Users/Phillip/AppData/Local/Temp/sonic-pi-pids/20712! undefined method `cmdline' for nil:NilClass

I've personally got no idea why that's happening unfortunately. Hopefully someone else may be able to provide advice about that.

PhlegmingChee commented 3 years ago

Problem solved by enabling the microphone as per the comments in #2528. I didn't realize I had it turned off in my privacy settings. This also fixes an issue I had with not having my microphone work in Zoom, either.

Thanks

ethancrawford commented 3 years ago

Wonderful to hear that that it's solved! I'll close this issue for now.

bagong commented 3 years ago

Unfortunately I won't be able to follow up, so basically as an info: I just spent 2 hours trying to make SP 3.3.1 boot on Windows 10, and finally returned to 3.2.2. This time for me the Windows-boot problem is unique in that I can boot/use vanilla SuperCollider 3.11.2 (same server version) on the same system without problems, including of course being able to boot the server from the command-line. I cannot get SP to work, and I cannot get the SP-scsynth-server to boot from the command line, regardless of the parameters I use. I am aware of the new configuration option, and I also know how to edit the scsynthexternals file, so I am pretty sure it is not a mal-configuration, I fear this time the problem lays deeper. A specific of my system is that in fact I do use the jack(d) you mention above. Note however that the new release of Jack for Windows (1.9.17 - which I am using) does not conflict with scsynth anymore. I haven't had the energy yet to uninstall Jack and reinstall 3.3.1, maybe someone else would like to make that experiment ;-)

samaaron commented 3 years ago

@bagong for the record, the scsynth.exe bundled with Sonic Pi v3.3.1 is not a standard stable release. It is in fact a nightly build used to match the boost headers from the (also non-standard) macOS release we built that included support for Big Sur.

Still, we haven't had any issues as of yet wrt to v3.3.1 Windows that are out of the ordinary (there are definitely still some quirky boot issues wrt boost which have been there for years now).

So sorry you had issues though.