Open 1-creare-1 opened 3 months ago
Please provide as many scripts that reproduce the issue as you can @1-creare-1
There is currently a bug that causes the CPU tracking code to never end in some contexts.
this will pause execution every time it performs the task.wait
local GetUserId = require('players').GetUserId
for i = 1,10 do
task.wait(0.1)
print(pcall(GetUserId,nil,`{math.random()}`))
end
The throttling 🟡 seems to happen when :Configure
is called just as @1-creare-1 said. Based on my observation, it only occurs when:
SignText
for Sign
)string
Repro code below:
local sign = GetPart("Sign")
print("Starting safe test.")
-- These values are confirmed not to exhaust resources
local SAFE_TEST_VALUES = {
bool = true,
number = 42,
table = {},
vector = Vector3.zero,
cf = CFrame.new(),
thread = coroutine.create(function() end),
}
for type, value in SAFE_TEST_VALUES do
sign:Configure({ SignText = value })
end
-- Direct writes will not exhaust resources
sign.SignText = "Write by key"
-- Strings that aren't valid properties of the part will not exhaust resources
sign:Configure({ ThisPropertyDoesNotExist = "42" })
print("Safe test done. preparing for string test that will exhaust resource.")
-- Wait to make sure the tests above dont interfere
task.wait(1)
-- This will exhaust resources and warn
sign:Configure({ SignText = "42" })
-- Wait so the warn will appear before the print
task.wait()
print("All tests done!")
Guidelines
Version
Main (Production)
What happened? What did you expect to happen?
When running the following script (and similar scripts) the microntroller will throttle even though these scripts shouldn't be taking 100ms/tick
I've also noticed this happen to a lot of other short snippets of code and they all seem to share the common similarity of calling a method on a part like
:SetColor
or:Configure
How can we reproduce this bug?
Frequency
Always