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

[1.4.7/DW20 5.0.1] Using Rednet Breaks Reality

Started by schilcote, 29 January 2013 - 09:14 AM
schilcote #1
Posted 29 January 2013 - 10:14 AM
I'm trying to investigate deeper into the problem, but here's what I know so far:

The following code disables all right-clickable blocks and the inventory screen, and when I try to exit Minecraft Java stays open until I forcibly terminate it with Task Manager:


rednet.open("top")
while true do
    rednet.broadcast("Testing123")
end

This code doesn't cause the problem:


rednet.open("top")
rednet.broadcast("Testing123")

Nor does this:


rednet.open("top")
while true do
    rednet.broadcast("Testing123")
    sleep(1)
end

Seems to only be when rednet broadcasts are sent out in quick succession. Could probably fix it by putting a timeout on rednet.broadcast() so it can't be called like that.

I'm running ComputerCraft v1.481 (rev 834) in the FTB DW20 5.0.1 pack.
NeverCast #2
Posted 29 January 2013 - 10:18 AM
Seems like rednet is spending so much time processing that MC is unable to have enough time to process the other actions and updates on the server..
I imagine you're dropping the TPS on the game causing the updates to lag.
Cranium #3
Posted 29 January 2013 - 11:51 AM

rednet.open("top")
while true do
    rednet.broadcast("Testing123")
end
This should actually cause a 'too long without yielding' error. I have never had any problem spamming rednet. A string that size shouldn't cause trouble either….
schilcote #4
Posted 29 January 2013 - 12:35 PM

rednet.open("top")
while true do
	rednet.broadcast("Testing123")
end
This should actually cause a 'too long without yielding' error. I have never had any problem spamming rednet. A string that size shouldn't cause trouble either….

It should, but it doesn't. I think I had it do so once, but aside from that it seems to keep running forever- with no way to stop it, since you can't access the computer block.
Cloudy #5
Posted 29 January 2013 - 01:18 PM
This is probably the server side freezing, which is a known issue which should be fixed soon.
Cranium #6
Posted 30 January 2013 - 03:26 AM
This is probably the server side freezing, which is a known issue which should be fixed soon.
So is it due to the massive amounts of rednet messages spamming, or is it something different?
PixelToast #7
Posted 30 January 2013 - 10:04 AM
i combined my EMP program (it constantly spams massive strings)
with my turtle swarm
65 turtles is enough to crash the server instantly and permanently (until you restart it)
fyndor #8
Posted 31 January 2013 - 07:54 PM
i combined my EMP program (it constantly spams massive strings)
with my turtle swarm
65 turtles is enough to crash the server instantly and permanently (until you restart it)

lol, EMP… I like your style

For the sake of public servers though I hope no griefers read your post. It would be sad if admins started dropping CC from servers.
Cranium #9
Posted 01 February 2013 - 02:52 AM
It's easy enough to override the rednet.broadcast and rednet.send functions to error out on strings over a certain length. Smart admins can do this themselves.
KaoS #10
Posted 01 February 2013 - 03:00 AM

rednet.open("top")
while true do
	rednet.broadcast("Testing123")
end
This should actually cause a 'too long without yielding' error. I have never had any problem spamming rednet. A string that size shouldn't cause trouble either….

unfortunately I have noticed a number of ways to loop without yielding or getting that error :(/> I see why it would happen here too, it's all because of how rednet is based on coroutines from what I can see
Cloudy #11
Posted 01 February 2013 - 03:04 AM
This has nothing to do with string length :|
Cranium #12
Posted 01 February 2013 - 03:43 AM
This has nothing to do with string length :|
I know that THIS bug has nothing to do with string lengths, Cloudy. I was talking about PixelToasts' EMP program. It is easy enough to prevent that type of exploit.
PixelToast #13
Posted 01 February 2013 - 05:29 AM
This has nothing to do with string length :|
the program eats up ram pretty quickly, it dosent eat as much ram when its under 1000 chars
Cranium #14
Posted 01 February 2013 - 05:30 AM
You saw nothing….. :ph34r:/>
dan200 #15
Posted 21 February 2013 - 04:11 AM
This was fixed in 1.5