well alderon, i'm afraid i have good news and bad news pertaining to this 
problem... the good news is that i know exactly the problem that you're talking 
about, i experienced it myself when i wiped all areas in my mud to start from 
scratch, and one of my imms had a container on them that no longer existed... 
the mud would hang when they tried to login, and it was from that container 
object sending the mud into an infinite loop... the bad news is that i was 
never able to find the fix for it, and the easiest way to fix it was just to 
delete the trouble pfile and let him recreate, and hopefully not have to delete 
any more areas :) i can point you to where i left off at in trying to 
troubleshoot this, though... and you can maybe find it in the archives by now, 
i'm not sure how often the archives are updated, but i'd imagine it's in there 
by now... go do a search for corrupt rgObjNest, because that's where i was 
tracking the problem to... for whatever reason, my code was doing this, which i 
didn't realize until i stepped through it in gdb...
 
it would attempt to get_obj_index and fail because the index data didn't exist, 
so it would then load a dummy object to start creating the object out of...
 
it would set rgObjNest[iNest] = obj just in case there were other items that 
were nested inside of it
 
it would load all data it had about the obj, set strings, item type, etc., and 
increment to the next obj in the pfile, which happened to be a content of it...
 
the content had a higher nest value, so the code would go to set the 
rgObjNest[iNest] = obj, only for some reason, it would be remembering "obj" as 
the container from the previous loop iteration, instead of the current obj, so 
it would then log (in real index values) rgObjNest[0] and [1] both as obj, and 
later on it would go into an infinite loop basically trying to execute the 
equivalent of the following:
 
for ( obj2 = obj->contents; obj != NULL; obj = obj->contents )
 
because it would see itself as the first content item and try to go to the next 
one over and over and over, each time just reassigning back to itself... i was 
told to check that my "obj" variable was initialized, and that nothing was 
trampling anything else's place in memory, and everything checked out on my 
end... this seems to be a stock bug now that i hear you mention the same 
problem under the same circumstances (container object types of deleted 
items)... hopefully someone can help come up with a fix for this, because i'd 
love to go apply it to my own code in case i ever have to delete something 
again :) but you can start in the archives by looking for rgobjnest
 
wavewave
Richard Lindsey.

        -----Original Message----- 
        From: Alderon [mailto:[EMAIL PROTECTED] 
        Sent: Mon 10/18/2004 2:02 PM 
        To: [email protected] 
        Cc: 
        Subject: Character Loading Problem
        
        

        Ok,
        
        I've recently subscribed to the list, and I did some searching before
        posting this. In all reality, I could just be blind. I'll ask anyway:
        
        I've decided to clean up my area list. Mostly to get rid of overpowered 
eq
        that previous immortals have created.
        When I remove areas, and there are players who have eq that is from that
        area, the mud would freeze until I could
        kill the process and reboot. It would throw out the "Fread_obj: bad vnum
        %d." error in the logs.  I have fixed this
        problem when it comes to individual pieces of eq by editing my save.c to
        look like:
        
        if (get_obj_index(vnum) == NULL) {                              /* 
Changed to fix crash when player
        logged in with */
                    bug("Fread_obj: bad vnum %d.", vnum);                       
/* non-existant eq. -Alderon */
                        obj = new_obj();
                obj->name = str_dup("");
                obj->short_descr = str_dup("");
                obj->description = str_dup("");
                } else {
                    obj = create_object(get_obj_index(vnum), -1);
                    new_format = TRUE;
                }
        
        
        The problem is that if the piece of eq is a container (like a backpack) 
that
        is full of eq. The mud will freeze with the
        "Fread_obj: incomplete object." error message in the logs. From what I 
can
        gather, the mud is removing the illegal
        container, but when it comes to an object that is "nested" in the 
container
        it has no clue what to do and just stops
        doing everything.  The piece of code is:
        
         if (!str_cmp(word, "End")) {
                      // if (!fNest || !fVnum || obj->pIndexData == NULL) {
                      if ( !fNest || ( fVnum && obj->pIndexData == NULL ) ){
                        bug("Fread_obj: incomplete object.", 0);
                        free_obj(obj);
                        return;
                      } else
                        {
                          if ( !fVnum )
                            {
                              free_obj( obj );
                              obj = create_object( get_obj_index( 
OBJ_VNUM_DUMMY ), 0
                                                   );
                            }
        
        I'm sorry that the note is too long...I'll try to do better on my next
        posting.
        
        Thank you,
        
        Alderon
        AnimeMUD 2 anime2.ipupdater.net:7000
        
        
        --
        ROM mailing list
        [email protected]
        http://www.rom.org/cgi-bin/mailman/listinfo/rom
        

Reply via email to