beyond-all-reason / beyond-all-reason/RecoilEngine
Script.LuaUI("foo") sometimes gives incorrect results
- Dominant language
- C++
- Stars
- 683
- Forks
- 293
- Avg merge
- 3d 2h
- Merged PRs (30d)
- 40
Description
Repro: https://github.com/ZeroK-RTS/Zero-K/tree/script_luaui run the game and check infolog.
```
CollectGarbage available?, true
Warning: [LuaHandle::XCall] tried to cross-call unlinked Script.LuaUI.CollectGarbage()
Explosion available?, false
boom
trololo available?, false
Warning: [LuaHandle::XCall] tried to cross-call unlinked Script.LuaUI.trololo()
UnitCreated available?, true
[cawidgets.lua] Error: Error in UnitCreated(): [string "LuaUI/Widgets/gui_build_eta.lua"]:230: attempt to compare nil with number
```
* for UnitCreated and trololo it behaved correctly and the functions were really available or not according to the check (UnitCreated errored because we gave it garbage data but that's fine, the point is that the function was really there and able to be called as the check said it would be).
* for Explosion it said it's not available but actually it was.
* for CollectGarbage it said it's available but actually it wasn't.
Contributor guide
Research direction
Check out the script_luaui branch from the reproduction link, run the game, and inspect the infolog output. Start at the Script.LuaUI availability check and its cross-call behavior for CollectGarbage, Explosion, trololo, and UnitCreated. Done means availability checks consistently match whether each function can actually be called.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, lua
- Domain
- game-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100