1.1.3 Bug with the error report

Where bugs go to lie down and rest

Moderator: Moderator

Post Reply
Message
Author
HousePet
Perspiring Physicist
Posts: 6215
Joined: Sun Sep 09, 2012 7:43 am

1.1.3 Bug with the error report

#1 Post 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})
My feedback meter decays into coding. Give me feedback and I make mods.

darkgod
Master of Eyal
Posts: 10751
Joined: Wed Jul 24, 2002 9:26 pm
Location: Angolwen
Contact:

Re: 1.1.3 Bug with the error report

#2 Post 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
[tome] joylove: You can't just release an expansion like one would release a Kraken XD
--
[tome] phantomfrettchen: your ability not to tease anyone is simply stunning ;)

Hachem_Muche
Uruivellas
Posts: 744
Joined: Thu Nov 18, 2010 6:42 pm

Re: 1.1.3 Bug with the error report

#3 Post 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.
Author of the Infinite 500 and PlenumTooltip addons, and the joys of Scaling in ToME.

HousePet
Perspiring Physicist
Posts: 6215
Joined: Sun Sep 09, 2012 7:43 am

Re: 1.1.3 Bug with the error report

#4 Post 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?
My feedback meter decays into coding. Give me feedback and I make mods.

Post Reply