sonic-pi-tool
sonic-pi-tool copied to clipboard
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value
Got this error when showing the logs via sonic-pi-tool logs
:
[Run 7, Time 497.6501]
├ cue :drum
â”” sync :lead
=> Starting run 35
=> Thread :live_loop_drum exists: skipping creation
=> Thread :live_loop_lead exists: skipping creation
=> Thread :live_loop_bass exists: skipping creation
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value
: ReadError(Error { repr: Custom(Custom { kind: UnexpectedEof, error:
StringError("failed to fill whole buffer") }) })', src/libcore/result.
rs:868
note: Run with `RUST_BACKTRACE=1` for a backtrace.
Just leaving it here for now, but I can try to get more details later if needed (a backtrace for example).
How exciting. Thank you for the report :)
Are you able to replicate the error?
Not yet, haven't played with Sonic Pi since.
Did a pretty long session (more than 30 minutes) after setting RUST_BACKTRACE=1, but couldn't reproduce.
Here's a test case to reproduce this error:
- Run
sonic-pi-tool start-server
- Run
sonic-pi-tool logs
- Eval the following via
sonic-pi-tool eval-stdin
:live_loop :boom do 8.times do sample :loop_industrial sleep sample_duration(:loop_industrial) end end
- Eval the following via
sonic-pi-tool eval-stdin
:live_loop :boom do 8.times do sample :loop_industrial, onset: 'uh oh' sleep sample_duration(:loop_industrial) end end
Wonderful, thank you!
Would you like to make a PR adding these files to the priv directory? You could possibly also add a shell script that looks something like this:
#!/bin/sh
set -euo pipefail
# Replication of crash detailed here:
# https://github.com/lpil/sonic-pi-tool/issues/12
cargo run eval-file path/to/file/one.rb
sleep 1
cargo run eval-file path/to/file/two.rb
PR for reproduction script here.
That example script doesn't cause a crash for me.
Could you confirm what version of Sonic PI you're using? I'm testing on v2.11.1.
louis ~/projects/sonic-pi-tool (master) ✘ $ cargo run logs
Finished dev [unoptimized + debuginfo] target(s) in 0.0 secs
Running `target/debug/sonic-pi-tool logs`
=> Studio: Resuming SuperCollider audio server
=> Starting run 3
=> Redefining fn :live_loop_boom
[Run 3, Time 0.0]
├ cue :boom
â”” sample "/Applications/Sonic Pi.app/etc/samples",
"loop_industrial.flac"
=> Starting run 4
=> Redefining fn :live_loop_boom
=> Thread :live_loop_boom exists: skipping creation
[Run 3, Time 0.8837]
â”” sample "/Applications/Sonic Pi.app/etc/samples",
"loop_industrial.flac"
[Run 3, Time 1.7675]
â”” sample "/Applications/Sonic Pi.app/etc/samples",
"loop_industrial.flac"
=> Completed run 4
[Run 3, Time 2.6512]
â”” sample "/Applications/Sonic Pi.app/etc/samples",
"loop_industrial.flac"
Runtime Error: [buffer eval, line 4]
Thread death +--> :live_loop_boom
Unknown sample onset: value. Expected a number or a proc. Got "uh oh"
[Run 3, Time 3.535]
â”” cue :boom
=> Completed run 3
=> All runs completed
=> Studio: Pausing SuperCollider audio server