Login
User Name:

Password:



Register
Forgot your password?
Vote for Us!
Bug in disarm( )
Nov 12, 2017, 6:54 pm
By GatewaySysop
Bug in will_fall( )
Oct 23, 2017, 1:35 am
By GatewaySysop
Bug in do_zap( ), do_brandish( )
Oct 18, 2017, 1:52 pm
By GatewaySysop
Bug in get_exp_worth( )
Oct 10, 2017, 1:26 am
By GatewaySysop
Bug in do_drag( )
Oct 8, 2017, 12:40 am
By GatewaySysop
LOP Heroes Edition
Author: Vladaar
Submitted by: Vladaar
Heroes sound extras
Author: Vladaar
Submitted by: Vladaar
6Dragons 4.3
Author: Vladaar
Submitted by: Vladaar
Memwatch
Author: Johan Lindh
Submitted by: Vladaar
Beastmaster 6D sound files
Author: Vladaar
Submitted by: Vladaar
Users Online
CommonCrawl, Yandex, Yahoo!

Members: 0
Guests: 8
Stats
Files
Topics
Posts
Members
Newest Member
476
3,704
19,231
608
LAntorcha
Today's Birthdays
There are no member birthdays today.
Related Links
» SmaugMuds.org » General » Coding » crash core
Forum Rules | Mark all | Recent Posts

crash core
< Newer Topic :: Older Topic >

Pages:<< prev 1 next >>
Post is unread #1 Oct 9, 2013, 2:46 am
Go to the top of the page
Go to the bottom of the page

Guest - (Unregistered)

Good Morning, if anyone has chance to browse this and give me advice I'd appreciate it. I still have core available for gdb.


gdb) frame 0
#0 0x080f2c97 in act (AType=33, format=0x828a75a "$n has entered the game.", ch=0xa6500b0, arg1=0x0, arg2=0x0, type=5) at comm.c:2787
2787 if ( HAS_PROG( to->in_room, ACT_PROG ) )
(gdb) list
2782 bug( "%s: %s -> %s", __FUNCTION__, ch->name, to->name );
2783 return;
2784 }
2785
2786 txt = act_string( format, NULL, ch, arg1, arg2, STRING_IMM, actobj );
2787 if ( HAS_PROG( to->in_room, ACT_PROG ) )
2788 rprog_act_trigger( txt, to->in_room, ch, ( OBJ_DATA * ) arg1, ( void * ) arg2 );
2789 for ( to_obj = to->in_room->first_content; to_obj; to_obj = to_obj->next_content )
2790 if ( HAS_PROG( to_obj->pIndexData, ACT_PROG ) )
2791 oprog_act_trigger( txt, to_obj, ch, ( OBJ_DATA * ) arg1, ( void * ) arg2 );
(gdb) print *ch
$1 = {next = 0x0, prev = 0xa64fd18, next_in_room = 0x0, prev_in_room = 0xa6122e0, master = 0x0, leader = 0x0, fighting = 0x0, reply = 0x0, retell = 0x0, switched = 0x0, mount = 0x0,
editor = 0x0, hunting = 0x0, fearing = 0x0, hating = 0x0, variables = 0x0, spec_fun = 0, mpact = 0x0, reset = 0x0, mpactnum = 0, mpscriptpos = 0, pIndexData = 0x0,
desc = 0xa647848, redirect = 0x0, first_affect = 0x0, last_affect = 0x0, first_carrying = 0xa61d160, last_carrying = 0xa4ef4b0, on = 0x0, in_room = 0xa185960,
was_in_room = 0xa185960, pcdata = 0xa650518, siege = 0x0, city = 0x0, last_cmd = 0, dest_buf = 0x0, alloc_ptr = 0x0, spare_ptr = 0x0, tempnum = 0, first_timer = 0x0,
last_timer = 0x0, morph = 0x0, name = 0x94394d8 "Patriot", short_descr = 0x0, long_descr = 0x0, description = 0x0, landmark = 0x0, num_fighting = 0, substate = 0, sex = 1,
Class = 4, secondclass = -1, thirdclass = -1, race = 0, trust = 0, played = 617771, logon = 1381308901, save_time = 0, timer = 0, wait = 0, blood = 2924, max_blood = 1462,
hit = 264, max_hit = 132, mana = 400, max_mana = 200, move = 599806, max_move = 300000, slicevnum = 0, practice = 94, numattacks = 0, money = {0, 99542488, 945, 0, 27928},
gold = 0, exp = 811181, firstexp = 0, secondexp = 0, thirdexp = 0, firstexpratio = 0, secondexpratio = 0, thirdexpratio = 0, level = 108, firstlevel = 0, secondlevel = 0,
thirdlevel = 0, temp_base_hit = 0, quest_curr = 173, quest_accum = 173, used_trade = 0, focus_level = 0, faith = 0, chan_invite = 0, arena_mob_count = 0, arena_obj_count = 0,
arena_wins = 2, arena_loss = 0, map_toggle = 0, map_size = 0, map_desc_toggle = 0, map_name_toggle = 0, map_type = 0, act = {bits = {1644172872, 268964352, 0, 0}}, affected_by = {
bits = {512, 0, 0, 0}}, no_affected_by = {bits = {0, 0, 0, 0}}, carry_weight = 4, carry_number = 1, xflags = {bits = {0, 0, 0, 0}}, no_immune = 0, no_resistant = 0,
no_susceptible = 0, immune = 0, resistant = 0, susceptible = 0, attacks = {bits = {0, 0, 0, 0}}, defenses = {bits = {0, 0, 0, 0}}, speaks = -1, speaking = 1,
saving_poison_death = 0, saving_wand = 0, saving_para_petri = 0, saving_breath = 0, saving_spell_staff = 0, alignment = -923, barenumdie = 1, baresizedie = 4, mobthac0 = 0,
hitroll = 5, damroll = 5, hitplus = 0, damplus = 0, position = 15, defposition = 0, style = 2, height = 90, weight = 292, armor = -13, wimpy = 0, deaf = {bits = {0, 0, 0, 0}},
perm_str = 25, perm_int = 12, perm_wis = 12, perm_dex = 20, perm_con = 21, perm_cha = 13, perm_lck = 13, mod_str = 0, mod_int = 5, mod_wis = 0, mod_dex = 0, mod_con = 0,
mod_cha = 0, mod_lck = 0, statpoints = 0, mental_state = -10, emotional_state = 0, retran = 0, regoto = 0, mobinvis = 0, home_vnum = 56300, colors = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9,
10, 11, 12, 13, 14, 15, 31, 22, 27, 17, 23, 28, 18, 24, 29, 19, 25, 30, 20, 26, 16, 21, 8, 8, 4, 9, 0, 5, 8, 8, 14, 8, 8, 8, 4, 8, 8, 11, 2, 8, 8, 4, 8, 8, 8, 3, 8, 4, 10, 8, 8,
14, 8, 8, 1, 4, 3, 8, 8, 9, 11, 11, 1, 8, 3, 8, 11, 3, 4, 3, 2, 14, 10, 11, 10, 5, 4, 4, 4, 9, 8, 9, 9, 14, 13, 9, 10, 11, 2, 3, 5, 4, 11, 2, 6, 3, 11, 9, 8, 9, 5},
challenged = 0x0, challenge = 0x0, betted_on = 0x0, bet_amt = 0, cmd_recurse = 0, pnote = 0x0, comments = 0x0, hate_level = 0, ward_dam = 0, kinetic_dam = 0, color = 0,
influence = 0, clanname = 0x0, clan = 0x0, degree = 1, questcountdown = 0, questvnum = 0, questtype = 0, questgiver = 0, success_attack = 0, damage_amount = 0,
soldierset = 0 '\000'}
(gdb)

Why is print *to different then print *ch?

gdb) print *to
$2 = {next = 0xa589560, prev = 0x6f0478, next_in_room = 0xa6500b0, prev_in_room = 0xa6132f8, master = 0x0, leader = 0x0, fighting = 0x0, reply = 0x0, retell = 0x0, switched = 0x0,
mount = 0x0, editor = 0x0, hunting = 0x98f6088, fearing = 0x0, hating = 0x0, variables = 0x0, spec_fun = 0, mpact = 0x0, reset = 0x0, mpactnum = 0, mpscriptpos = 0,
pIndexData = 0x3c, desc = 0x0, redirect = 0x20, first_affect = 0x0, last_affect = 0x0, first_carrying = 0x1, last_carrying = 0x0, on = 0x0, in_room = 0x1ffff, was_in_room = 0xa,
pcdata = 0xa, siege = 0x32, city = 0x3, last_cmd = 0x3, dest_buf = 0x2, alloc_ptr = 0x4c <Address 0x4c out of bounds>, spare_ptr = 0xa, tempnum = -1, first_timer = 0x1,
last_timer = 0x1f5cc, morph = 0x0, name = 0x50001 <Address 0x50001 out of bounds>, short_descr = 0x0, long_descr = 0x0, description = 0x0, landmark = 0x0, num_fighting = 0,
substate = 0, sex = 0, Class = 0, secondclass = 0, thirdclass = 0, race = 0, trust = 0, played = 0, logon = 0, save_time = 0, timer = 0, wait = 0, blood = 0, max_blood = 0,
hit = 0, max_hit = 240, mana = 240, max_mana = 174138560, move = 174138080, max_move = 173634384, slicevnum = 174138080, practice = 0, numattacks = 0, money = {0, 0, 0, 0, 0},
gold = 0, exp = 0, firstexp = 159897568, secondexp = 0, thirdexp = 0, firstexpratio = 0, secondexpratio = 0, thirdexpratio = 0, level = 0, firstlevel = 0, secondlevel = 0,
thirdlevel = 0, temp_base_hit = 0, quest_curr = 0, quest_accum = 60, used_trade = 0, focus_level = 0, faith = 0, chan_invite = 0, arena_mob_count = 0, arena_obj_count = 0,
arena_wins = 16385, arena_loss = 0, map_toggle = 0, map_size = 0, map_desc_toggle = -1, map_name_toggle = 1, map_type = 6, act = {bits = {5, 1, 1, 1}}, affected_by = {bits = {1,
48, 5, 4294967295}}, no_affected_by = {bits = {1, 128461, 0, 196611}}, carry_weight = 0, carry_number = 0, xflags = {bits = {0, 0, 0, 0}}, no_immune = 0, no_resistant = 0,
no_susceptible = 0, immune = 0, resistant = 0, susceptible = 0, attacks = {bits = {0, 0, 0, 480}}, defenses = {bits = {240, 174138800, 174138320, 173634384}}, speaks = 174138320,
speaking = 0, saving_poison_death = 0, saving_wand = 0, saving_para_petri = 0, saving_breath = 0, saving_spell_staff = 0, alignment = 0, barenumdie = 0, baresizedie = 0,
mobthac0 = 0, hitroll = 0, damroll = 0, hitplus = 0, damplus = 0, position = 0, defposition = 4664, style = 2439, height = 0, weight = 0, armor = 0, wimpy = 0, deaf = {bits = {0,
0, 0, 0}}, perm_str = 0, perm_int = 0, perm_wis = 0, perm_dex = 0, perm_con = 23, perm_cha = 0, perm_lck = 0, mod_str = 0, mod_int = 0, mod_wis = 0, mod_dex = 0, mod_con = 0,
mod_cha = 0, mod_lck = 0, statpoints = 16385, mental_state = 0, emotional_state = 0, retran = 0, regoto = 131071, mobinvis = 0, home_vnum = 29, colors = {0 <repeats 14 times>, 1,
0, -2610, 1, 0, 0, 1, 3, 0 <repeats 30 times>, 720, 0, 240, 0, 9888, 2657, 9408, 2657, 29520, 2649, 9408, 2657, 0 <repeats 16 times>, 24712, 2447, 0 <repeats 16 times>, 60, 0, 0,
0, 32, 0, 0, 0, 0, 0, 1, 0, 0}, challenged = 0x0, challenge = 0x1ffff, betted_on = 0xa, bet_amt = 10, cmd_recurse = 50, pnote = 0x3, comments = 0x3, hate_level = 1, ward_dam = 0,
kinetic_dam = 76, color = 0, influence = 10, clanname = 0xffffffff <Address 0xffffffff out of bounds>, clan = 0x1 <Address 0x1 out of bounds>, degree = -2609, questcountdown = 0,
questvnum = 327681, questtype = 0, questgiver = 0, success_attack = 0, damage_amount = 0, soldierset = 0 '\000'}
(gdb)

(gdb) info locals
to_obj = <value optimized out>
txt = 0x8317800 "Patriot has entered the game.\r\n"
to = 0xa6122e0
vch = 0x0
third = 0x0
actobj = 0 '\000'
__FUNCTION__ = "act"
(gdb) frame 1
#1 0x0814b9d1 in genesis (d=0xa647848, argument=0xbf942734 "Something";) at genesis.c:1624
1624 act( AT_ACTION, "$n has entered the game.", ch, NULL, NULL, TO_CANSEE );
(gdb) list
1619 ch->pcdata->htown = htown;
1620 }
1621
1622 }
1623
1624 act( AT_ACTION, "$n has entered the game.", ch, NULL, NULL, TO_CANSEE );
1625 send_to_char( "\r\n\r\n", ch ); // a spacer?
1626 checkBuidty( ch );
1627 get_curr_players( );
1628 if ( IS_SET( ch->pcdata->flags, PCFLAG_UNAUTHED ) ) {
(gdb) print ch->name
Cannot access memory at address 0xa8
(gdb) print *ch
Cannot access memory at address 0x0

Why is ch suddenly not there at this point?


void act( short AType, const char *format, CHAR_DATA *ch, const void *arg1, const void *arg2,
          int type )
{
    char                   *txt;
    CHAR_DATA              *to;
    CHAR_DATA              *vch = ( CHAR_DATA * ) arg2;
    CHAR_DATA              *third = ( CHAR_DATA * ) arg1;

    /*
     * Discard null and zero-length messages.
     */ 
    if ( !format || format[0] == '\0' )
        return;

    if ( !ch ) {
        bug( "Act: null ch. (%s)", format );
        return;
    }

    if ( !ch->in_room )
        to = NULL;
    else if ( type == TO_CHAR )
        to = ch;
    else if ( type == TO_THIRD )
        to = third;
    else
        to = ch->in_room->first_person;

   /*
     * ACT_SECRETIVE handling
     */ 
    if ( IS_NPC( ch ) && xIS_SET( ch->act, ACT_SECRETIVE ) && type != TO_CHAR )
        return;

    if ( type == TO_VICT ) {
        if ( !vch ) {
            bug( "Act: null vch with TO_VICT." );
            bug( "%s (%s)", ch->name, format );
            return;
        }
        if ( !vch->in_room ) {
            bug( "Act: vch in NULL room!" );
            bug( "%s -> %s (%s)", ch->name, vch->name, format );
            return;
        }
        to = vch;
    }

/* Volk - object socials */
    bool                    actobj = FALSE;

    if ( ( type == TO_CHAR || type == TO_NOTVICT || type == TO_THIRD ) && arg2 == NULL
         && AType == AT_SOCIAL )
        actobj = TRUE;

    if ( MOBtrigger && type != TO_CHAR && type != TO_VICT && type != TO_THIRD && to ) {
        OBJ_DATA               *to_obj;

        if ( !to->in_room ) {
            bug( "%s: to->in_room is NULL", __FUNCTION__ );
            if ( IS_NPC( ch ) ) {
                if ( ch == supermob )
                    bug( "%s: %s(%s) -> %s", __FUNCTION__, ch->name, supermob->description,
                         to->name );
                else
                    bug( "%s: %s(%d) -> %s", __FUNCTION__, ch->name, ch->pIndexData->vnum,
                         to->name );
            }
            else
                bug( "%s: %s -> %s", __FUNCTION__, ch->name, to->name );
            return;
        }

        txt = act_string( format, NULL, ch, arg1, arg2, STRING_IMM, actobj );

        txt = act_string( format, NULL, ch, arg1, arg2, STRING_IMM, actobj );
   
// mud.h defines HAS_PROG as #define HAS_PROG(what, prog)  (xIS_SET((what)->progtypes, (prog)))
        if ( HAS_PROG( to->in_room, ACT_PROG ) )  // This is line 2787 where it crashed
            rprog_act_trigger( txt, to->in_room, ch, ( OBJ_DATA * ) arg1, ( void * ) arg2 );
        for ( to_obj = to->in_room->first_content; to_obj; to_obj = to_obj->next_content )
            if ( HAS_PROG( to_obj->pIndexData, ACT_PROG ) )
                oprog_act_trigger( txt, to_obj, ch, ( OBJ_DATA * ) arg1, ( void * ) arg2 );
    }

    /*
     * Anyone feel like telling me the point of looping through the whole
     * room when we're only sending to one char anyways..? -- Alty
     */
    for ( ; to;
          to = ( type == TO_CHAR
                 || type == TO_VICT ) ? NULL : ( type ==
                                                 TO_THIRD ) ? to->next : to->next_in_room ) {
        if ( !to ) {
            bug( "%s", "act: null to comm.c 2989", __FUNCTION__ );
            return;
        }

       
Post is unread #2 Oct 9, 2013, 8:39 am
Go to the top of the page
Go to the bottom of the page

Remcon
Geomancer
GroupAdministrators
Posts1,857
JoinedJul 26, 2005

should check out previous frames and see where ch went bad as well as it can give you a good idea of who it might have been by the descriptor. also the crash was from to->in_room being invalid, it wasnt null but I think its invalid.
       
Pages:<< prev 1 next >>