wiremod / wire-fpga

An addon for Garry's Mod that adds a programmable chip, that can be programmed using flow-based programming.
Apache License 2.0
15 stars 1 forks source link

Execution loop detection sometimes false triggers #26

Open llysdal opened 1 year ago

llysdal commented 1 year ago

Can be replicated using apply_force.txt FPGA chip

Debugging shows that this happens:

nodeQueue = {1,3,2,5,} when we put down 1 as our loop detection node nodeQueue = {1,3,4,5,} 4 iterations later

Loop detection now triggers, as we have reached node 1 again, and our nodeQueue is the same size as when we first saw 1.

The loop detection code should of course ensure that the node id's in the nodeQueue are identical to when we started loop detection.