Jump to content

  •  

Bug Tracker Migration

June 3rd
Good news everyone! The staff has decided that it is time to slowly kill off this Bug Tracker. We will begin the process of slowly migrating from this Bug Tracker over to our Github Issues which can be found here: https://github.com/HerculesWS/Hercules/issues

Over the next couple of days, I will be closing off any opportunity to create new reports. However, I still will keep the opportunity to reply to existing Bug Reports. Doing this will allow us to slowly fix any bug reports we have listed here so that we can easily migrate over to our Issue Tracker.

Update - June 7th 2015: Creating new bug posts has been disabled. Please use our https://github.com/HerculesWS/Hercules/issues tracker to post bugs. Users are still able to reply to existing bug posts.

- Administration

Issue Information

  • #007721

  • 0 - None Assigned

  • Fixed

Issue Confirmations

  • Yes (0)No (0)
Photo

lastest update make map crashing on battleground.

Posted by purityz on 23 September 2013 - 09:53 PM

run this
- script test -1,{
OnInit:
$@team1= bg_create_team("prontera",36,39);
$@team2 = bg_create_team("prontera",168,156);
end;
}
 


crash at start up

int bg_send_xy_timer(int tid, unsigned int tick, int id, intptr_t data) {
    //bg->team_db->foreach(bg->team_db, bg->send_xy_timer_sub, tick); << comment this line out stop mapserver from crashing
    return 0;
}


int bg_send_xy_timer_sub(DBKey key, DBData *data, va_list ap)
{
struct battleground_data *bg = DB->data2ptr(data);
struct map_session_data *sd;
int i;
nullpo_ret(bg);
for( i = 0; i < MAX_BG_MEMBERS; i++ ) {
if( (sd = bg->members[i].sd) == NULL )
continue;
if( sd->bl.x != bg->members[i].x || sd->bl.y != bg->members[i].y ) { // xy update
bg->members[i].x = sd->bl.x;
bg->members[i].y = sd->bl.y;
clif->bg_xy(sd);
}
}
return 0;
}


Its seems that bg->members[i].sd is not null and it let the process go, but
sd->bl.x , its empty, bcoz no one's attached, that causes the map to crash.

Edited by Dastgir Pojee, 24 September 2013 - 04:14 AM.


so you can reproduce it too. sir?

changed status to: Confirmed

Confirmed, since https://github.com/H...e513b5fe42a0067

Some null-pointer checks (and possibly other assignments) are no longer in place, since they're still using 'bg', while they should use 'bgd' or whichever variable is applicable to the specific case.

Fix coming soon (but lunch comes first.)

changed status to: Fixed