Cyclic Tables Error Will Only Occur In Live Games

  1. Create a cyclic table, i.e.
local t = {}
t.self = t
  1. Pass this table as a parameter through a BindableEvent

  2. The outcome is different depending on whether you’re in studio (including local servers!!) or in a live game. In studio no error occurs. In a live game it will create an error ‘tables cannot be cyclic’

Repro file included.

This has been far more problematic than it sounds. Due to the very long load time for connecting to a live server, I’ve been using local test servers for the last 1-2 weeks.
Therefore I’ve not been getting any errors.
I rewrote a huge chunk of the game in those 2 weeks. The rewrite included tons of cyclic tables.
I am now sad.

Luckily thanks to the community providing custom classes to replace bindable events, it’s mostly just a case of replacing all the bindable events in the game, but it’s a tedious task I could do without.
bug.rbxl (14.5 KB)

9 Likes

Any word on why this error only occurs in live games? I’m not aware of anything else (that doesn’t pull data from somewhere outside the server) that only errors in a live game and not in a test environment.

Yeah okay any fixes yet?? How am i gonna save datastores with this annoying bug now?

Why do you have cyclic references in datastore data? Surely that’s something you can easily work around.

What Is Cyclic Table? At first explain that then tell me what could i do

Please make sure to read topics before responding to them. Example in first post:

Tables that reference themselves to create loops. In the example above, t.self is set to t, so you can actually do t.self.self.self.self.self.(…) and it will always be t no matter how many times you index it.

Cyclic references in tables are seldomly used on purpose, so if you don’t even understand what they are and you are encountering this error, it probably means you are accidentally creating these cycles and you might want to check your code for mistakes.