-
Notifications
You must be signed in to change notification settings - Fork 17
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
Stack overflow with detector #39
Comments
Actually, nevermind that fix. That fixed my local "replication" of the issue, but the issue on the server seems to involve multiple detectors in a sequence or something, so they're still creating an infinite loop and crashing. |
And actually, you can create this issue just by creating a long enough linear sequence of detectors (though you need quite a few). No loop required. |
What about that proposal?
It will not solve the "endless line of detectors", but is this a real server scenario? |
If I'm reading that right, as soon as something possibly comes in, it switches the machine to the "on" node, and so, because you removed the active node from the declaration, no longer can process input. Then it does the check of where to sends stuff, and if that succeeds, it triggers the send message logic. That sounds like it should work, but here's my 2nd solution on BlS, which simply refuses all input on the detector except from the appropriate side. I reverted the "self loop" check I had earlier. This prevented the issue in all configurations I could cook up. I did a quick check and am (nearly) certain there aren't any other machines that accept items and immediately send them out again, so this is probably the only change needed to prevent stack overflows (unless something really insane happens). At this point, I feel the issue of someone putting several thousand detectors in series isn't really a sensible concern, so I'm happy with my solution. The "broken" machines on BlS turned out to be two detectors that were both aimed at each others output, due to a couple of misconfigured teleporters. |
You are right, your proposal is much better. I will take it over. Thanks |
stacktrace.txt
How to replicate:
The tubes connect the output side of the detector to one of its "inaccessible" sides.
My splint to fix this on Blocky Survival is to prevent any machine from pushing to itself, but this doesn't feel like the "correct" solution. There's some instances where it seems like a machine pushing to itself should be allowed, e.g. distributors and HP pushing chests, though i can't think of any actual use for such a configuration..
The text was updated successfully, but these errors were encountered: