{"action":"created","issue":{"url":"https://api.github.com/repos/samaaron/sonic-pi/issues/1119","repository_url":"https://api.github.com/repos/samaaron/sonic-pi","labels_url":"https://api.github.com/repos/samaaron/sonic-pi/issues/1119/labels{/name}","comments_url":"https://api.github.com/repos/samaaron/sonic-pi/issues/1119/comments","events_url":"https://api.github.com/repos/samaaron/sonic-pi/issues/1119/events","html_url":"https://github.com/samaaron/sonic-pi/issues/1119","id":146027862,"number":1119,"title":"set_sched_ahead time can nuke sp","user":{"login":"rbnpi","id":5587849,"avatar_url":"https://avatars.githubusercontent.com/u/5587849?v=3","gravatar_id":"","url":"https://api.github.com/users/rbnpi","html_url":"https://github.com/rbnpi","followers_url":"https://api.github.com/users/rbnpi/followers","following_url":"https://api.github.com/users/rbnpi/following{/other_user}","gists_url":"https://api.github.com/users/rbnpi/gists{/gist_id}","starred_url":"https://api.github.com/users/rbnpi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rbnpi/subscriptions","organizations_url":"https://api.github.com/users/rbnpi/orgs","repos_url":"https://api.github.com/users/rbnpi/repos","events_url":"https://api.github.com/users/rbnpi/events{/privacy}","received_events_url":"https://api.github.com/users/rbnpi/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":10,"created_at":"2016-04-05T15:40:29Z","updated_at":"2016-04-06T11:16:42Z","closed_at":null,"body":"With one or two of my programs, I have discovered that setting a sched_ahead_time of around 8, running the program and then stopping it can cause SP to stop playing thereafter. I get \r\nstopping all runs... \r\nstopping job <nn> message\r\nbut no\r\ncompleted all runs.\r\nThen subsequent runs of this or other workspaces do not produce any sound.\r\n\r\nTry my program\r\nhttps://gist.github.com/rbnpi/5a31a5351f1ca4c989d0\r\nand add set_sched_ahead_time! 8 at the start\r\nRun and stop it mid run. Thereafter problem occurs.\r\nRepeatable on mac and Pi3\r\nThis on latest 2.10dev\r\n\r\nI have this effect on other programs as well"},"comment":{"url":"https://api.github.com/repos/samaaron/sonic-pi/issues/comments/206317375","html_url":"https://github.com/samaaron/sonic-pi/issues/1119#issuecomment-206317375","issue_url":"https://api.github.com/repos/samaaron/sonic-pi/issues/1119","id":206317375,"user":{"login":"stahnirockt","id":16454436,"avatar_url":"https://avatars.githubusercontent.com/u/16454436?v=3","gravatar_id":"","url":"https://api.github.com/users/stahnirockt","html_url":"https://github.com/stahnirockt","followers_url":"https://api.github.com/users/stahnirockt/followers","following_url":"https://api.github.com/users/stahnirockt/following{/other_user}","gists_url":"https://api.github.com/users/stahnirockt/gists{/gist_id}","starred_url":"https://api.github.com/users/stahnirockt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stahnirockt/subscriptions","organizations_url":"https://api.github.com/users/stahnirockt/orgs","repos_url":"https://api.github.com/users/stahnirockt/repos","events_url":"https://api.github.com/users/stahnirockt/events{/privacy}","received_events_url":"https://api.github.com/users/stahnirockt/received_events","type":"User","site_admin":false},"created_at":"2016-04-06T11:16:42Z","updated_at":"2016-04-06T11:16:42Z","body":"This is really tricky, \r\n\r\nfirst I tried this with\r\n\r\n```ruby\r\nlive_loop :test do\r\n  play 60,release: 0.1\r\n  sleep 0.5\r\nend \r\n```\r\nwith\r\n```ruby\r\nset_sched_ahead_time!\r\n```\r\nand values from 1 to 9 and then even 30, and it worked.\r\n\r\nthen i took the value 8, and it doesn't work.\r\n\r\nIt was the same with ``` loop ```\r\n\r\nThe first last time working i got the Message \"timing error: running slightly behind\", the next time it produces the error.\r\n "}}