Is this a bug? Program seems to be dropping pulses.
As you can see from the counters, the pulse gets to the 2nd max-buffer, but never goes beyond that. I would assume programing error, except it is the same node that works in one case, but not in an identical use case.
The max-buffer code simply takes PUSH pulse, defers it, then passes it to DONE, so I don’t see how it could be lost through error or similar issue.
I was having the same issue with 0.34.?, but upgrading to 0.35.2 didn’t help. Same issue in simulation and upload to UNO.
That’s…disconcerting… Besides being just wrong that defer would drop a pulse completely, that “fix” means that DONE will likely pulse before NEW gets updated…
The defer is needed in order to create cycles, isn’t it? Why use defer in max buffer at all? There seems to be no feedback, everything goes sequentially and without cycles.
I decided to make logic out of defers. Here’s what it gives me:
The current buffer value does loop back to the top of the patch, so defer should be used there. Without a defer before DONE, this results in DONE pulse before MEM is updated, which is not a problem in this example where MEM is just tied to watch node, but would be a problem if DONE triggered an action using MEM value. In this case, the buffer defer could be moved after the from-bus-OUT, but without defer on pulse wire, there is still the chance that DONE will pulse before MEM is updated.
Good thought to narrow the problem down to just pulse passing through 3 defer nodes without all the extra code.
I think you are saying a link from input node to output node in XOD code has an implied defer node, so manually adding defer is not needed. That provides a long-term work-around for my code, but doesn’t fix the problem that a chain of 3 defer nodes will lose a pulse as demonstrated by @danya code above.
There would not be an error, but when checking if there is an error to pass it to the next node, it happens that the pulse is lost after the 3rd cycle. Is what i believe