WeaselGames / godot_luaAPI

Godot LuaAPI
https://luaapi.weaselgames.info
Other
381 stars 29 forks source link

Possible stack leak #202

Open KevBruner opened 6 months ago

KevBruner commented 6 months ago

While debugging an issue using getVariant with a table that had a __pairs metamethod, I noticed that the stack top was creeping up 1 index per frame, even before I started modifying code.

By adding printf( "stack top %d\n", lua_gettop(state)); at the entry of getVariant it would produce a result that was constantly incrementing, which is suspicious. I'm not familiar enough with the rest of the code to investigate more deeply at the moment.

SumianVoice commented 5 months ago

Possible relation to https://github.com/WeaselGames/godot_luaAPI/issues/208?