I think i have a virus

Alright, i will try! Thanks to everyone for letting me know about memory leaks, i never knew they existed.

1 Like

Hmm… that’s weird… im using like 2500 MB, in studio, don’t know if that is alot, and it still just crashes, it doesn’t even start to lag, it just freezes and then im forced to close… also i tried disabling every script and it didnt even change the memory at all.

1 Like

That is extremely rare. Very interesting. You can re-enable all of the scripts now and start placing some of your parts and models into server storage and see which one is causing it to crash. Once you find it, submit a bug report to Roblox Staff with the rbxl file so they can investigate

1 Like

I already reported a bug about it, but i could do it again since i know the reasoning now.

1 Like

yes definitely as long as you know exactly which part/s or model/s is causing it to crash

1 Like

Well i don’t. Also i managed to get nearly every asset into another place, and it doesn’t crash there, but it’s using the same amount of MB?

1 Like

Save the game to file(so it includes all scripts and parts), open the file not the place from roblox itself, and see what happens

This means that the server is suddenly crashing. However this can happen due to multiple reasons apart from viruses, for example if there’s a memory leak or if you have large sections of resource heavy code without any yielding in between. Another possible scenario is that your event handlers cause some sort of deadly recursive loop without a stop condition, for example event1 calls function1 that triggers event2 that calls functions2 that triggers event1, and that goes on.

Also this topic belongs in #help-and-feedback:scripting-support

Well, i did download the file and open it in another place, and it crashed there too, i think it’s just a part of my code or something.

What do you mean by large sections of resource heavy code without any yielding?

Guys, i fixed it. I don’t know what caused it, but i took an older version of the game, added the new stuff and then saved my main game as that game. And it doesn’t crash :slight_smile:

Oh and also the game would work fine for a couple of minutes and then suddenly freeze and kick you.

This post gives me very strong xkcd: Virus Venn Diagram vibes

Basically you’re running many heavy instructions at once without adding delays in between(for example a delay can be task.wait). All physical machines(such as your computer) have space and time limits, space limits are thing such as memory and time limits(like this one) are things such as how many things you can do at once without lag.

Like using spawn() too much? or coroutines?

Neither of these specific functions are the problem. The problem is this. I will provide a clear example so you understand.

--This will cause studio/game to freeze because no yielding
for i=1, 100000 do
print("Hello")
end
--This has a yield in it which causes our studio/game to run the code without freezing
for i=1, 100000 do
task.wait() --yield
print("Hello")
end