TFS 0.X Crash

Discussion in 'Support' started by pepsiman, Aug 12, 2018.

  1. pepsiman

    pepsiman ---

    Joined:
    Nov 17, 2017
    Messages:
    67
    Likes Received:
    22
    Best Answers:
    4
    Hi, i had a crash, could someone help me please?
    This is the gdb report hastebin
    I'm using OTX2
     
  2. Best Answer:
    Post #7 by Gesior.pl, Aug 14, 2018
  3. pepsiman

    pepsiman ---

    Joined:
    Nov 17, 2017
    Messages:
    67
    Likes Received:
    22
    Best Answers:
    4
  4. Felipe93

    Felipe93 Ghost Member

    Joined:
    Mar 21, 2015
    Messages:
    1,062
    Likes Received:
    142
    Best Answers:
    5
    Do not use otx Better use othire
     
    CipsoftStinks, pepsiman and MikeOT like this.
  5. pepsiman

    pepsiman ---

    Joined:
    Nov 17, 2017
    Messages:
    67
    Likes Received:
    22
    Best Answers:
    4
    @Gesior.pl sorry for tag you, can you take a look at log please?
     
  6. Gesior.pl

    Gesior.pl Mega Noob&LOL 2012 Premium User

    Joined:
    Sep 18, 2007
    Messages:
    1,920
    Likes Received:
    821
    Best Answers:
    11
    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.
     
    pepsiman likes this.
  7. pepsiman

    pepsiman ---

    Joined:
    Nov 17, 2017
    Messages:
    67
    Likes Received:
    22
    Best Answers:
    4
    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?
     
  8. Gesior.pl

    Gesior.pl Mega Noob&LOL 2012 Premium User

    Joined:
    Sep 18, 2007
    Messages:
    1,920
    Likes Received:
    821
    Best Answers:
    11
    Best Answer
    @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:
    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:
    1. '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: Aug 14, 2018
    pepsiman likes this.
  9. pepsiman

    pepsiman ---

    Joined:
    Nov 17, 2017
    Messages:
    67
    Likes Received:
    22
    Best Answers:
    4
    @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 (Text):
    1. void MagicField::onStepInField(Creature* creature)
    add
    Code (Text):
    1.  if (!creature) return;
    also

    after
    Code (Text):
    1. void Combat::combatTileEffects(const SpectatorVec& list, Creature* caster, Tile* tile, const CombatParams& params)
    add
    Code (Text):
    1. if (!tile) return;
    @MartyX take a look of this bro
     
    MartyX likes this.

Share This Page

Loading...