[CF-Devel] Internal error in update_button()

Andreas Vogl andi.vogl at gmx.net
Mon Apr 16 08:18:22 CDT 2001


The following bug is causing the great instability of
our servers these days. Let's try to fix it.

>
     
      [...]
     
     >
     
      Saving map /pup_land/begin/p1
     
     >
     
      Resetting map /pup_land/raffle/raffle1.
     
     >
     
      Internal error in update_button (6666).
     
     >
     
      Internal error in update_button (6666).
     
     >
     
      Internal error in update_button (6666).
     
     >
     
      Internal error in update_button (small button).
     
     >
     
      Internal error in update_button (small button).
     
     >
     
      Internal error in update_button (small button).
     
     >
     
      Internal error in update_button (small button).
     
     >
     
      Internal error in update_button (small button).
     
     >
     
     
     >
     
      .... (crash.)
     
     
First of all, the bug is very easy to reproduce:
- Take the map "/pup_land/raffle/raffle1" and set the fixed reset down to
10.
- Then start a crossfire server, log in with a char
- Enter the raffle1, leave it again, and wait for a short while
=> server crashes, the log looks pretty much like above.

Now, what causes the bug?

The bug happens on any map that has a fixed reset and a large number
of buttons/pedestals. Shortly *after* the map has been reset
(->call to swap_map in swap.c) there are calls to update_button() for
that map. (It looks like these calls are unnessecary and wrong, but I
couldn't figure out where these calls happen.)

The object link - pointers do still exist by that time (leftover?), but
the adresses they point to are wrong. update_button actually does the
right thing by skipping the calls and printing an error-message.
Unfortunately, there are so many errormessages that the server exits.

Now, the easiest fix would be to change "llevError" to "llevDebug"
for the "Internal error in update_button (...)."-message.
But that is somehow a dirty fix. Maybe someone can track the bug
to it's roots?


Andreas V.


    
    


More information about the crossfire mailing list