
NBT memory leak via unprocessed signal spam
SkyDrive94 opened this issue ยท 2 comments
Create base computer (/oc_sc) and add Redstone I/O
component.
Run this code:
local component = require("component")
function proxy(cT)
local address = component.list(cT)()
if address then
return component.proxy(address)
else
error('COMPONENT NOT FOUND: "' .. cT .. '"!')
end
end
local redstone = proxy("redstone")
redstone.setWakeThreshold(15)
redstone.setWakeThreshold(15)
redstone.setWakeThreshold(15)
while true do
print("123")
end
After that, send pulsating signals to the Redstone I/O
.
These NBT tags will be recorded into the Computer Case or into the Robot (with Redstone Card)
signals:[
0:{args:{arg3:0.0d,arg2:15.0d,arg1:5.0d,arg0:"e7290407-c3e2-4e99-ad8c-e56263707cfa",length:4},name:"redstone_changed"},
1:{args:{arg3:15.0d,arg2:0.0d,arg1:5.0d,arg0:"e7290407-c3e2-4e99-ad8c-e56263707cfa",length:4},name:"redstone_changed"},
2:{args:{arg3:0.0d,arg2:15.0d,arg1:5.0d,arg0:"e7290407-c3e2-4e99-ad8c-e56263707cfa",length:4},name:"redstone_changed"},
3:{args:{arg3:15.0d,arg2:0.0d,arg1:5.0d,arg0:"e7290407-c3e2-4e99-ad8c-e56263707cfa",length:4},name:"redstone_changed"},
4:{args:{arg3:0.0d,arg2:15.0d,arg1:5.0d,arg0:"e7290407-c3e2-4e99-ad8c-e56263707cfa",length:4},name:"redstone_changed"},
5:{args:{arg3:15.0d,arg2:0.0d,arg1:5.0d,arg0:"e7290407-c3e2-4e99-ad8c-e56263707cfa",length:4},name:"redstone_changed"},
6:{args:{arg3:0.0d,arg2:15.0d,arg1:5.0d,arg0:"e7290407-c3e2-4e99-ad8c-e56263707cfa",length:4},name:"redstone_changed"},
7:{args:{arg3:15.0d,arg2:0.0d,arg1:5.0d,arg0:"e7290407-c3e2-4e99-ad8c-e56263707cfa",length:4},name:"redstone_changed"},
...]
Then, after a while, server dies.
Maybe there is a problem with other components.
Tested on:
Minecraft 1.7.10
Forge 10.13.4.1614
OpenComputers 1.6.2.12 / 1.8.0
I mean, it's working as intended; where are you pulling and processing the events/signals? OpenComputers keeps a queue of all signals to be processed.
Now, it "working as intended" doesn't mean it should be doing this; rather, there should be a hard limit above which signals are dropped - so I'll leave this issue open.
@SkyDrive94 You could execute the following code to test whether the problem is with redstone only:
local computer = require('computer')
while true do
computer.pushSignal('test_signal')
end
Also,
- Is the error logged on server crash? What is it?
- Is
maxSignalQueueSize
in config set to 256 or a higher value?