How to debug C stack overflow errors?

I keep getting spurious errors like this that sometimes crashes Studio:

2024-07-22T12:00:38.956Z,94.956741,017c,6 [FLog::Error] Error: C stack overflow
2024-07-22T12:00:38.956Z,94.956741,017c,6 [FLog::Error] Error: C stack overflow
2024-07-22T12:00:38.956Z,94.956741,017c,6 [FLog::Error] Error: C stack overflow
2024-07-22T12:00:38.956Z,94.956741,017c,6 [FLog::Error] Error: C stack overflow
2024-07-22T12:00:38.957Z,94.957741,017c,6 [FLog::Error] Error: C stack overflow
2024-07-22T12:00:38.957Z,94.957741,017c,6 [FLog::Error] Error: C stack overflow
2024-07-22T12:00:38.957Z,94.957741,017c,6 [FLog::Error] Error: C stack overflow
2024-07-22T12:00:38.957Z,94.957741,017c,6 [FLog::Error] Error: Maximum event re-entrancy depth exceeded for ScriptContext.Error
2024-07-22T12:00:39.017Z,95.017784,017c,6 [FLog::Error] Error: C stack overflow
2024-07-22T12:00:39.017Z,95.017784,017c,6 [FLog::Error] Error: C stack overflow
2024-07-22T12:00:39.018Z,95.018784,017c,6 [FLog::Error] Error: C stack overflow
2024-07-22T12:00:39.018Z,95.018784,017c,6 [FLog::Error] Error: C stack overflow
2024-07-22T12:00:39.018Z,95.018784,017c,6 [FLog::Error] Error: C stack overflow
2024-07-22T12:00:39.018Z,95.018784,017c,6 [FLog::Error] Error: C stack overflow
2024-07-22T12:00:39.018Z,95.018784,017c,6 [FLog::Error] Error: C stack overflow
2024-07-22T12:00:39.018Z,95.018784,017c,6 [FLog::Error] Error: Maximum event re-entrancy depth exceeded for ScriptContext.Error
2024-07-22T12:00:39.087Z,95.087769,017c,6 [FLog::Error] Error: C stack overflow
2024-07-22T12:00:39.088Z,95.088776,017c,6 [FLog::Error] Error: C stack overflow
2024-07-22T12:00:39.088Z,95.088776,017c,6 [FLog::Error] Error: C stack overflow
2024-07-22T12:00:39.088Z,95.088776,017c,6 [FLog::Error] Error: C stack overflow
2024-07-22T12:00:39.088Z,95.088776,017c,6 [FLog::Error] Error: C stack overflow
2024-07-22T12:00:39.088Z,95.088776,017c,6 [FLog::Error] Error: C stack overflow
2024-07-22T12:00:39.090Z,95.090775,017c,6 [FLog::Error] Error: C stack overflow
2024-07-22T12:00:39.090Z,95.090775,017c,6 [FLog::Error] Error: Maximum event re-entrancy depth exceeded for ScriptContext.Error
2024-07-22T12:00:39.175Z,95.175400,017c,6 [FLog::Error] Error: C stack overflow
2024-07-22T12:00:39.176Z,95.176399,017c,6 [FLog::Error] Error: C stack overflow
2024-07-22T12:00:39.176Z,95.176399,017c,6 [FLog::Error] Error: C stack overflow
2024-07-22T12:00:39.176Z,95.176399,017c,6 [FLog::Error] Error: C stack overflow
2024-07-22T12:00:39.176Z,95.176399,017c,6 [FLog::Error] Error: C stack overflow
2024-07-22T12:00:39.176Z,95.176399,017c,6 [FLog::Error] Error: C stack overflow
2024-07-22T12:00:39.177Z,95.177399,017c,6 [FLog::Error] Error: C stack overflow
2024-07-22T12:00:39.177Z,95.177399,017c,6 [FLog::Error] Error: Maximum event re-entrancy depth exceeded for ScriptContext.Error
2024-07-22T12:00:39.283Z,95.283264,017c,6 [FLog::Error] Error: C stack overflow
2024-07-22T12:00:39.284Z,95.284264,017c,6 [FLog::Error] Error: C stack overflow
2024-07-22T12:00:39.284Z,95.284264,017c,6 [FLog::Error] Error: C stack overflow
2024-07-22T12:00:39.284Z,95.284264,017c,6 [FLog::Error] Error: C stack overflow
2024-07-22T12:00:39.284Z,95.284264,017c,6 [FLog::Error] Error: C stack overflow
2024-07-22T12:00:39.284Z,95.284264,017c,6 [FLog::Error] Error: C stack overflow
2024-07-22T12:00:39.284Z,95.284264,017c,6 [FLog::Error] Error: C stack overflow
2024-07-22T12:00:39.285Z,95.285263,017c,6 [FLog::Error] Error: Maximum event re-entrancy depth exceeded for ScriptContext.Error

These don’t provide a traceback. How do I debug this?

Judging from other posts you need to find any script or module script related to metatables so search for something like __mul or __newindex.

Nevermind, if I wait patiently the problematic script is killed by Roblox and throws a script timeout error.

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