beyond-all-reason / spring

A powerful free cross-platform RTS game engine
https://beyond-all-reason.github.io/spring/
Other
178 stars 95 forks source link

105-2508 LuaHandle::CheckStack spam #1523

Closed GoogleFrog closed 2 weeks ago

GoogleFrog commented 1 month ago

My infolog is getting spammed with

[t=00:13:08.448090][f=0008033] Warning: [LuaHandle::CheckStack] LuaRules stack-top = 1
[t=00:13:11.482408][f=0008124] Warning: [LuaHandle::CheckStack] LuaRules stack-top = 1
[t=00:13:13.149543][f=0008174] Warning: [LuaHandle::CheckStack] LuaRules stack-top = 1
[t=00:13:14.184117][f=0008205] Warning: [LuaHandle::CheckStack] LuaRules stack-top = 1
[t=00:13:15.419643][f=0008242] Warning: [LuaHandle::CheckStack] LuaRules stack-top = 1
[t=00:13:16.775676][f=0008283] Warning: [LuaHandle::CheckStack] LuaRules stack-top = 1
[t=00:13:20.182168][f=0008385] Warning: [LuaHandle::CheckStack] LuaRules stack-top = 1
[t=00:13:22.041621][f=0008441] Warning: [LuaHandle::CheckStack] LuaRules stack-top = 1
[t=00:13:22.118210][f=0008443] Warning: [LuaHandle::CheckStack] LuaRules stack-top = 1
[t=00:13:24.247701][f=0008507] Warning: [LuaHandle::CheckStack] LuaRules stack-top = 1

in local testing. What is it for?

sprunk commented 1 month ago

I think some engine interface (wither gadget:Bla or Spring.Bla) has a mismatch between the number of values it claims to push to (or pop from) the stack and the number it actually pushes/pops.

Normally it looks for example like this https://github.com/beyond-all-reason/spring/blob/69f9ce845032b753cb33bdfc330b1d0798c4cfd9/rts/Lua/LuaSyncedRead.cpp#L479-L483

sprunk commented 2 weeks ago

Bisected to 24a99bfdfb4f89ba89508a7e785b3a4e97a8a53d @lostsquirrel1

lostsquirrel1 commented 2 weeks ago

Thanks for sorting that out.