Page 1 of 1

Freeze while running in high peak

Posted: Sat Oct 30, 2010 4:24 pm
by Susramanian
The game went unresponsive on me mid-run. Had to force quit out. Here's the last bit of stdout:

[LOG] Sunwol is no longer attuned.
removeTempVal resists table: 17CD4770 :=: 25668
delTmpValTable resists 3 15.358316235672
removeTempVal max_life 237.57 :=: 25662
delTmpVal max_life 237.57
removeTempVal life_regen 125.4 :=: 25663
delTmpVal life_regen 125.4
removeTempVal stamina_regen 6.72 :=: 25664
delTmpVal stamina_regen 6.72
[TALENT WEAPON MULT] 6.5 0.1 0.45 0 0.4990613987847
[TALENT WEAPON MULT] 6.5 0.1 0.45 0 0.4990613987847
[LOG] There is an item here: #FFFFFF##UID:1342896:0#cured leather armour (2 def, 4 armor)#LAST#
[TALENT WEAPON MULT] 6.5 0.1 0.45 0 0.4990613987847
[TALENT WEAPON MULT] 6.5 0.1 0.45 0 0.4990613987847
[TALENT WEAPON MULT] 6.5 0.1 0.45 0 0.4990613987847
[TALENT WEAPON MULT] 6.5 0.1 0.45 0 0.4990613987847
[TALENT WEAPON MULT] 6.5 0.1 0.45 0 0.4990613987847
[LOG] There is an item here: #FFFFFF##UID:1343056:0#mithril greatsword (61.5-98.4 power, 4 apr)#LAST#
[TALENT WEAPON MULT] 6.5 0.1 0.45 0 0.4990613987847
[TALENT WEAPON MULT] 6.5 0.1 0.45 0 0.4990613987847
[TALENT WEAPON MULT] 6.5 0.1 0.45 0 0.4990613987847
[TALENT WEAPON MULT] 6.5 0.1 0.45 0 0.4990613987847
[TALENT WEAPON MULT] 6.5 0.1 0.45 0 0.4990613987847
[TALENT WEAPON MULT] 6.5 0.1 0.45 0 0.4990613987847
[TALENT WEAPON MULT] 6.5 0.1 0.45 0 0.4990613987847
[TALENT WEAPON MULT] 6.5 0.1 0.45 0 0.4990613987847
[TALENT WEAPON MULT] 6.5 0.1 0.45 0 0.4990613987847
[TALENT WEAPON MULT] 6.5 0.1 0.45 0 0.4990613987847
[TALENT WEAPON MULT] 6.5 0.1 0.45 0 0.4990613987847
[TALENT WEAPON MULT] 6.5 0.1 0.45 0 0.4990613987847
[TALENT WEAPON MULT] 6.5 0.1 0.45 0 0.4990613987847
[LOG] Ran for 5 turns (stop reason: terrain ahead blocks).
[TALENT WEAPON MULT] 6.5 0.1 0.45 0 0.4990613987847
[TALENT WEAPON MULT] 6.5 0.1 0.45 0 0.4990613987847
[TALENT WEAPON MULT] 6.5 0.1 0.45 0 0.4990613987847
[TALENT WEAPON MULT] 6.5 0.1 0.45 0 0.4990613987847
301 frames in 10 seconds = 30.1 FPS
[TALENT WEAPON MULT] 6.5 0.1 0.45 0 0.4990613987847
[TALENT WEAPON MULT] 6.5 0.1 0.45 0 0.4990613987847
[TALENT WEAPON MULT] 6.5 0.1 0.45 0 0.4990613987847
[TALENT WEAPON MULT] 6.5 0.1 0.45 0 0.4990613987847
[TALENT WEAPON MULT] 6.5 0.1 0.45 0 0.4990613987847
[LOG] #00ff00#Talent King's Gift is ready to use.
[TALENT WEAPON MULT] 6.5 0.1 0.45 0 0.4990613987847
[TALENT WEAPON MULT] 6.5 0.1 0.45 0 0.4990613987847
[TALENT WEAPON MULT] 6.5 0.1 0.45 0 0.4990613987847
[TALENT WEAPON MULT] 6.5 0.1 0.45 0 0.4990613987847
[TALENT WEAPON MULT] 6.5 0.1 0.45 0 0.4990613987847
[LOG] Ran for 6 turns (stop reason: terrain change on left side).
[TALENT WEAPON MULT] 6.5 0.1 0.45 0 0.4990613987847
[TALENT WEAPON MULT] 6.5 0.1 0.45 0 0.4990613987847
[TALENT WEAPON MULT] 6.5 0.1 0.45 0 0.4990613987847
[TALENT WEAPON MULT] 6.5 0.1 0.45 0 0.4990613987847
[TALENT WEAPON MULT] 6.5 0.1 0.45 0 0.4990613987847
[TALENT WEAPON MULT] 6.5 0.1 0.45 0 0.4990613987847
[TALENT WEAPON MULT] 6.5 0.1 0.45 0 0.4990613987847
[TALENT WEAPON MULT] 6.5 0.1 0.45 0 0.4990613987847
[TALENT WEAPON MULT] 6.5 0.1 0.45 0 0.4990613987847
[TALENT WEAPON MULT] 6.5 0.1 0.45 0 0.4990613987847
[TALENT WEAPON MULT] 6.5 0.1 0.45 0 0.4990613987847
[TALENT WEAPON MULT] 6.5 0.1 0.45 0 0.4990613987847
[TALENT WEAPON MULT] 6.5 0.1 0.45 0 0.4990613987847
removeTempVal mana_regen -2.4 :

Re: Freeze while running in high peak

Posted: Sat Oct 30, 2010 6:11 pm
by Leffe
Susramanian wrote:The game went unresponsive on me mid-run. Had to force quit out. Here's the last bit of stdout:

removeTempVal mana_regen -2.4 :=:
I've gotten this one in Tol Falas quite a few times.

Re: Freeze while running in high peak

Posted: Sat Oct 30, 2010 7:53 pm
by yufra
Yes, this is a funky and rare bug. I believe it has something to do with wights and Thunderstorm, but I cannot be sure.

EDIT: Specifically Emperor Wights, with Thunderstorm at talent level 2 which gives mana_regen -2.4.

Re: Freeze while running in high peak

Posted: Sat Oct 30, 2010 8:05 pm
by Leffe
By interrupting (quite tricky, because you have to hold down ^C, but you can't hold it for too long or it will exit) the execution, this might be where the code is hanging:

tome/class/NPC.lua:

Code: Select all

    while self:enoughEnergy() and not self.dead do

Re: Freeze while running in high peak

Posted: Sun Oct 31, 2010 3:33 am
by yufra
Hey, I just noticed something... the log output shows nothing after the ":=:". This is where the temporary value id should be, and I don't understand how oldval (the -2.4) gets set if the temporary value id doesn't exist. Is the bug in the print statement? Another clue, (or a red herring, how do we tell?).

Re: Freeze while running in high peak

Posted: Sun Oct 31, 2010 9:19 am
by Leffe
yufra wrote:Hey, I just noticed something... the log output shows nothing after the ":=:". This is where the temporary value id should be, and I don't understand how oldval (the -2.4) gets set if the temporary value id doesn't exist. Is the bug in the print statement? Another clue, (or a red herring, how do we tell?).
This is what I get:

Code: Select all

removeTempVal   mana_regen      -2.4     :=:    1
delTmpVal       mana_regen      -2.4

Re: Freeze while running in high peak

Posted: Mon Nov 01, 2010 2:40 am
by darkgod
Probably the output not being flushed.

Re: Freeze while running in high peak

Posted: Mon Nov 01, 2010 2:51 am
by darkgod
I am not sure yet how this happens but I put a safety net in place to prevent it.
Thanks for the help

Re: Freeze while running in high peak

Posted: Mon Nov 01, 2010 5:27 am
by yufra
Does the safety net include some feedback in the stdout? That might help diagnosing the problem.

Re: Freeze while running in high peak

Posted: Mon Nov 01, 2010 1:17 pm
by darkgod
I could not find anything useful to ouput :/

Re: Freeze while running in high peak

Posted: Sat Nov 06, 2010 5:17 pm
by PowerWyrm
What's the fix for this? Due to this bug I simply can't play any character in beta 13 past Tol Falas...

Re: Freeze while running in high peak

Posted: Sat Nov 06, 2010 5:20 pm
by darkgod
Replace the act() method in game/modules/tome/class/NPC.lua with this one:

Code: Select all

function _M:act()
	while self:enoughEnergy() and not self.dead do
		-- Do basic actor stuff
		if not mod.class.Actor.act(self) then return end
		local old_energy = self.energy.value

		-- Compute FOV, if needed
		self:doFOV()

		-- Let the AI think .... beware of Shub !
		-- If AI did nothing, use energy anyway
		self:doAI()

		if self.emote_random and rng.percent(self.emote_random.chance) then
			self:doEmote(rng.table(self.emote_random))
		end

		if not self.energy.used then self:useEnergy() end
		if old_energy == self.energy.value then break end -- Prevent infinite loops
	end
end