Page 1 of 1

Spell Crashing Server

Posted: Thu Sep 03, 2009 8:31 pm
by John Adams
LE, I have a spell crashing the world. In Release mode, it's throwing Got signal 11's all to hell. I threw it in gdb and got this trace:

Code: Select all

   0: 22 00 06 00 33 31 30 30 - 30 34                    | "...310004

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xb3bdeb90 (LWP 28516)]
0x081cac35 in SpellProcess::CastProcessedSpell (this=0xb26126a8,
    spell=0xb2610538) at SpellProcess.cpp:666
666     SpellProcess.cpp: No such file or directory.
        in SpellProcess.cpp
(gdb) bt
#0  0x081cac35 in SpellProcess::CastProcessedSpell (this=0xb26126a8,
    spell=0xb2610538) at SpellProcess.cpp:666
#1  0x081cb7ac in SpellProcess::Process (this=0xb26126a8)
    at SpellProcess.cpp:146
#2  0x08186804 in ZoneServer::Process (this=0xdf579d8) at zoneserver.cpp:872
#3  0x08186b76 in ZoneLoop (tmp=0xdf579d8) at zoneserver.cpp:3742
#4  0x0042a51f in start_thread (arg=0xb3bdeb90) at pthread_create.c:297
#5  0x0038b04e in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:130
Pretty sure this could be a self-induced crash, since I was just playing around with some self speed buffs (Pathfinding).

Here's the script, too:

Code: Select all

--[[
	Script Name	: Buff (Spell Types)
	Script Purpose	: Generic script for buff spells
	Script Author	: John Adams
	Script Date	: 2009.09.03
	Script Note	: Use "String" parameter in spell_data to determine which buff script to run
			: Ex: Index 1: Pathfinding, Index 2: .16 (for 16% speed bonus)
--]]

function cast(Caster, Target, BuffType, BuffMinVal, BuffMaxVal)

	if BuffMaxValue ~= nil and BuffMinVal < BuffMaxVal then
		BuffValue = math.random(BuffMinVal, BuffMaxVal)
	else
		BuffValue = BuffMinVal
	end


	if BuffType == "Pathfinding" then
		NewSpeed = GetSpeed(Caster) * BuffValue
		SetSpeed(Caster, NewSpeed)
	end

end


function remove(Caster, Target, BuffType)

	if BuffType == "Pathfinding" then
		SetSpeed(Caster, 0)
	end

end
In Spell_data, BuffType = "Pathfinding" and BuffMinValue = .16 (16% speed increase).

Work in progress, I know the script is incomplete, but wanted you to see it in case it is the cause of the crash.

Re: Spell Crashing Server

Posted: Thu Sep 03, 2009 9:04 pm
by Scatman
Fixed