Discussion in 'Support' started by pepsiman, Aug 12, 2018.
Hi, i had a crash, could someone help me please?
This is the gdb report hastebin
I'm using OTX2
Do not use otx Better use othire
@Gesior.pl sorry for tag you, can you take a look at log please?
- 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)
from datetime import datetime
logfile = "crashlog.txt"
tfsbin = "theotxserver"
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")
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("file " + tfsbin)
gdb.execute("set pagination off")
gdb.execute("set confirm off")
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?
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:
creature is 0x0 which means NULL
Rest of 'MagicField:nStepInField(Creature* creature)' code ( mattyx14/otxserver ) expects that creature exists!
It does not check, if creature is null:
'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.
@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:
void MagicField::onStepInField(Creature* creature)
if (!creature) return;
void Combat::combatTileEffects(const SpectatorVec& list, Creature* caster, Tile* tile, const CombatParams& params)
if (!tile) return;
@MartyX take a look of this bro