Server received crash signal

ThyroDree

New member
Messages
556
Points
0
Location
Philippines
Github
bosxkate23
Emulator
Running on Linux Centos 7:

Hosted from BuyVM

Error: Server received crash signal! Attempting to save all online characters!

Anyone knows how to fix this? this error shows up every 1~2 hours the server is running

 
for fix issue need first know what is isue.

You now showed stack or any info except crash.

run server under gdb and show call stack after it crashed.

 
Which revision are you using?

I don't see that line anywhere nearby, modded? probably sd is null.

 
Which revision are you using?

I don't see that line anywhere nearby, modded? probably sd is null.
On the line 2131 on battle.c

                case SN_SHARPSHOOTING:
                case MA_SHARPSHOOTING:
                    skillratio += 100 + 50 * skill_lv;

                    if( sd->sc.data[SC_SOULLINK] && sd->sc.data[SC_SOULLINK]->val2 == SL_HUNTER)
                    skillratio *= 1.15;
                    break;

 
On the line 2131 on battle.c

                case SN_SHARPSHOOTING:
                case MA_SHARPSHOOTING:
                    skillratio += 100 + 50 * skill_lv;

                    if( sd->sc.data[SC_SOULLINK] && sd->sc.data[SC_SOULLINK]->val2 == SL_HUNTER)
                    skillratio *= 1.15;
                    break;
case SN_SHARPSHOOTING:
case MA_SHARPSHOOTING:
    if (sd->sc.data[SC_SOULLINK] && sd->sc.data[SC_SOULLINK]->val2 == SL_HUNTER)
        skillratio *= 1.15;
   else
        skillratio += 100 + 50 * skill_lv;
        break;

 
You need to check 'sd' is not NULL first. so like

Code:
 if (sd != NULL && sd->sc.data[SC_SOULLINK] && sd->sc.data[SC_SOULLINK]->val2 == SL_HUNTER)

If you have edited other source code, you will need to check it for all sorts of stuff isn't using null pointer. E.g. sc != NULL, tsd != NULL, etc.

 
Why not use sc(already defined and assigned in that function)? it would check with any other unit having status instead of just players.

Code:
if (sc != NULL && sc->data[SC_SOULLINK] != NULL && sc->data[SC_SOULLINK]->val2 == SL_HUNTER)
 
Last edited by a moderator:
Back
Top