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

[1.6.4][FTB Direwolf20 pack][SSP]TurtleOS crash?

Started by applesauce10189, 08 January 2014 - 12:04 PM
applesauce10189 #1
Posted 08 January 2014 - 01:04 PM
I know the title says "TurtleOS crash?" but honestly I'm not sure what happened,

I was looking at a 150+ line program I made so I could fix it, I was scrolling down via down arrow and my computer (irl not cc computer) lagged and froze for a second, then all of a sudden I see my code is still there but the second to last line says "edit:157:Too long without yeilding" and the bottom line I see the cursor but it still says "Press ctrl to access menu" and typing over it makes it dissapear (I hate google spell check that says dissapear google says no) by the way, forgot to mention I did this on a mining turtle, weird thing is I'm wondering what happened because I wasn't running a program I was editting one.


EDIT: forgot to mention, I think the cause of this bug was entirely caused by my computer freezing, just a thought.
Edited on 08 January 2014 - 12:06 PM
Lyqyd #2
Posted 08 January 2014 - 01:54 PM
The word is correctly spelled "disappear". Does this consistently happen? It sounds like a one-off occurrence that happened to allow too much time to pass between the resume and the yield, triggering the yield protection code.
applesauce10189 #3
Posted 08 January 2014 - 04:10 PM
It's only happened once, and what's the yield protection code? I'm assuming it's what causes the "too long without yeilding" thing when a program is stuck on a loop doing almost literally nothing,
Lyqyd #4
Posted 08 January 2014 - 05:01 PM
If a coroutine runs for ten seconds without yielding, it is aborted, killing the coroutine and yielding.
Bomb Bloke #5
Posted 08 January 2014 - 06:35 PM
… which means that if your real computer stalls for ten seconds or more, ComputerCraft will think your script was running that whole time and terminate it.

The logic is that ComputerCraft can only run one script at a time, so if a script doesn't pause every now and then it can't switch to any others that players are trying to use. The "Edit" script, for example, yields most of the time - while it waits for you to type stuff in.
applesauce10189 #6
Posted 09 January 2014 - 11:00 AM
… which means that if your real computer stalls for ten seconds or more, ComputerCraft will think your script was running that whole time and terminate it.

The logic is that ComputerCraft can only run one script at a time, so if a script doesn't pause every now and then it can't switch to any others that players are trying to use. The "Edit" script, for example, yields most of the time - while it waits for you to type stuff in.
I just can't help but laugh every time I look at that motto at the bottom of your posts,