Map server crash

When compiling my server, I did:

Code:
make clean
./configure --enable-debug=gdb --disable-lto --enable-sanitize=full
make sql plugins

pc.c: 9909 = pc_eventtimer - npc->event(sd,p,0);

 
you have very old hercules? or heavy modifief?

i asked some times already what hercules commit you using. or if you not using git, say atleast date of hercules sources.

or better show whole function pc_eventtimer

 
Yup it's quite modified. My Hercules is up to date, as in I have merged current master with my source.
Src: 5118dceb5c1c5cad7d0c06137a9b1eee2acbe4e8
Scripts: 20f045c8de9f5fb6dde5bb8c8da6306facf2517c

Code:
static int pc_eventtimer(int tid, int64 tick, int id, intptr_t data)
{
	struct map_session_data *sd=map->id2sd(id);
	char *p = (char *)data;
	int i;
	if(sd==NULL)
		return 0;

	ARR_FIND( 0, MAX_EVENTTIMER, i, sd->eventtimer[i] == tid );
	if( i < MAX_EVENTTIMER )
	{
		sd->eventtimer[i] = INVALID_TIMER;
		sd->eventcount--;
		npc->event(sd,p,0); // pc.c: 9909 here
	}
	else
		ShowError("pc_eventtimer: no such event timer\n");

	if (p) aFree(p);
	return 0;
}
 
probably you show wrong function, or you running other server binary, or may be some corruption.

because from pc_eventtimer called npc->event.

and sd in pc_eventtimer is NULL, but because here check for NULL, it cant call npc->event..

another thing try disable memory manager, because it hiding memory errors.

Code:
make clean
./configure --enable-debug=gdb --disable-lto --enable-manager=no --enable-sanitize=full
make sql plugins
 
Thank you. Seems there were some errors in two buildins used in my scripts.

1. npcshopdelitem(), which was breaking every time it was used.
2. setmapflag(), breaking sometimes when setting 'mf_zone'.

I will update again if further issues persist.

 
I received this crashlog. I don't know what caused it, some plugins were referenced: https://pastebin.com/W2wXWDrg

Tried checking over all those plugins for null pointer. Disabled afk, unit, status, trade and itembonus, then it happened later, referencing again the ones I didn't disable.

 
Last edited by a moderator:
look like you have disabled sanitize flags and enabled memory manager.

enable sanitize and disable memory manager and probably you will get better crash. and please fix gcc, last crash report from sanitize was almost useless, because missing libs or packages. was no correct stack and additional info.

 
Last edited by a moderator:
about where it crashed. look like double free for some data allocated in auth code. probably plugins affecting it?

 
I haven't been able to enable sanitize and test again, but something peculiar happened. I got a few of these messages, then everyone got booted from the map server.

Code:
(08/27/2018 12:16:09) [ Error ] : Memory manager: freed-data is changed. (freed in achievement.c line 79)
[Aug/27 12:16:26][Info]: Character 'Some Character' logged off.
[Aug/27 12:16:26][Info]: Character 'Some Character 2' logged off.
[Aug/27 12:16:26][Info]: Character 'Some Character 3' logged off.
I just thought it was weird and maybe too coincidental? No crash, everyone was able to login a few moments later.

Also I have had a few of these floating around:

Code:
(08/16/2018 21:08:07) [ Error ] : --- failed assertion --------------------------------------------
(08/16/2018 21:08:07) [ Error ] : achievement.c:727: 'amount != 0' in function `achievement_validate_zeny'
(08/16/2018 21:08:07) [ Error ] : /home/user/Hercules/./map-server() [0x62f233]
(08/16/2018 21:08:07) [ Error ] : /home/user/Hercules/./map-server() [0x408ea3]
(08/16/2018 21:08:07) [ Error ] : /home/user/Hercules/./map-server() [0x521069]
(08/16/2018 21:08:07) [ Error ] : /home/user/Hercules/./map-server() [0x50c661]
(08/16/2018 21:08:07) [ Error ] : /home/user/Hercules/./map-server() [0x46ac9a]
(08/16/2018 21:08:07) [ Error ] : /home/user/Hercules/./map-server() [0x4ad21f]
(08/16/2018 21:08:07) [ Error ] : /home/user/Hercules/./map-server() [0x63b1de]
(08/16/2018 21:08:07) [ Error ] : /home/user/Hercules/./map-server(main+0x2ca) [0x4083ea]
(08/16/2018 21:08:07) [ Error ] : /lib64/libc.so.6(__libc_start_main+0xf5) [0x7ffff62c3445]
(08/16/2018 21:08:07) [ Error ] : /home/user/Hercules/./map-server() [0x40859b]
(08/16/2018 21:08:07) [ Error ] : --- end failed assertion ----------------------------------------
Using last months release (I believe v2018.07.29+2) with no edits or plugins related to acheivements.

 
Last edited by a moderator:
memory manager show memory corruption. but not show from where and why

this mean better disable memory manager and use gdb

atleast it may be crash if corruption happend and show where it happend

 
about assert in achievement it was fixed in hercules already

 
Back
Top