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

softcut crashing with position update in phase callback #1124

Open
okyeron opened this issue May 28, 2020 · 2 comments
Open

softcut crashing with position update in phase callback #1124

okyeron opened this issue May 28, 2020 · 2 comments
Assignees
Labels

Comments

@okyeron
Copy link
Contributor

@okyeron okyeron commented May 28, 2020

I was trying some various things with softcut but I seem to have found a crashy bug. (tested on Shield and Fates)

Using softcut study 3 as an example, I changed some things to try and update softcut.position() in the phase callback.

Gist here of code I used

Turning encoder one will end up with the pos number going negative (stops printing at -348.875) and then softcut getting killed.

While this is probably buggy/bad code, it is crashing softcut reproducibly. RESET from norns menu gets things back to normal, but otherwise, there's no output or errors shown in maiden.

journalctl -r reports:

May 28 17:21:11 fates jackd[386]: JackAudioDriver::ProcessGraphAsyncMaster: Process error
May 28 17:21:11 fates jackd[386]: JackEngine::XRun: client = SuperCollider was not finished, state = Triggered
May 28 17:21:11 fates jackd[386]: JackEngine::XRun: client = crone was not finished, state = Triggered
May 28 17:21:11 fates jackd[386]: ClientNotify fails name = crone notification = 18 val1 = 1 val2 = 0
May 28 17:21:11 fates jackd[386]: Could not write notification
May 28 17:21:11 fates jackd[386]: CheckRes error
May 28 17:21:11 fates jackd[386]: Cannot write socket fd = 13 err = Broken pipe
May 28 17:21:11 fates jackd[386]: ClientNotify fails name = crone notification = 18 val1 = 0 val2 = 0
May 28 17:21:11 fates jackd[386]: Could not write notification
May 28 17:21:11 fates jackd[386]: CheckRes error
May 28 17:21:11 fates jackd[386]: Cannot write socket fd = 13 err = Broken pipe
May 28 17:21:11 fates jackd[386]: ClientNotify fails name = softcut notification = 1 val1 = 0 val2 = 0
May 28 17:21:11 fates jackd[386]: Could not write notification
May 28 17:21:11 fates jackd[386]: CheckRes error
May 28 17:21:11 fates jackd[386]: Cannot write socket fd = 13 err = Broken pipe
May 28 17:21:11 fates jackd[386]: JackAudioDriver::ProcessGraphAsyncMaster: Process error
May 28 17:21:11 fates jackd[386]: JackEngine::XRun: client = SuperCollider was not finished, state = Triggered
May 28 17:21:11 fates jackd[386]: JackEngine::XRun: client = crone was not finished, state = Triggered
May 28 17:21:11 fates jackd[386]: JackAudioDriver::ProcessGraphAsyncMaster: Process error
May 28 17:21:11 fates jackd[386]: JackEngine::XRun: client = SuperCollider was not finished, state = Triggered
May 28 17:21:11 fates jackd[386]: JackEngine::XRun: client = crone was not finished, state = Triggered
May 28 17:21:11 fates systemd[1]: norns-crone.service: Failed with result 'signal'.
May 28 17:21:11 fates systemd[1]: norns-crone.service: Main process exited, code=killed, status=6/ABRT
May 28 17:21:11 fates jackd[386]: JackAudioDriver::ProcessGraphAsyncMaster: Process error
@catfact catfact added bug crone labels Jun 8, 2020
@catfact catfact self-assigned this Jun 8, 2020
@okyeron
Copy link
Contributor Author

@okyeron okyeron commented Jun 9, 2020

I just realized this is probably something with attempting to go out of range of the buffer.

So how long is the buffer...? Checking lines I found:

there are 2 buffers. each is 16777216 frames or ~350 seconds. this length is basically arbitrary but it is useful that it is a power of 2 (2^24.)

So when position hits 350 (or beyond the end of the buffer) it craps out.

@catfact
Copy link
Collaborator

@catfact catfact commented Jun 9, 2020

yes, but we should not crash from an OOB positition value.

in any case, this is fixed in the upcoming softcut update. if we need a bandaid i would just clamp the position in seconds on the lua side.

@catfact catfact closed this Jun 9, 2020
@catfact catfact reopened this Jun 9, 2020
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