This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
Hoff's profile picture

All programs ending with too long without yielding

Started by Hoff, 27 October 2013 - 06:36 PM
Hoff #1
Posted 27 October 2013 - 07:36 PM
Title: All programs ending with too long without yielding

For some reason on the server I'm on any and all programs on turtle or computer are shutting down with the too long without yielding error across various lines. I understand that the error usually means that an infinite loop has been created in which no line uses some command that yields(sleep, turtle functions, os.pullEvent, etc) but every single program has one.

For example I have one computer running:

while true do
   redstone.setBundledOutput("bottom", colors.white)
   sleep(0.1)
   redstone.setBundledOutput("bottom", 0)
   sleep(0.1)
end

And when that one started running into this problem I noticed every computer and turtle I had was running into this. I decided to test the following code to make sure I didn't mess up somewhere in the coding:


while true do
   turtle.turnRight()
   sleep(10)
end

And even that returned the error after a few minutes of spinning.

So I'm basically at a loss of what could be causing this and any help would be much appreciated.
electrodude512 #2
Posted 27 October 2013 - 08:46 PM
Does this happen for everyone on the server and not just you? Does the server have serious lag problems? Are there lots of computers running? (but I doubt this last thing would do it) None of those programs should cause this to happen. What modpack are you using?
Hoff #3
Posted 27 October 2013 - 09:34 PM
Does this happen for everyone on the server and not just you? Does the server have serious lag problems? Are there lots of computers running? (but I doubt this last thing would do it) None of those programs should cause this to happen. What modpack are you using?
FTB Unleashed v 1.1.3 CC version 1.53

Actually now that you mention it the server has been lagging a bit. Is it possible the lag is causing them to skip over enough sleeps or otherwise yielding functions to cause the error?

As for if it's just me I couldn't be entirely sure as I don't know how many other people are using computers. I will ask around though.

Thanks for the assitance as well.
theoriginalbit #4
Posted 27 October 2013 - 09:39 PM
Using that mod pack it definitely sounds like a server problem. Also ask the admin/moderators what the TPS is, chances are its really low, and unfortunately when TPS is low, computers can run slow meaning that the runtime of code that is normally ok is effected and the ComputerCraft thread thinks that its not yielding.
Hoff #5
Posted 27 October 2013 - 09:56 PM
Using that mod pack it definitely sounds like a server problem. Also ask the admin/moderators what the TPS is, chances are its really low, and unfortunately when TPS is low, computers can run slow meaning that the runtime of code that is normally ok is effected and the ComputerCraft thread thinks that its not yielding.

I think that's the problem here.

Thanks for the help guys!