Downstairs bug fix

Powerwyrm managed to fix critical bug which crushed server! Yay!

The story about it – is pretty detective: we tried to catch it in debug for a month 😉 And finally this morning we catch it at last – server logs:

110219 082709 Mako: There is a wall in the way!
110219 082710 Darkfold V: You enter a maze of down staircases.
110219 082710 BEGIN pre_turn_game_loop()
110219 082710 Handle any network stuff
110219 082710 Process monsters with even more energy first
110219 082710 END pre_turn_game_loop()
110219 082710 BEGIN process_player(Mako)
110219 082710 process_player_cleanup()
110219 082710 Shutting down (panic save).
110219 082711 Server panic info save succeeded!

Powerwyrm solving the riddle:

110219 082710 Darkfold V: You enter a maze of down staircases.
110219 082710 BEGIN process_player(Mako)

So for player “Mako”, EVERY 5 GAME TURNS, there’s a test if we should “flicker” him or not. This means, the bug can happen very rarely: another player must enter the same level exactly on a turn “0” or a turn “5” from 0 to 9. This also means it can only happen if the player that changes level (Darkfold) has the “animate_flicker” option set and doesn’t use a tileset (ASCII mode). And this also means it can only happen if the player (Mako) is either a dragon or shapechanger with a multihued form, the leader of a party, or an Elementalist. That’s a TON of circumstances!!!

Now the bug: if we try to “flicker” the player, we “lighten” the square where the player is. Problem: at this point, we didn’t spawn the other player yet, so we access an invalid location and BAM the game crashes!

Elementary, my dear Watson ™

Leave a Reply

Your email address will not be published. Required fields are marked *