Re: Xapobjs - was <[NEWBIE] [ZEDIT] Door and New Zone errors>

From: Patrick Dughi (dughi@imaxx.net)
Date: 01/24/99


>
> Well, I'm running win98 with Cygwin 32 2.1b, and usually gdb does
> work.  However, with the xapobjs, if I had a unique item loading, the
> program makes win98 itself crash and gives me a blue screen of
> death error :P
>
        Wow. I made something crash windows 98. Let me put another notch
in my belt.....

        Okay, right now, for xapobjs, the only crash-casuing bugs I can
really think of are those having to do with freeing a unique object ->
        This is because i set the strings without allocating memory for
them... which is what we call a 'bad thing'.  Look through the section of
the code for the line like obj->sdesc="Undefined" .. and use str_dup or
the like instead.

        Now, as for crashing upon xapobj load, I'm sure I wrote to the
list what that bug was, but I can't for the life of me remember, since
that was several working revisions ago (well, for me).  I would do the
following though:

        Check and make sure that the object _should_ be saved.. ie, a
corpse may be saved, however, since it is not set as a unique object,
you're going to get a line like:

#-1
0 0 0 0 0 0

        In your rent file... this should only result in loading a bug
object though - in most situations.  Maybe not.. who knows.  I recommend
that you check the criteria for saving an object - only save -1 objects if
they're flagged unique, etc... make sure that's all correct...

        You should be able to check this very easily in your code, since
the rent files are ascii :)

        As well, check the loading code, and make sure that there are no
infinite loops, as my original version did have a few of those, and I did
skip around alot, I may have left a case out...log() messages are good for
this...

        Since you know when it happens though, run the mud through the
debugger... you may get a good crash then.. else, log it to a file, and
pick up the logs when you're done rebooting :)


        I'll have a new version out sometime at the end of next week I
think, been busy at work re-securing after a break in on the systems.
Bleh.
                                                PjD


     +------------------------------------------------------------+
     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     |  http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html  |
     +------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 12/15/00 PST