Issue information

Issue ID
#6947
Status
Invalid
Severity
None
Started
Hercules Elf Bot
Nov 29, 2012 17:57
Last Post
Hercules Elf Bot
Nov 29, 2012 22:52
Confirmation
Yes (0)
No (1)

Hercules Elf Bot - Nov 29, 2012 17:57

Originally posted by [b]Nezd[/b]
If homunculus kill MVP - map server will crash instantly. Any revision.

Hercules Elf Bot - Nov 29, 2012 18:29

Originally posted by [b]Brian[/b]
I thought this was already fixed in [rev=12308] ([url="http://www.eathena.ws/board/index.php?autocom=bugtracker&showbug=1114"]bugreport:1114[/url]).

Can you capture a core dump, then use GDB and post the output of 'bt full' ?
so we can see if it's the same thing or a different issue.

This post has been edited by Brian on Nov 29, 2012 18:31

Hercules Elf Bot - Nov 29, 2012 21:10

Originally posted by [b]mkbu95[/b]
Can't reproduce on 2012-04-10

Hercules Elf Bot - Nov 29, 2012 21:43

Originally posted by [b]Nezd[/b]
Big apologize, all working normal, it's my mistake. I use edit mob.c. Sorry. /panic

But i can tell my problem /no1

I duplicate src part and make some custom:

[CODEBOX]if(mvp_sd &amp;&amp; md->db->mexp <= 999 &amp;&amp; !md->special_state.ai)
{
int log_mvp[2] = {0};
int j;
unsigned int mexp;
struct item item;
double exp;

//mapflag: noexp check [Lorky]
if (map[m].flag.nobaseexp || type&amp;2)
exp =1;
else {
exp = md->db->mexp;
if (count > 1)
exp += exp*(battle_config.exp_bonus_attacker*(count-1))/100.; //[Gengar]
}

mexp = (unsigned int)cap_value(exp, 1, UINT_MAX);
clif_mvp_effect(mvp_sd);
clif_mvp_exp(mvp_sd,mexp);
pc_gainexp(mvp_sd, &amp;md->bl, mexp,0, false);
log_mvp[1] = mexp;
if(map[m].flag.nomvploot || type&amp;1)
; //No drops.
else
for(j=0;j<3;j++)
{
i = rand() % 3;

if(md->db->mvpitem[i].nameid <= 0)
continue;
if(!itemdb_exists(md->db->mvpitem[i].nameid))
continue;

temp = md->db->mvpitem[i].p;
if(temp <= 0 &amp;&amp; !battle_config.drop_rate0item)
temp = 1;
if(temp <= rand()%10000+1) //if ==0, then it doesn't drop
continue;
memset(&amp;item,0,sizeof(item));
item.nameid=md->db->mvpitem[i].nameid;
item.identify= itemdb_isidentified(item.nameid);
clif_mvp_item(mvp_sd,item.nameid);
log_mvp[0] = item.nameid;

//A Rare MVP Drop Global Announce by Lupus
if(temp<=battle_config.rare_drop_announce) {
struct item_data *i_data;
char message[128];
i_data = itemdb_exists(item.nameid);
sprintf (message, msg_txt(541), mvp_sd->status.name, md->name, i_data->jname, temp/100.);
//MSG: "'%s' won %s's %s (chance: %0.02f%%)"
intif_broadcast(message,strlen(message)+1,0);
}
if((temp = pc_additem(mvp_sd,&amp;item,1)) != 0) {
clif_additem(mvp_sd,0,0,temp);
map_addflooritem(&amp;item,1,mvp_sd->bl.m,mvp_sd->bl.x,mvp_sd->bl.y,mvp_sd->status.char_id,(second_sd?second_sd->status.char_id:0),(third_sd?third_sd->status.char_id:0),1);
}

//Logs items, MVP prizes [Lupus]
log_pick(&amp;md->bl, LOG_TYPE_PICKDROP_MONSTER, item.nameid, -1, NULL);
if (!temp)
log_pick(&amp;mvp_sd->bl, LOG_TYPE_PICKDROP_PLAYER, item.nameid, 1, NULL);
break;
}
log_mvpdrop(mvp_sd, md->class_, log_mvp);
}

if(mvp_sd &amp;&amp; md->db->mexp >= 1000 &amp;&amp; !md->special_state.ai)
{
int log_mvp[2] = {0};
int j;
unsigned int mexp;
struct item item;
double exp;

//mapflag: noexp check [Lorky]
if (map[m].flag.nobaseexp || type&amp;2)
exp =1;
else {
exp = md->db->mexp;
if (count > 1)
exp += exp*(battle_config.exp_bonus_attacker*(count-1))/100.; //[Gengar]
}

mexp = (unsigned int)cap_value(exp, 1, UINT_MAX);
clif_boss_effect(mvp_sd);
clif_soundeffectall(&amp;sd->bl, "youkillboss.wav", 0, AREA);
clif_mvp_exp(mvp_sd,mexp);
pc_gainexp(mvp_sd, &amp;md->bl, mexp,0, false);
log_mvp[1] = mexp;
if(map[m].flag.nomvploot || type&amp;1)
; //No drops.
else
for(j=0;j<3;j++)
{
i = rand() % 3;

if(md->db->mvpitem[i].nameid <= 0)
continue;
if(!itemdb_exists(md->db->mvpitem[i].nameid))
continue;

temp = md->db->mvpitem[i].p;
if(temp <= 0 &amp;&amp; !battle_config.drop_rate0item)
temp = 1;
if(temp <= rand()%10000+1) //if ==0, then it doesn't drop
continue;
memset(&amp;item,0,sizeof(item));
item.nameid=md->db->mvpitem[i].nameid;
item.identify= itemdb_isidentified(item.nameid);
clif_mvp_item(mvp_sd,item.nameid);
log_mvp[0] = item.nameid;

//A Rare MVP Drop Global Announce by Lupus
if(temp<=battle_config.rare_drop_announce) {
struct item_data *i_data;
char message[128];
i_data = itemdb_exists(item.nameid);
sprintf (message, msg_txt(541), mvp_sd->status.name, md->name, i_data->jname, temp/100.);
//MSG: "'%s' won %s's %s (chance: %0.02f%%)"
intif_broadcast(message,strlen(message)+1,0);
}
if((temp = pc_additem(mvp_sd,&amp;item,1)) != 0) {
clif_additem(mvp_sd,0,0,temp);
map_addflooritem(&amp;item,1,mvp_sd->bl.m,mvp_sd->bl.x,mvp_sd->bl.y,mvp_sd->status.char_id,(second_sd?second_sd->status.char_id:0),(third_sd?third_sd->status.char_id:0),1);
}

//Logs items, MVP prizes [Lupus]
log_pick(&amp;md->bl, LOG_TYPE_PICKDROP_MONSTER, item.nameid, -1, NULL);
if (!temp)
log_pick(&amp;mvp_sd->bl, LOG_TYPE_PICKDROP_PLAYER, item.nameid, 1, NULL);
break;
}
log_mvpdrop(mvp_sd, md->class_, log_mvp);
}
[/CODEBOX]

as you can see my crash comes from this part:

[CODE]
clif_soundeffectall(&amp;sd->bl, "youkillboss.wav", 0, AREA);
[/CODE]

if i dont use this sound, all OK.

If use ->>>> crash.

Soo... sorry for crap issue. If somebody can help fix this i thanks 100500 times. /??

This post has been edited by Brian on Nov 30, 2012 5:39

Hercules Elf Bot - Nov 29, 2012 22:52

Originally posted by [b]MarkZD[/b]
Put a check to see if it's different than BL_PC type before that, so pass master_id to the function.

If you need further help, ask on support forum.

This post has been edited by MarkZD on Nov 29, 2012 23:06