Page 1 of 1

1.1.3 Bug with the error report

Posted: Sun Jan 05, 2014 3:40 am
by HousePet
Using this addon: http://te4.org/node/3213
To reproduce, cast Sever Magic at an enemy.

Log file says this:

Code: Select all

[LOG]	Player casts Sever Magic.
stack traceback:
	[C]: in function 'error'
	/engine/interface/ActorTalents.lua:152: in function </engine/interface/ActorTalents.lua:134>
Lua Error: /engine/interface/GameTargeting.lua:118: /engine/interface/ActorTalents.lua:152: /data/damage_types.lua:787: bad argument #1 to 'ceil' (number expected, got nil)
stack traceback:
	[C]: in function 'ceil'
	/data/damage_types.lua:787: in function 'projector'
	/engine/interface/ActorProject.lua:198: in function 'project'
	/data-arcanum/talents/spells/power.lua:129: in function </data-arcanum/talents/spells/power.lua:87>
	[C]: in function 'xpcall'
	/engine/interface/ActorTalents.lua:147: in function </engine/interface/ActorTalents.lua:134>
	At [C]:-1 
	At [C]:-1 error
	At /engine/interface/GameTargeting.lua:118 fct
	At /engine/interface/GameTargeting.lua:124 targetMode
	At /engine/interface/GameTargeting.lua:185 
	At /engine/KeyBind.lua:229 
In game it only showed this:

Code: Select all

Lua Error: /engine/interface/GameTargeting.lua:118: /engine/interface/ActorTalents.lua:152: /data/damage_types.lua:787: bad argument
So firstly, since a lot of players screenshot errors instead of digging them out of the log file, there is a lot of useful information missing. Hopefully the in game reporter is sending the complete error message to DarkGod.

Secondly, /data/damage_types.lua:787 is:

Code: Select all

-- Silence
So the line number for the error is wrong.
It should have reported line 779 as the problem:

Code: Select all

target:setEffect(target.EFF_SILENCED, math.ceil(dam.dur), {apply_power=dam.power_check or src:combatMindpower() * 0.7})

Re: 1.1.3 Bug with the error report

Posted: Sun Jan 05, 2014 5:01 pm
by darkgod
I've tested it as you say, on the current git version which produces the error at line 782, which is the correct line

Re: 1.1.3 Bug with the error report

Posted: Sun Jan 05, 2014 8:28 pm
by Hachem_Muche
I've also noticed this problem (or a similar one, perhaps) as well (though don't have a good example at hand at the moment).

What seems to happen(in both the bug report and in the Lua console, (when using the ctrl-space function to see the function source code) is that it sometimes lists the correct line number but in the wrong file.

So if you overload a function in one addon loaded after a previous one that holds a reference to that function (say in a bindhook call), it will display parts of the last loaded (overloaded) file, but will use the previous instance of the function (before overload) to determine the line numbers to display.

Re: 1.1.3 Bug with the error report

Posted: Mon Jan 06, 2014 1:36 am
by HousePet
darkgod wrote:I've tested it as you say, on the current git version which produces the error at line 782, which is the correct line
I said 1.1.3 not git, you git. :P

Incidently, have you looked into why it doesn't display the full error message in game?