Program received signal SIGSEGV,Segmentation fault.0x00005555555ec50d in clif_bossmapinfo (sd=[email protected]=0x55555a971e30, md=0x0, flag=[email protected]=BOSS_INFO_ALIVE_WITHMSG) at clif.cpp:1667616676 WFIFOL(fd,3)= md->bl.x;
This is the portion of my clif.cpp : 16676
/// Convex Mirror (ZC_BOSS_INFO)./// 0293 <infoType>.B <x>.L <y>.L <minHours>.W <minMinutes>.W <maxHours>.W <maxMinutes>.W <monster name>.51B/// infoType:/// BOSS_INFO_NOT = No boss on this map./// BOSS_INFO_ALIVE = Boss is alive (position update)./// BOSS_INFO_ALIVE_WITHMSG = Boss is alive (initial announce)./// BOSS_INFO_DEAD = Boss is dead.void clif_bossmapinfo(struct map_session_data *sd,struct mob_data *md,enum e_bossmap_info flag){int fd = sd->fd;
WFIFOHEAD(fd,70);
memset(WFIFOP(fd,0),0,70);
WFIFOW(fd,0)=0x293;switch(flag){case BOSS_INFO_NOT:
WFIFOB(fd,2)= BOSS_INFO_NOT;// No data requiredbreak;case BOSS_INFO_ALIVE:
WFIFOB(fd,2)= BOSS_INFO_ALIVE;// Update X/Y
WFIFOL(fd,3)= md->bl.x;
WFIFOL(fd,7)= md->bl.y;break;case BOSS_INFO_ALIVE_WITHMSG:
WFIFOB(fd,2)= BOSS_INFO_ALIVE_WITHMSG;// Current X/Y
WFIFOL(fd,3)= md->bl.x;
WFIFOL(fd,7)= md->bl.y;break;case BOSS_INFO_DEAD:{conststructTimerData* timer_data = get_timer(md->spawn_timer);unsignedint seconds;int hours, minutes;
seconds =(unsignedint)(DIFF_TICK(timer_data->tick, gettick())/1000+60);
hours = seconds /(60*60);
seconds = seconds -(60*60* hours);
minutes = seconds /60;
WFIFOB(fd,2)= BOSS_INFO_DEAD;// Add respawn info
WFIFOW(fd,11)= hours;// Hours
WFIFOW(fd,13)= minutes;// Minutes}break;}if(md != NULL)
safestrncpy(WFIFOCP(fd,19), md->db->jname, NAME_LENGTH);
WFIFOSET(fd,70);}
Only his character, other characters in his account is not causing this error.
Is there a way to fix this? everytime he logs in that specific character of his, the mapserver crashes.
Thank you.
EDIT:
I managed to find a workaround, but I'm not sure if this really is the solution.
case BOSS_INFO_ALIVE_WITHMSG:
WFIFOB(fd,2)= BOSS_INFO_ALIVE_WITHMSG;// Current X/Y//WFIFOL(fd,3) = md->bl.x; //commented//WFIFOL(fd,7) = md->bl.y; //commentedbreak;
Hi Team,
May I ask for assistance regarding this concern.
This is what I got from gdb.
This is the portion of my clif.cpp : 16676
Only his character, other characters in his account is not causing this error.
Is there a way to fix this? everytime he logs in that specific character of his, the mapserver crashes.
Thank you.
EDIT:
I managed to find a workaround, but I'm not sure if this really is the solution.
Edited by mawjustinLink to comment
Share on other sites