Jump to content
  • 0
mawjustin

Crash Map on specific character only (with gdb).

Question

Hi Team,

 

May I ask for assistance regarding this concern.

This is what I got from gdb.

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:16676
16676                           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 required
			break; 
		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:
		{
			const struct TimerData * timer_data = get_timer(md->spawn_timer);
			unsigned int seconds;
			int hours, minutes;

			seconds = (unsigned int)(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; //commented
			break;

 

Edited by mawjustin
Link to comment
Share on other sites

9 answers to this question

Recommended Posts

  • 0

It happened to me when making a save in an MVP respawn map having the SC_BOSSMAPINFO activated, I only eliminated the SC to the stuck character I did not have to remove the lines since, that would make the convex mirror malfunction, I do not know how it happened I tried to replicate it but not achieve the same error.

+1

Link to comment
Share on other sites

  • 0
15 hours ago, darbladerxx said:

It happened to me when making a save in an MVP respawn map having the SC_BOSSMAPINFO activated, I only eliminated the SC to the stuck character I did not have to remove the lines since, that would make the convex mirror malfunction, I do not know how it happened I tried to replicate it but not achieve the same error.

+1

can you give me a guide on how you did it? yeah, my Convex Mirror is not working properly right now, specially with MVP with similar name (LHZ)

Link to comment
Share on other sites

  • 0

I'm having the same issue

Program received signal SIGSEGV, Segmentation fault.
0x0000000000480665 in clif_bossmapinfo ([email protected]=0x4be9350, md=0x0, [email protected]=BOSS_INFO_ALIVE_WITHMSG) at clif.cpp:16864
16864                           WFIFOL(fd,3) = md->bl.x;
Missing separate debuginfos, use: debuginfo-install glibc-2.17-323.el7_9.x86_64 keyutils-libs-1.5.8-3.el7.x86_64 krb5-libs-1.15.1-50.el7.x86_64 libcom_err-1.42.9-19.el7.x86_64 libgcc-4.8.5-44.el7.x86_64 libselinux-2.5-15.el7.x86_64 libstdc++-4.8.5-44.el7.x86_64 mariadb-libs-5.5.68-1.el7.x86_64 openssl-libs-1.0.2k-21.el7_9.x86_64 pcre-8.32-17.el7.x86_64 zlib-1.2.7-19.el7_9.x86_64

After a player use convex mirror the server crashed. When the player join the server the server crash.

Any update?

Link to comment
Share on other sites

  • 0

i have the same problem, other character in one account is totally fine
but when one specific character log-in map-server got crash.
im running debug in visual studio and found this error
maybe somebody can help me?

mapservercrash.JPG

Link to comment
Share on other sites

  • 0
On 6/19/2021 at 2:24 AM, nobodyelse said:

i have the same problem, other character in one account is totally fine
but when one specific character log-in map-server got crash.
im running debug in visual studio and found this error
maybe somebody can help me?

mapservercrash.JPG

I commented that temporarily. and added deletion of SC_BOSSMAPINFO every login.

Link to comment
Share on other sites

  • 0

the md (monster data) is null, because the mob isn't there but the code send it anyway to clif_bossmapinfo, there is 2 way imo to solve this.

  1. search for code which responsible sending clif_bossmapinfo with flag BOSS_INFO_ALIVE_WITHMSG then add check there if md is null don't send it,
  2. or you can put check on the function clif_bossmapinfo on case flag BOSS_INFO_ALIVE_WITHMSG, put condition if md is null do return, so it will be back to wherever it call and not sending this packet.
Edited by Litro Endemic
Link to comment
Share on other sites

  • 0
On 6/21/2021 at 7:46 PM, Litro Endemic said:

the md (monster data) is null, because the mob isn't there but the code send it anyway to clif_bossmapinfo, there is 2 way imo to solve this.

  1. search for code which responsible sending clif_bossmapinfo with flag BOSS_INFO_ALIVE_WITHMSG then add check there if md is null don't send it,
  2. or you can put check on the function clif_bossmapinfo on case flag BOSS_INFO_ALIVE_WITHMSG, put condition if md is null do return, so it will be back to wherever it call and not sending this packet.

i deleted row in sc_data for convex mirror buff it solve the problem. i thought it was the only problem i had
but i still got map-serv crash randomly that the log didn't even show the problem
can anyone help me?

Link to comment
Share on other sites

  • 0
4 hours ago, nobodyelse said:

i deleted row in sc_data for convex mirror buff it solve the problem. i thought it was the only problem i had
but i still got map-serv crash randomly that the log didn't even show the problem
can anyone help me?

I suggest you create a script using OnPCLoginEvent: just to make sure that all will be deleted.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use and Privacy Policy.