• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

TFS 0.X Crash

Solution
@pepsiman
If it's only there, it should fix that bug.

There is also other possibility: Some movement LUA script remove 'fire field' in 'onAdd' event.

Other interesting thing:
MagicField::eek:nStepInField (this=0x7fffe9e58680, creature=0x0)
creature is 0x0 which means NULL
Rest of 'MagicField::eek:nStepInField(Creature* creature)' code ( mattyx14/otxserver ) expects that creature exists!
It does not check, if creature is null:
PHP:
'if (!creature) return;'
Which is obvious.. question is: why does it execute 'onStepIn' when there is no creature?!

When you report something about OTX, you need to tell if it's 2 or 3 and also protocol, because there are few folders with sources...
From gdb:
- monster cast spell that creates item 1492 (fire field?)

Then it tries to execute 'add magic field to tile', but somehow that item does not have 'tile' (wtf) or that 'tile' is NOT 'on map' (also wtf).

If you still got 'core' file and TeamViewer I can try to find out tile position/monster name, but it's possible only with access to console.
 
Hi bro, thanks for answer
I don't have core.pid, How can i generate it?

I use this script to generate crashlog (done by Mkalo)
#!gdb
import gdb
from datetime import datetime

logfile = "crashlog.txt"
tfsbin = "theotxserver"

def crash(event):
if (isinstance(event, gdb.SignalEvent) and not event.stop_signal == "SIGINT"):
file = open(logfile, "a+")
file.write("---------------------------------------------------\nSignal caught: " + event.stop_signal + " in " + str(datetime.now().strftime("%d/%m - %H:%M:%S")) + "\n")
file.close()
gdb.execute("set logging file " + logfile)
gdb.execute("set logging on")
gdb.execute("thread apply all bt full")
gdb.execute("set logging redirect on")
gdb.execute("set logging off")
gdb.execute("kill")
gdb.execute("quit")

gdb.events.stop.connect(crash)
gdb.execute("file " + tfsbin)
gdb.execute("set pagination off")
gdb.execute("set confirm off")
gdb.execute("run")
gdb.execute("quit")


About what you said, this is what i think:
> I get a random position from two positions
> I create a monster on that random position
> That monster probably is created nearby a blank space (no tile there), probably it is on water
> Monster tries to attack a player
> When monster cast that spell it tries to create the field on that blank space
> Server crash

maybe a tile check on Combat::combatTileEffects it would be enough?
 
@pepsiman
If it's only there, it should fix that bug.

There is also other possibility: Some movement LUA script remove 'fire field' in 'onAdd' event.

Other interesting thing:
MagicField::eek:nStepInField (this=0x7fffe9e58680, creature=0x0)
creature is 0x0 which means NULL
Rest of 'MagicField::eek:nStepInField(Creature* creature)' code ( mattyx14/otxserver ) expects that creature exists!
It does not check, if creature is null:
PHP:
'if (!creature) return;'
Which is obvious.. question is: why does it execute 'onStepIn' when there is no creature?!

When you report something about OTX, you need to tell if it's 2 or 3 and also protocol, because there are few folders with sources. In 'gdb' are some line numbers, but I got no idea in which protocol folder I need to check sources.
 
Last edited:
Solution
@Gesior.pl Yeah bro, i forgot to mention protocol it was OTX2 protocol 772. However this can be applied on all protocols. Thank you very much bro, so the required code to fix this:

after
Code:
void MagicField::onStepInField(Creature* creature)

add
Code:
 if (!creature) return;

also

after
Code:
void Combat::combatTileEffects(const SpectatorVec& list, Creature* caster, Tile* tile, const CombatParams& params)

add
Code:
if (!tile) return;

@MartyX take a look of this bro
 
Back
Top