65 posts
Posted 06 April 2013 - 06:41 AM
In the Mindcrack modpack, if I program a turtle to have a while true do loop and put no sleep code inside of it (easiest way to test is with no code at all), and make that program be startup, you cannot force-close the program. In fact, no matter how many times you pickup and put down the turtle, he will be stuck in the infinite loop.
Process:
edit startup
Insert into startup script:
while true do
end
Save and close. Then run the script. I've had to trash 2 turtles so far because I forgot about this bug.
2447 posts
Posted 06 April 2013 - 07:12 AM
And? It's a malicious script. Get rid of it using a floppy…
3790 posts
Location
Lincoln, Nebraska
Posted 06 April 2013 - 07:23 AM
Well, why isn't it catching the 'too long without yeilding' error? Just because there are no function calls?
2447 posts
Posted 06 April 2013 - 07:26 AM
Well, why isn't it catching the 'too long without yeilding' error? Just because there are no function calls?
It will catch it and shut down.
3790 posts
Location
Lincoln, Nebraska
Posted 06 April 2013 - 07:50 AM
Well, he said that it would not allow for the program to stop. I don't know if he is saying that it will not error out, or if he means that you have essentially bricked the computer, but I think we need more information.
To OP: Does it cause an error, or is it stuck completely in a loop? You would have to wait around 5 seconds to see if the error would show up. If it does, then it should just exit to shell.
1190 posts
Location
RHIT
Posted 06 April 2013 - 07:55 AM
Although the turtle should be giving an error and it's concerning that it isn't, you can override the loop by holding ctrl+t for about 3 seconds.
2217 posts
Location
3232235883
Posted 06 April 2013 - 08:03 AM
Although the turtle should be giving an error and it's concerning that it isn't, you can override the loop by holding ctrl+t for about 3 seconds.
nope, if it dosent yeild it wont catch the terminate event
do what cloudy said, remove the file using a startup disk
1190 posts
Location
RHIT
Posted 06 April 2013 - 08:21 AM
nope, if it dosent yeild it wont catch the terminate event
do what cloudy said, remove the file using a startup disk
Ah. I suppose I thought that ctrl+t magically forces a yield xD
What version was the infinite loop error introduced? I thought it was pre-1.2.5