:RequestStreamAroundAsync Yields forever (Engine Bug? Max Limit?)

Hi, I noticed something while trying raycast collisions on bezier curved bullets.
After many :RequestStreamAroundAsync calls, the method yields forever, stopping the threads calling it from running. I can’t post this into Engine Bugs and idk if it is a bug or limit or whatever.

I am not saying it yields forever once. It yields forever, forever. After enough :RequestStreamAroundAsync calls, the game stops streaming to the player.

–Tried to get the videos below 10 MB, thats why they are low res.–

First trial: Yields forever after 255 requests


Second trial: Lowered the data sent, for those who think it is because I am sending too much data. Yields forever after 255 requests

Third trial: Tried outside roblox studio, Yields forever after 255 requests. Same as second trial.
-Setting a timeout for the :RequestStreamAroundAsync does not change anything aswell.

255 is an odd number for coincidence, so I think this is a limit. Why does this limit exist?

I mean :RequestStreamAroundAsync and then :WaitForChild() for a part received from the server feels a lot more safe. Even if it is unnecessary most of the time, limitting it to 255 calls per player seems weird, as servers can stay open for days. We should atleast be able to check the magnitude of the distance between object and player and then call the stream if it is higher than target radius, which won’t be possible with maximum of 255 calls. There should be a reasonable explanation for this, or it is a bug.

2 Likes

I’ve encountered this bug pretty recently. I have not found a way around it. I use RequestStreamAroundASync in my loading system in my game. I’ve put it in a spawn(function() and a pcall. However I use spawn(function() often for cases like this, Just incase it fails and doesn’t brick the players entire game. Hopefully this will help you.

It should yield the code tho. Using it in an another thread is not that successful on my case because in cases like mine, you are using :WaitForChild directly after it finishes requesting. I guess promises are good for this case(?). I stopped using streaming enabled because of the limit also my game did not required stream that much. Who knows maybe they will add ability to set radius one day and also remove the limit.

Yeah the limit is annoying, It commonly disrupts my game pretty often, and on large servers it just flat out makes no more exceptions and bricks everyones loading. Just for now I wrapped in a spawn function with a set timeout if it doesn’t work.