Jump to content




[Error] Sandboxing utility acts weirdly, then reboots.


  • You cannot reply to this topic
1 reply to this topic

#1 MudkipTheEpic

  • Members
  • 639 posts
  • LocationWhere you'd least expect it.

Posted 10 March 2013 - 12:05 PM

Hi! My sandboxing utility I am making, OSRunner, or VirtualCC, is acting unexpectedly. First, it freezes for about 2 seconds, then shuts down. I am thinking this may be because of an infinite loop, or too much processing, but I am not sure.

Code: vUJeMXR4

Help would be greatly appreciated. I will be back tomorrow to look at answers.

(I know this is a semi-hard problem, so don't feel bad if you can't figure it out.)

Thanks,
--Mudkip

#2 remiX

  • Members
  • 2,076 posts
  • LocationSouth Africa

Posted 10 March 2013 - 12:12 PM

It's because of this while loop:
while true do
    if not string.sub(dir,#dir,#dir) == ("/" or "\\") then break end
    dir=string.sub(dir,1,#dir-1)..""
end

What is it supposed to do?
I put a print( dir ) and a sleep( 1 ) and the output was like this:
argument was test
test
tes
te
t




Yeah, it also spammed blanks and still is after 1 minute... it isn't breaking.





2 user(s) are reading this topic

0 members, 2 guests, 0 anonymous users