Open menderchuck opened 6 years ago
hi there @menderchuck . sorry for delay in reply - i had to take a couple weeks off for a different project. firstly, surely you meant "signal vector size should be set to 64 or less", not "I/O vector size should be set to 64 or less"? i see the source code is funky regards ordering of clock, but for me i cannot reproduce the play staying at '1' bug. also, i am struggling to understand why we need all the scheduled events in your demo patch? they all just carry on fine. am i missing something?
hi, thanks a lot for getting back to me. i haven't spent any more time on this, but i hopefully will soon.
On Mar 06, 2018, at 08:36 AM, stykmr notifications@github.com wrote:
hi there menderchuck. sorry for delay in reply - i had to take a couple weeks off for a different project. firstly, surely you meant "signal vector size should be set to 64 or less", not "I/O vector size should be set to 64 or less"?
yeah, i don't have a clear understanding of the difference between those settings. in any case, yes, signal vector size. set it to 32.
i see the source code is funky regards ordering of clock, but for me i cannot reproduce the play staying at '1' bug. also, i am struggling to understand why we need all the scheduled events in your demo patch? they all just carry on fine. am i missing something?
the purpose of rapidly setting the period for multiple metro objects is to execute more internal clock processing. that is, schedule many random period clock callbacks to make the race condition i described more likely to occur. if you double the metro instances, that should do it.
on my iMac and MacBook pro, Max 7.3.4, it's 100% reproducible.
would you be okay with a change to the current reporting behavior when the transport is stopped? it's pretty obvious that constantly outputting the list when stopped (while setting/resetting the clock on every other callback) isn't the intent in the code. it would be pretty confusing to preserve that in the code while working on this issue.
anyway, i'm going to take a stab at fixing this. there's no workaround for me in my main patch.
thanks! — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.
thanks! comments inline...
On 8 Mar 2018, at 08:11, menderchuck notifications@github.com wrote:
hi, thanks a lot for getting back to me. i haven't spent any more time on this, but i hopefully will soon.
On Mar 06, 2018, at 08:36 AM, stykmr notifications@github.com wrote:
hi there menderchuck. sorry for delay in reply - i had to take a couple weeks off for a different project. firstly, surely you meant "signal vector size should be set to 64 or less", not "I/O vector size should be set to 64 or less"?
yeah, i don't have a clear understanding of the difference between those settings. in any case, yes, signal vector size. set it to 32.
i see the source code is funky regards ordering of clock, but for me i cannot reproduce the play staying at '1' bug. also, i am struggling to understand why we need all the scheduled events in your demo patch? they all just carry on fine. am i missing something?
the purpose of rapidly setting the period for multiple metro objects is to execute more internal clock processing. that is, schedule many random period clock callbacks to make the race condition i described more likely to occur. if you double the metro instances, that should do it.
on my iMac and MacBook pro, Max 7.3.4, it's 100% reproducible.
yeah i am an idiot. indeed i understand the race conditions test now. yes i will double it and look again.
however, be warned that addressing these schedular issues in the current code base may be near impossible, and need to wait until i rewrite it all for version 2 before being more robust.
would you be okay with a change to the current reporting behavior when the transport is stopped? it's pretty obvious that constantly outputting the list when stopped (while setting/resetting the clock on every other callback) isn't the intent in the code. it would be pretty confusing to preserve that in the code while working on this issue.
anyway, i'm going to take a stab at fixing this. there's no workaround for me in my main patch.
yes it is a no brainer to fix this. let me know any ideas. in the mean time i will take a look. it is just another condition to test against so it should be pretty simple.
thanks!
List reporting output stops when executing a 'stop' message.
In a patch with a moderate use of scheduled clocks, sending a 'stop' message stops the transport but also stops the list output.
Steps to reproduce: 1) Send play message. 2) Send stop message.
Notice that the list output has stopped. Also, notice that the last reported 'play' state remains 1.
Taking a look at the source, it seems like the intent is for list output to stop when the transport is in stopped state. However, constant list output while in stopped state has been the behavior since 1.0. In this case, the clock is being set and then unset on each subsequent perform callback.
The problem that causes the list output to stop (the reporting clock is never rescheduled) is the fact that the scheduled clock ( clock_delay(x->clock, 0) ) is being unset before it fires the reporting callback.
Here's the test patch which is a little weird, but it was the first idea that reproduced the problem. I/O vector size should be set to 64 or less.