Eggs-D-Studios / wos-issues

Waste of Space bugs, suggestions, and other feedback
6 stars 0 forks source link

Microcontrollers throttling execution on basic scripts #259

Open 1-creare-1 opened 2 weeks ago

1-creare-1 commented 2 weeks ago

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

GetPart("Light"):SetColor(BrickColor.random().Color)

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 image

How can we reproduce this bug?

  1. Load this model:
    {"m":null,"t":"buffer","zbase64":"KLUv/WBNAl0MAKYQQDtAxSgdw051VWFRcOdg1VdsqopiWI58X+BID7ClXTLiOone9gK+bljbZcPMfzMyMtjqDzIIYXXbm2yZAi0AKwA1AA2z/xpKacY+zFMqlZo/oU6on1LKsbHN/5Pkn5Ffg78EAFOJdtJhevU/kf8mf1M2Nh+Cbc4VBGIn+scyzAoQgPDHfAL8/VZChXLJ2P+l5hrqP1Zt/RV8/T93u3jjLCwOmQWFqzMEq2VVKtkuj0QcBvWFFXU1A4uYAoI8EnEVlAODi0Ve8sHKQMymxWpZBTL2/ydfRdPxdDgfN9RV7PHYOAzi4Eu6WrYaEZ3NhpNxxciWAsKGrtaxgQFbEuni3AVDIMACseMOhDCBypqJrjfaakocSMqJ0LJLsuJ9L6okAfeewDHpiMsptTthV9QIc3iLh6TGq11UVITh287WJlkYLBu/j2dz3gD6ruDvINSf3ZQgWEPm2UgoQz8yaoRAsD1OtmILDl1DmV4Wa9vLF9zF3tVMjtEFagISG7eDDDUl4CIcwIiADuUE"}
  2. Open F9
  3. Click the microcontroller a couple times, observe the throttling warnings

Frequency

Always

Hexcede commented 2 weeks 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.

LuaBloxor commented 1 week ago

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