Instance:WaitForChild crashes Roblox when passing long string without timeout

Reproduction Steps

System Information
Intel Core i9 9900K
Nvidia GeForce RTX 2080Ti

Edit: Sometimes you’ll get a bad allocation error so I recommend changing the size of the string if that happens.

Edit 2: Only seems to work in studio, could this report be moved?


workspace:WaitForChild(string.rep("a", 2 ^ 30))

Expected Behavior
Roblox should not crash and possibly throw an error.

Actual Behavior
Roblox freezes and crashes.


Issue Area: Engine
Issue Type: Crashing
Impact: Low
Frequency: Very Rarely


Can confirm that this is reproducible.

This issue happens to me when pasting the command via the in-experience command line.

System specs
CPU: AMD Ryzen 7 3700X (16) @ 3.600GHz
GPU: AMD ATI Radeon RX 470/480/570/570X/580/580X/590
Memory: 15920MiB

I just checked and it happens, though I hope people don’t create large strings like that in the game. Is literally: 1,073,741,824 Characters

This code already takes time to execute: string.rep("a", 2 ^ 30)
1.5 - 1.8 seconds

Thank you for reporting this issue. We can reproduce the problem. The crash is caused by an unhandled out-of-memory error. We’re looking into fixing the issue.


This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.

We’ve deployed a fix for this, please let us know if you see any issues. Thanks again!