You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This doesn't affect Greybel at all, but it can completely hang a script in-game. It requires a certain amount of cyclic references - simply doing Foo = {}; Foo.__isa = Foo doesn't affect it at all. This is a bug that's been fixed in the first 2023 release of MiniScript, but of course, GreyHack isn't using that.
From in-game testing, the hang seems to occur somewhere inside hash calculation of map keys - I suspect it's somewhere on the order of O(n^2) (or worse) since paring down the example below will hang the game for just a few seconds.
For the purposes of the enhancement, just warning on the detection of any cycles would be a fantastic feature.
Well detecting this while building or editing will be pretty hard since I imagine that this requires some quite complex logic. Especially since there is no runtime logic available.
But detecting cyclic data while running the interpreter is a lot more feasible.
Yeah, I suppose you could do a rudimentary check without executing by evaluating the script in the background - but the caveat there is that once any sort of map mutation is occurring in a funcRef, you have to skip over it since the script shouldn't actually execute any operations.
In any case, even just during runtime could prevent folks from shooting themselves in the foot.
This doesn't affect Greybel at all, but it can completely hang a script in-game. It requires a certain amount of cyclic references - simply doing
Foo = {}; Foo.__isa = Foo
doesn't affect it at all. This is a bug that's been fixed in the first 2023 release of MiniScript, but of course, GreyHack isn't using that.From in-game testing, the hang seems to occur somewhere inside hash calculation of map keys - I suspect it's somewhere on the order of
O(n^2)
(or worse) since paring down the example below will hang the game for just a few seconds.For the purposes of the enhancement, just warning on the detection of any cycles would be a fantastic feature.
The bad code:
The text was updated successfully, but these errors were encountered: