Mista-Tea / improved-stacker

A complete rewrite of the Stacker tool, including multiple new features for both players and developers, as well as multiple crash fixes.
18 stars 10 forks source link

Changing languages causes GMod to hang #33

Closed Mista-Tea closed 5 years ago

Mista-Tea commented 5 years ago

Discovered that sometime during the last few updates, a change has caused the cvars.AddChangeCallback() code that rebuilds the controlpanel to show the newly selected language to cause the callback to call itself infinitely.

I don't have a definite answer but I would probably pin this on changes to what version of Lua/LuaJIT that GMod uses, and how it treats referencing a function within its own function definition. Previous behavior did not crash and worked just fine. Moving the callback to after the function definition appears to solve the problem.