Error at clif.c

PunkBuster

New member
Messages
216
Points
0
My server has been crashing randomly. I had trouble setting up GDB, but once I did I got the following report from it:

Program received SIGSEGV, Segmentation fault.0x000000000042b142 in clif_elemental_updatestatus (sd=0x9c53db0, type=05) at clif.c:16351

My clif.c has the following:

void clif_elemental_updatestatus(struct map_session_data *sd, int type) { struct elemental_data *ed; struct status_data *estatus; int fd; if( sd == NULL || (ed = sd->ed) == NULL ) return; fd = sd->fd; estatus = &ed->battle_status; WFIFOHEAD(fd,8); WFIFOW(fd,0) = 0x81e; WFIFOW(fd,2) = type; switch( type ) { case SP_HP: WFIFOL(fd,4) = estatus->hp; break; case SP_MAXHP: WFIFOL(fd,4) = estatus->max_hp; break; case SP_SP: WFIFOL(fd,4) = estatus->sp; break; case SP_MAXSP: WFIFOL(fd,4) = estatus->max_sp; break; } WFIFOSET(fd,8);}
[line 16531 is the one with the "WFIFOHEAD(fd,8);".]

I haven't edited this part of the src, so i've no idea what could be wrong.

 
Last edited by a moderator:
It looks like it's a problem in Hercules and not in any mod you've made... Did you edit anything related to the elemental system? What were you doing in-game when it happened?

 
I haven't edited the elemental system. That request I made to remove the summoning stones, I undid that and still get crashes. As for what's happening in game, I cannot track what happens that does it.

During my Beta Testing, it never happened. When I opened the server and players started doing their things, it started happening.

 
There are other topics that describe sudden map-crashes, but none of the others have debug info, in my opinion these crashes look like something that's wrong in Hercules' core, can you post the call stack? Knowing which part of the src called this function would help pinpointing the real issue

 
Back
Top