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

Select Computers Turning Off

Started by Tr33x0rs, 24 December 2012 - 07:08 PM
Tr33x0rs #1
Posted 24 December 2012 - 08:08 PM
I have hosted a Tekkit server for about 4 months, and have had no problem with monitors showing my "Welcome Message" and other info about the server by changing my startup to "shell.run("monitor", "location", "ProgramName"). I have recently changed server hosts, so I basically just did a full backup of my current server, and moved it to the new server. Everything was working fine for 3-5 days, then out of nowhere, some of the computers will not display anything unless I right click on them. When I look at the computer, I show no ">" sign, indicating that the computer is off, like so - http://puu.sh/1EEus . Once I right click on the computer, it will do exactly what it should be doing, like so - http://puu.sh/1EEvY .I have heard that this may be that the chunk is not staying loaded, although it seems that 9 of the 10 computers in the building work fine, except for one, although they're all in the same chunk.

I have tried numerous things, such as deleting my /world/computer/ directory to try and reset it, I've tried loading my files for /mods/computercraft over again. When I deleted my /world/computer/ directory, and restarted the server, it would automatically refill some of my folders with numbers such as 76, 10, etc. I am thinking this is simply reloading the computer's folder for computers that are already loaded. Computers are banned on my server, and are only to be used for staff, although throughout the time of messing with them on the server, I have up to 175+ folders in /world/Computer/. Is there any way to trim back on these, or restart at 0, could this be part of my issue?

I have tried having the program saved on the computer, as well as in /mods/ComputerCraft/lua/rom/programs. Nothing seems to be working. I don't understand why they all work, except for the same couple that do not.. I have tried making a loop in the startup, such as:

while true do
shell.run("monitor", "top", "VisitorSpawn")
sleep(120)
end

although this also doesn't do any good. I read that making a loop may help if the chunk is unloaded, although I'm 99% sure this isn't the issue as all the other computers in the same location are working just fine.

When I transferred the server, one of my computers was giving the msg Bios 32: Invalid Monitor Setup, which I have tried re-placing the monitors, moving the computer, etc, with no luck. Thinking this one computer was causing me issues, I deleted it, but I still have the issue.

My LUA is nothing special, just a regular "print "blablabla". You can view an example here - http://pastebin.com/SSvQk5Rx . This is the main monitor visitors see when they join my server, and it seems to be causing me issues. There is one more monitor that is also causing issues, no matter where I save the LUA, or where the position the computer. I have changed computer locations, and have gotten it working, only to log off 30 mins, and hear it's not working again, showing nothing on the monitor, and showing nothing on the computer screen until I right click at which time it will say "Running ___________ on top monitor" etc.

Any ideas? I go out of town tomorrow (12/24) for a couple days and am hoping to have this resolved by then. If you need anythign else from me, please let me know, I tried to be as descriptive as possible. Thank you all for your help.
ChunLing #2
Posted 24 December 2012 - 08:35 PM
Is the program linked the "VisitorSpawn" you are running using shell.run("monitor", "top", "VisitorSpawn")?

Because it already is set up to use a monitor for output, running it through the monitor program is naturally going to be problematic.
immibis #3
Posted 24 December 2012 - 08:47 PM
It's a bug. There's nothing you can do about it as long as you're using 1.2.5.
KaoS #4
Posted 25 December 2012 - 01:59 AM
you will also find that it shuts down computers if their memory usage is too high so if you make one computer have a
while true do sleep(0) end
loop you will find that it uses the server's resources up and CC starts turning off computers
Cloudy #5
Posted 25 December 2012 - 02:53 AM
you will also find that it shuts down computers if their memory usage is too high so if you make one computer have a
while true do sleep(0) end
loop you will find that it uses the server's resources up and CC starts turning off computers

How the Hell would that use resources up?
6677 #6
Posted 25 December 2012 - 05:12 AM
I've actually had that happen. The Lua VM seems to hog CPU cycles and never yields any time back to the game engine.
Cloudy #7
Posted 25 December 2012 - 05:45 AM
I've actually had that happen. The Lua VM seems to hog CPU cycles and never yields any time back to the game engine.

The code above would work fine… No hogging of anything.
Tr33x0rs #8
Posted 25 December 2012 - 08:09 AM
Okay, well I'm not sure why this happened all of a sudden, it worked fine for months on the other server, and for over 4 days at the new location, with numerous restarts. I will continue to mess with it to see if it fixes itself.

Would it be possible to clear out all my computer id's and start over? Again, I have over 160+ computer Id's and I only have about 10 computers. I would like to have it more organized so that I know what folder is what. Thanks again guys for your help!
Cloudy #9
Posted 25 December 2012 - 08:23 AM
Yes, delete all computer folders, remove all computer blocks in the world. Only way to do it. If you delete all computer folders, new computers will start at 0 while existing ones will use their own ID's.
Tr33x0rs #10
Posted 25 December 2012 - 09:41 AM
Thanks Cloudy for your help. I tried deleting all the computers and starting over, but now all my monitors are having a problem. It seems to happen when a player joins the game.. For example I have my monitor setup in spawn with the rules, which shows text, because i just re-set it up. When a player joins the server infront of that monitor, it goes blank. Would this be caused by something? Anyone else have any ideas? What would I need to reload to reinstall computercraft? the zip file and the files in /mods/computercraft ? Thank you guys.
KaoS #11
Posted 25 December 2012 - 09:43 AM
you will also find that it shuts down computers if their memory usage is too high so if you make one computer have a
while true do sleep(0) end
loop you will find that it uses the server's resources up and CC starts turning off computers

How the Hell would that use resources up?

to be honest with you I have no idea. I do not know how it works or anything I just know I used tekkit back in the day (1.2.5) and had that exact issue causing unending problems, my loop had other code like redstone managing etc too though
GopherAtl #12
Posted 25 December 2012 - 09:53 AM
This may be completely unrelated, but I had issues with some computers not starting up properly on my server when I had the ComputerCraft mod installed on the server unzipped to a ComputerCraft directory instead of as a .zip file. In my case I was getting error messages on the computers, generally "File not found" without any "CraftOS" message appearing first, but I vaguely recall a few computers hanging without that message displaying. Since it seems like nobody is sure what's going wrong in your case, if you've been using the mod unzipped on the server, you could give this a try.