View Issue Details

IDProjectCategoryView StatusLast Update
0001482Spring engineGeneralpublic2009-07-07 21:08
Reporterimbaczek Assigned To 
PriorityhighSeverityblockReproducibilityrandom
Status closedResolutionwon't fix 
Product Version0.79.1.0+git 
Summary0001482: lua rules can go batshit insane
DescriptionKernel Panic 3.3 and 3.5 exhibit this issue, don't know about any other mods.

e.g.

LuaRules::RunCallIn: error = 2, GameFrame, [string "LuaRules/Gadgets/luacob.lua"]:37: attempt to call field 'SetUnitCOBValue' (a nil value)
stack traceback:
    [string "LuaRules/Gadgets/luacob.lua"]:37: in function 'GameFrame'
    [string "LuaGadgets/gadgets.lua"]:927: in function <[string "LuaGadgets/gadgets.lua"]:925>
    (tail call): ?

LuaRules::RunCallIn: error = 2, GameFrame, [string "LuaRules/Gadgets/luacob.lua"]:36: SetUnitBlocking(): Bad unitID
stack traceback:
    [C]: in function 'SetUnitBlocking'
    [string "LuaRules/Gadgets/luacob.lua"]:36: in function 'GameFrame'
    [string "LuaGadgets/gadgets.lua"]:927: in function <[string "LuaGadgets/gadgets.lua"]:925>
    (tail call): ?


steps to reproduce: make a game with two ais, random start positions, player as spectator. i reproduce it with my ai and the lua kp ai, but iirc 2 lua ais are also problematic. using commit cf6ce8a (pre luacob merge) the errors disappear, but i haven't done any bisecting.
TagsNo tags attached.
Checked infolog.txt for Errors

Activities

Kloot

2009-06-30 20:51

developer   ~0003696

SetUnitCOBValue was removed from the API altogether, it no longer exists.

The SetUnitBlocking errors point to a Lua stack management bug somewhere, we'd probably need a full trace of all gadget API calls to find it.

imbaczek

2009-06-30 20:55

reporter   ~0003697

makes sense, the SetUnitCOBValue wasn't spammed, but the other one was. maybe it's a mod issue, too. guess i'll be using pre-luacob builds for a while.

jK

2009-07-03 17:46

developer   ~0003712

Last edited: 2009-07-03 17:47

SetUnitCOBValue is still needed atm.
So it is the only way to access the cob shared unit,team,ally variables. (ca uses those for the windmiles for example)
Also there is still some functionality unavailable for lua (CHANGE_TARGET, BUGGER_OFF, jammer radi).

tvo

2009-07-07 20:58

reporter   ~0003722

It's still available.

Spring.UnitScript.SetUnitCOBValue

tvo

2009-07-07 21:08

reporter   ~0003723

http://springrts.com/phpbb/viewtopic.php?f=12&t=19389&p=361252#p361252

Issue History

Date Modified Username Field Change
2009-06-30 20:10 imbaczek New Issue
2009-06-30 20:51 Kloot Note Added: 0003696
2009-06-30 20:55 imbaczek Note Added: 0003697
2009-07-03 17:46 jK Note Added: 0003712
2009-07-03 17:47 jK Note Edited: 0003712
2009-07-07 20:58 tvo Note Added: 0003722
2009-07-07 20:59 tvo Status new => closed
2009-07-07 20:59 tvo Resolution open => won't fix
2009-07-07 21:08 tvo Note Added: 0003723