Register forum user name Search FAQ

Gammon Forum

Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the password reset link.

Due to spam on this forum, all posts now need moderator approval.

 Entire forum ➜ SMAUG ➜ SMAUG coding ➜ Something is corrupt

Something is corrupt

It is now over 60 days since the last post. This thread is closed.     Refresh page


Pages: 1  2 

Posted by Zeno   USA  (2,871 posts)  Bio
Date Reply #15 on Sat 29 May 2004 02:36 AM (UTC)
Message
Standard, from Samson's hotboot snippet. Unchanged. But, these null crashes happen like every.... 4 days. Not to often.

Zeno McDohl,
Owner of Bleached InuYasha Galaxy
http://www.biyg.org
Top

Posted by David Haley   USA  (3,881 posts)  Bio
Date Reply #16 on Sat 29 May 2004 03:00 AM (UTC)
Message
Well... let me put it this way. You have to have changed *something*, somewhere. :P Otherwise you wouldn't be the only one having these crashes... *somewhere*, a descriptor isn't being set right. You should try to think of everything and anything you might have changed, no matter how minor.

David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone

http://david.the-haleys.org
Top

Posted by Zeno   USA  (2,871 posts)  Bio
Date Reply #17 on Sat 29 May 2004 04:24 AM (UTC)
Message
Jeez, hrm. What about i3? I installed that...

Luckly I have a changes list, although it doesn't say everything I changed. Raised max levels... Autoglance.... Finger cmd... New sysdata variable... None of those though. Hrm.

Zeno McDohl,
Owner of Bleached InuYasha Galaxy
http://www.biyg.org
Top

Posted by David Haley   USA  (3,881 posts)  Bio
Date Reply #18 on Sat 29 May 2004 05:05 AM (UTC)
Message
Maybe i3, I'm not terribly familiar with it.

If there's one very important thing I've learned about debugging, it's to not make assumptions about your code working. If you haven't done so already, I really urge you to look at everything you may have done up until it started crashing and look very critically at it all. If you make assumptions about 'oh, this works anyways' you may miss mistakes. :) And who knows, maybe you'll find mistakes that could be causing other minor issues. :)

David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone

http://david.the-haleys.org
Top

Posted by Greven   Canada  (835 posts)  Bio
Date Reply #19 on Sat 29 May 2004 05:13 AM (UTC)
Message
If you suspect hotboot, as it seems that it may be, could you post your hotboot_recover()? I'm using the same one, but maybe we can see something minor that you may have missed.

Nobody ever expects the spanish inquisition!

darkwarriors.net:4848
http://darkwarriors.net
Top

Posted by Zeno   USA  (2,871 posts)  Bio
Date Reply #20 on Sat 29 May 2004 05:20 AM (UTC)
Message
Already posted my hotboot_recover stuff to Samson a while ago...


void hotboot_recover( void )
{
    DESCRIPTOR_DATA *d = NULL;
    FILE *fp;
    char name[100];
    char host[MAX_STRING_LENGTH];
    int desc, dcompress, room, dport, idle, maxp = 0;
    bool fOld;

    fp = fopen( HOTBOOT_FILE, "r" );

    if (!fp) /* there are some descriptors open which will hang forever then ? */
    {
        perror( "hotboot_recover: fopen" );
        bug( "%s", "Hotboot file not found. Exitting." );
        exit( 1 );
    }

    unlink( HOTBOOT_FILE ); /* In case something crashes - doesn't prevent reading */
    for( ; ; )
    {
        d = NULL;

        fscanf( fp, "%d %d %d %d %d %s %s\n", &desc, &dcompress, &room, &dport, &idle, name, hos$

        if (desc == -1 || feof(fp) )
            break;

          if( !str_cmp( name, "maxp" ) || !str_cmp( host, "maxp" ) )
          {
           maxp = idle;
           continue;
          }

        /* Write something, and check if it goes error-free */
#ifdef MCCP
        if( !dcompress && !write_to_descriptor_old( desc, "\n\rTime seems to change.\n\r", 0 ) )
#else
          if( !write_to_descriptor( desc, "\n\rTime seems to change.\n\r", 0 ) )
#endif
        {
            close( desc ); /* nope */
            continue;
        }

        CREATE( d, DESCRIPTOR_DATA, 1 );

        d->next         = NULL;
        d->descriptor   = desc;
        d->connected    = CON_GET_NAME;
        d->outsize      = 2000;
        d->idle         = 0;
        d->lines                = 0;
        d->scrlen               = 24;
        d->newstate     = 0;
        d->prevcolor    = 0x08;

        CREATE( d->outbuf, char, d->outsize );

        d->user = STRALLOC( "Unknown" );
        d->host = STRALLOC( host );
        d->port = dport;
        d->idle = idle;
#ifdef MCCP
        d->can_compress = dcompress;
        if( d->can_compress )
           compressStart( d );
#endif
        LINK( d, first_descriptor, last_descriptor, next, prev );
        d->connected = CON_COPYOVER_RECOVER; /* negative so close_socket will cut them off */

        /* Now, find the pfile */
        fOld = load_char_obj( d, name, FALSE, TRUE );

        if( !fOld ) /* Player file not found?! */
        {
#ifdef MCCP
            write_to_descriptor( d, "\n\rSomehow, your character was lost during hotboot. Contac$
#else
                write_to_descriptor( d->descriptor, "\n\rSomehow, your character was lost during$
#endif
            close_socket( d, FALSE );
        }
        else /* ok! */
        {
#ifdef MCCP
            write_to_descriptor( d, "\n\rYour vision blurs back into view, and something seems d$
#else
                write_to_descriptor( d->descriptor, "\n\rYour vision blurs back into view, and s$
#endif
            d->character->in_room = get_room_index( room );
            if( !d->character->in_room )
                d->character->in_room = get_room_index( ROOM_VNUM_TEMPLE );

            /* Insert in the char_list */
            LINK( d->character, first_char, last_char, next, prev );

            char_to_room( d->character, d->character->in_room );
              act( AT_MAGIC, "A puff of ethereal smoke dissipates around you!", d->character, NU$
            act( AT_MAGIC, "$n appears in a puff of ethereal smoke!", d->character, NULL, NULL, $
            d->connected = CON_PLAYING;
            if ( ++num_descriptors > sysdata.maxplayers )
                 sysdata.maxplayers = num_descriptors;
#ifdef AUTO_AUTH
            check_auth_state( d->character ); /* new auth */
#endif
        }
    }
    FCLOSE( fp );
    if( maxp > sysdata.maxplayers )
        sysdata.maxplayers = maxp;
    log_string( "Hotboot recovery complete." );
    return;
}

Zeno McDohl,
Owner of Bleached InuYasha Galaxy
http://www.biyg.org
Top

Posted by David Haley   USA  (3,881 posts)  Bio
Date Reply #21 on Sat 29 May 2004 06:56 AM (UTC)
Message
Hrm, I would look into:

fOld = load_char_obj( d, name, FALSE, TRUE );

Perhaps if a character fails to load, something goes wrong?

*shrug* I think that everything in there looks right... I'm pretty much as stumped as you are. I'd suggest just going with the sanity checks and all that.

David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone

http://david.the-haleys.org
Top

Posted by Zeno   USA  (2,871 posts)  Bio
Date Reply #22 on Sat 29 May 2004 05:29 PM (UTC)
Message
Yeah, and checking over everything I've done will take a while. (Sorry for the text being cut off)

Ugh, the shard structure will be fun to do. -.-

Zeno McDohl,
Owner of Bleached InuYasha Galaxy
http://www.biyg.org
Top

Posted by David Haley   USA  (3,881 posts)  Bio
Date Reply #23 on Sat 29 May 2004 10:55 PM (UTC)
Message
Shard structure?

David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone

http://david.the-haleys.org
Top

Posted by Zeno   USA  (2,871 posts)  Bio
Date Reply #24 on Sun 30 May 2004 01:53 AM (UTC)
Message
Doesn't have anything to with descriptors, but its pretty much a new obj system, that focus's on some objs, as very important. They have their own global variable, and immortal monitor chan, to keep track of the objects movement. Although its not an actual structure. (yet) Still working on it, a lot.

Zeno McDohl,
Owner of Bleached InuYasha Galaxy
http://www.biyg.org
Top

Posted by David Haley   USA  (3,881 posts)  Bio
Date Reply #25 on Sun 30 May 2004 02:41 AM (UTC)
Message
Sounds big. Good luck sifting through it. :-)

Very seriously though, remember to not make assumptions...

David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone

http://david.the-haleys.org
Top

Posted by Zeno   USA  (2,871 posts)  Bio
Date Reply #26 on Sun 30 May 2004 02:58 AM (UTC)
Message
Good point. Well, I'll post a new topic when/if I fix/find the problem. Or I'll just post here, if its fairly recent. Thanks for the help.

Zeno McDohl,
Owner of Bleached InuYasha Galaxy
http://www.biyg.org
Top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


68,575 views.

This is page 2, subject is 2 pages long:  [Previous page]  1  2 

It is now over 60 days since the last post. This thread is closed.     Refresh page

Go to topic:           Search the forum


[Go to top] top

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.