[CF-Devel] How can this have happened? (crashing bug)

Peter Mardahl peterm at alfven.EECS.Berkeley.EDU
Mon Apr 9 14:50:45 CDT 2001


Hmm, thanks for your remarks.

I had no idea that "insert_multisquare_ob_in_map" wasn't "atomic".

I take it a better implementation would be to create the whole
thing and then insert it into the map?  I think I tried that at one
point with rather annoying results:

1)  Either only the head square of the monster would be put in at
the start, witht he rest appearing only when the monster moved
(inserting only the head)

2)  Or the monster would have 1 haed, 2 of the second thing, 3 of the
3rd thing.....

I could use a little bit of help here, I guess.

>
     
      BTW, do you now where the fireball was coming from?  Was it put on the
     
     >
     
      random map when the map was created?
     
     
I have no idea if the fireball was on the map I was just leaving
or if it was on the map I was entering.  There should not have been
a fireball on the map I was just entering:   I know of no way
for a random map to have a fireball on it to start unless there are
runes on the floor, which generally there are not and in this
case there were not.

There were a great many fireballs on the map I was just leaving.

>
     
      I've also noticed some unreliable code in nuke_map_region() and
     
     >
     
      remove_monsters().  Both functions require that there is a floor object
     
     >
     
      on each map square (they effectively perform a
     
     >
     
      tmp = get_map_ob(...)->above; whenever they have something deleted).
     
     >
     
      Fix would be to move that tmp = tmp->above into the loop body as an
     
     >
     
      else branch.
     
     
Hmm, the random map code always places a floor and therefore assumes
that there is a floor.  Given that, would you still say these changes
are necessary?

PeterM




    
    


More information about the crossfire mailing list