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

Undefined / crashy behavior scheduling reset_osc #138

Closed
bwhitman opened this issue Jul 15, 2024 · 1 comment
Closed

Undefined / crashy behavior scheduling reset_osc #138

bwhitman opened this issue Jul 15, 2024 · 1 comment

Comments

@bwhitman
Copy link
Collaborator

bwhitman commented Jul 15, 2024

We want to support scheduling reset_osc like all other parameters. A use case is playing a sequence using a schedule, and wanting to clear the voice allocations from presets to a different one. We can do this with

example_voice_chord(0, 0);
// Reset the oscs 
struct event e;
e.reset_osc = 1000;
e.time = 4500;
amy_add_event(e);
example_fm(5000);

However, this causes undefined behavior. One one computer, it crashes with a segfault 50% of the time at the reset. On another, it shows me [4504] chaining osc 0 to osc 0 would cause loop. at the reset time. Something is broken about the way we're scheduling resets. Dan thinks it's something w/ multithreading.

The crasher is:

IMG_6856

You can see the behavior by git checkout crasher; make amy-crasher; ./amy-crasher.

@bwhitman
Copy link
Collaborator Author

This goose chase was my bad; i was not initializing the struct event properly. Fixed by #139

bwhitman added a commit that referenced this issue Jul 15, 2024
adding more complex timed default example for testing #138
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant