Sonic Pi Crashed, need to recover buffers

My sonic pi application is failing to open and I need the code from my buffers. Can anyone find the temp files of them?

Hi, sorry you’re having issues.

You should be able to find the buffers in ~/.sonic-pi/store/default (where ~ stands for your home directory on your system and if you’re running windows replace the / with \ :slight_smile: )

How would u recommend opening them, my terminal is currently is messed up so that is not an option. If you have any ideas that would be great.

Although the workspace files are named workspace_zero.spi, workspace_two.spi…etc they are merely text files and you should be able to navigate to their location from your file manager (not sure what OS you are using) and then use any text editor to open the files.
If the files are corrupted, that is a different story. However all the history of the files is stored in a .git folder in the default folder, and it is possible to go back to previous versions of each file, which I have done previously, but would find hard to explain how clearly here. (you can google git commands and tutorials)

1 Like

Can someone please tell me how to get sonic pi working again ? I have tried deleting its data reinstalling and trying to reopen it but I still get a critical error.

Hi Jack
I order to help we need more detail about what version of Sonic Pi you are using, what operating system/computer you are working with.
When your installation crashes, there should be some log files created which are in your home directory in the sub-folder .sonic-pi/log
It is useful if you can post the contents of these files, which can give an indication of what is going wrong.

1 Like

I am running macOS Catalina with Sonic Pi 3.10.

Here is the GUI.log:
[GUI] - Detecting port numbers…
[GUI] - GUI OSC listen port 4558
[GUI] - port: 4558 [OK]
[GUI] - Server OSC listen port 4557
[GUI] - port: 4557 [OK]
[GUI] - Server incoming OSC cues port 4559
[GUI] - port: 4559 [OK]
[GUI] - Scsynth port 4556
[GUI] - port: 4556 [OK]
[GUI] - Server OSC out port 4558
[GUI] - GUI OSC out port 4557
[GUI] - Scsynth send port 4556
[GUI] - Erlang router port 4560
[GUI] - port: 4560 [Not Available]
[GUI] - OSC MIDI out port 4561
[GUI] - port: 4561 [OK]
[GUI] - OSC MIDI in port 4562
[GUI] - port: 4562 [OK]
[GUI] - Init script completed
[GUI] - using default editor colours
[GUI] - launching Sonic Pi Server:
[GUI] - starting UDP OSC Server on port 4558…
[GUI] - UDP OSC Server ready and listening
[GUI] - Ruby server pid registered: 81865
[GUI] - waiting for Sonic Pi Server to boot…
[GUI] - Sonic Pi Server failed to start with this error message:
> Port unavailable: 4560, is scsynth already running?
[GUI] - UDP OSC Server no longer listening
[GUI] - Critical error! Could not boot Sonic Pi Server.
[GUI] - stopping UDP OSC Server…
[GUI] - Aborting. Sorry about this.

And Here is the processes.log:

Clearing pids: ["81751"]

Clearing [81751]
  -- command /Applications/Sonic --enable-frozen-string-literal -E utf-8 /Applications/Sonic -u 4557 4558 4556 4556 4559 4560 4561 4562
  -- removing /var/folders/nk/knfnbjyx2hq0dp5mfs3vvf840000gn/T/sonic-pi-pids/81751
  -- unable to get ProcTable info for: 81751
  -- process: 81751 not running

Finished clearing pids

Started [81865] [-] /Applications/Sonic --enable-frozen-string-literal -E utf-8 /Applications/Sonic -u 4557 4558 4556 4556 4559 4560 4561 4562 [-] /var/folders/nk/knfnbjyx2hq0dp5mfs3vvf840000gn/T/sonic-pi-pids/81865

And server-output.log:
Sonic Pi server booting…
Using protocol: udp
Detecting port numbers…
Send port: 4558
Listen port: 4557
- OK
Scsynth port: 4556
- OK
Scsynth send port: 4556
- OK
OSC cues port: 4559
- OK
Erlang port: 4560
Port 4560 unavailable. Perhaps Sonic Pi is already running?

The rest of the files are empty. Thanks for your help.

Thank you for giving full information on your problem including the log files.
From inspecting these two things become apparent. First you are using MacOS new Catalina OS. Sam Aaron has already posted on twitter that there are some problems here. Apple have introduced a much more stringent requirement for third party apps to be signed and notarized before a newly installed app can work. Currently the Sonic Pi installer is neither signed nor notarized. With previous OS you could waive the signing requirement by right clicking and then opening the app on first run, and then accepting that you wanted to run it. Apparently (I dont have Cartalina installed myself to try it) this doesn’t work on hte new OS. Sam has said that apps installed BEFORE you upgrade your OS from High Sierra to Catalina should still work.
I don’t know if this is the case for you or not.

The second point from the logs is that port 2560 is already in use when the app checks its required ports in the startup process. This port is used by SuperCollider’s scsynth binary which Sonic Pi uses. You can try to make sure that this port is free before starting up Sonic Pi by typing in a terminal killall scsynth. and then see if Sonic Pi will start.
YOu could also (having made sure that scysnth is not running) try running Sonic Pi from a terminal. Assuming it is installed in your Applications folder in a terminal run
/Applications/Sonic\\ Pi
(Note the spaces after the two ) and see if that works. I don’t know but it may be that Catalina objects to the component bianaries in Sonic Pi as well such as m2o o2m scsynth and erl_child_setup. I know that plugins for applications have to be notarized seperately.

Let us know how you get on. I hope to install a virtual Catalina OS soon and experiment with sunning SP on it. At the moment Sam is trying to get help with the signing and notarizing process which may take some time.

Port 4560, but yes, what Robin said :slightly_smiling_face:

I closed the port and got this new error:
[GUI] - Sonic Pi Server failed to start with this error message:
> Server Exception:
Promise timed out after 5 seconds.
["/Applications/Sonic block in get'", "/Applications/Sonic’", “/Applications/Sonic get'", "/Applications/Sonic’”, “/Applications/Sonic load_synthdefs'", "/Applications/Sonic’”, “/Applications/Sonic new'", "/Applications/Sonic’”, “/Applications/Sonic initialize'", "/Applications/Sonic’”, “/Applications/Sonic block (2 levels) in included'", "/Applications/Sonic’”, “/Applications/Sonic…/…/app/server/ruby/bin/sonic-pi-server.rb:177:in `’”]
Thanks again.

Could you possibly try rebooting your machine and seeing if that helps?

Thanks that worked. I actually managed to use the installer fine in Catalina you just have to click cancel and then go in to System Preferences and cling open anyway.

1 Like