View Issue Details

IDProjectCategoryView StatusLast Update
0003992Spring engineGeneralpublic2013-09-10 01:18
Reportersilentwings Assigned ToKloot  
PrioritynormalSeveritymajorReproducibilityN/A
Status closedResolutionno change required 
Product Version94.1.1+git 
Summary0003992: lua error with gadget handler (-1121)
DescriptionI did the update described in http://springrts.com/phpbb/viewtopic.php?f=14&t=27777#p547251 and afterwards I'm still getting the error

[f=0000000] Error: LuaRules::RunCallIn: error = 2, AddConsoleLine, [string "LuaRules/gadgets.lua"]:517: attempt to call upvalue 'selffunc' (a nil value)

spammed to the infolog (using local ba-svn with 94.1.1-1121). I also tried using the gadget handler from basecontent and got the same error.

I guess what's happened is that the changes to CALLIN_LIST are having trouble with registering new gadget actions, but I don't get a stack trace (just that one line repeated over and over) so I don't know what's responsible.
TagsNo tags attached.
Checked infolog.txt for Errors

Activities

Kloot

2013-09-09 22:55

developer   ~0011560

AFAICS: gadgets/cmd_idle_players.lua declares a gadget:AddConsoleLine but this isn't implemented by gadgets.lua (neither BA's nor basecontent's) so selffunc == nil in :UpdateCallIn.

silentwings

2013-09-09 23:20

reporter   ~0011561

Last edited: 2013-09-10 00:54

Yes you're right - it doesn't exist in our old gadget handler either so I can only assume that this is a bug that was there already but didn't used to cause an error (just AddConsoleLine was never called!).

Curiously though, AddConsoleLine does exist on the wiki in http://springrts.com/wiki/LuaCallinReturn.

edit: and in https://github.com/spring/spring/blob/fa6b5a34613715801c31bbe2a708551d6b25c7bb/cont/base/springcontent/LuaGadgets/callins.lua, etc

Kloot

2013-09-10 00:54

developer   ~0011562

Yeah, the base gadget handler is missing a number of callin bodies, specifically those marked "FIXME: not implemented" in https://github.com/spring/spring/blob/develop/cont/base/springcontent/LuaGadgets/callins.lua and this now triggers warnings when a gadget declares one of them.

silentwings

2013-09-10 01:11

reporter   ~0011563

Last edited: 2013-09-10 01:12

I updated the wiki to match. Didn't add any new callins to wiki, just marked the ones already there that were not yet implemented. I'll comment out the call from cm_idle_players & feel free to close this ticket.

Kloot

2013-09-10 01:18

developer   ~0011565

kk

Issue History

Date Modified Username Field Change
2013-09-09 21:59 silentwings New Issue
2013-09-09 22:55 Kloot Note Added: 0011560
2013-09-09 23:20 silentwings Note Added: 0011561
2013-09-09 23:27 silentwings Note Edited: 0011561
2013-09-09 23:28 silentwings Note Edited: 0011561
2013-09-09 23:38 silentwings Note Edited: 0011561
2013-09-10 00:54 silentwings Note Edited: 0011561
2013-09-10 00:54 Kloot Note Added: 0011562
2013-09-10 01:11 silentwings Note Added: 0011563
2013-09-10 01:12 silentwings Note Edited: 0011563
2013-09-10 01:18 Kloot Note Added: 0011565
2013-09-10 01:18 Kloot Status new => closed
2013-09-10 01:18 Kloot Assigned To => Kloot
2013-09-10 01:18 Kloot Resolution open => no change required