Posted 28 April 2015 - 08:04 PM
As I said in another bug-thread, I'm making an emulator. I'm using a pre-bios.lua to init the "native" APIs, and sandbox the bios. I'm now currently working on the TLWY system. I wondered how CC handles TLWYs, soI poked a little in the cc.jar, and I saw, that the TLWY-system is a bit unstable. I managed somehow to break the TLWY system using this setup:
Warning: "while true do end"s everywhere :P/>
testy
and then run testy in the shell.
What should happen:
Every 5secs and 100k lines the program should error with "Too long without yielding"
What happens:
It TLWYs almost randomly, or it breaks so much, that the "tlwytest" will run "endlessly" until you do something (for example rub the screen with the mouse, until it starts to purr)
Tested on CC 1.6x, it broke completely, I was unable to terminate/reboot/shutdown, so I had to reload everything.
On CC 1.7x, it froze my game almost instantly (it got to ~500). So I don't know if this version is affected.
On the second attempt, I held CTRL + T/R/S for 10-10 seconds, but the computer did not respond. I had to break it. After some time, MC stopped eating up the CPU-usage.
I know that this bug is almost unfixable, but I reported this just in case, if someone has a great mind to think about a fix.
Spoiler
Note: DON'T try this out on servers that you don't own, or else [insert bad things here] might happen.Warning: "while true do end"s everywhere :P/>
Spoiler
tlwytest
local cnt = 0
while true do
print(cnt)
cnt = cnt + 1
end
testy
while true do pcall(shell.run("tlwytest")) end
and then run testy in the shell.
What should happen:
Every 5secs and 100k lines the program should error with "Too long without yielding"
What happens:
It TLWYs almost randomly, or it breaks so much, that the "tlwytest" will run "endlessly" until you do something (for example rub the screen with the mouse, until it starts to purr)
Tested on CC 1.6x, it broke completely, I was unable to terminate/reboot/shutdown, so I had to reload everything.
On CC 1.7x, it froze my game almost instantly (it got to ~500). So I don't know if this version is affected.
On the second attempt, I held CTRL + T/R/S for 10-10 seconds, but the computer did not respond. I had to break it. After some time, MC stopped eating up the CPU-usage.
I know that this bug is almost unfixable, but I reported this just in case, if someone has a great mind to think about a fix.
Edited on 28 April 2015 - 06:11 PM