A YASD... and a bug

Post the obvious, so we can all chuckle with you...
Post Reply
PowerWyrm
Balrog
Posts: 1574
Joined: Sun 27.11.2005, 15:57

A YASD... and a bug

Post by PowerWyrm » Fri 04.07.2008, 21:59

PowerWyrm, the Dunadan Mage bit it...
The gory details can be found here:

http://mangband.org/Main/HighScoreChart ... -603987418

Like my last mage, it was an instadeath. I had surely better genocide the vault and collect the loot as I do 99% of the time, but this vault had plasma hounds and easy wyrms I wanted to kill for xp, and there were no Qs, no high uniques or tough monsters inside to scare me. The death screen appeared without warning... and looking at the last messages, I still cannot figure what happened here. I have no rational explanation, except a probable bug. Since the character was brave, there was no possibility to browse the last messages online, since the only thing you can do when the death screen appears is to close your client and wait for the character dump on the server.
As far as I can remember, the last thing I did was to move from spot A to spot B (see death site for complete map of the area).

################### ###################
#..................@.^^# #...................@^^#
#..#############^^# #..#############^^#
#..#~\WZsTTMDU#h^# #..#~\WZsTTMDU#h^#

And when I pressed the macro to disarm traps... poof death screen. That char was fun to play too :(

Ace
Crystal Ooze
Posts: 368
Joined: Fri 15.02.2008, 12:50

Re: A YASD... and a bug

Post by Ace » Sat 05.07.2008, 12:49

Maybe spot B was a teleport trap?
Maybe the vault had monsters in it who created a trap on that field ? Though i just see M D.. and Us can also not create traps...

Maybe the p also teleported you (?)

Well surely unlucky and annying. My last death was similar but I know that the skul druijs are nasty and the death was not a bug :)

[after a little thinking]

After all the distance between the spot B and the new position it looks like a blink / phase door.... ?!

PowerWyrm
Balrog
Posts: 1574
Joined: Sun 27.11.2005, 15:57

Re: A YASD... and a bug

Post by PowerWyrm » Sat 05.07.2008, 14:31

Spot B is in no way in LOS of any monster in that vault (check death site), so nothing in it could be the reason of why that character ended up at the death spot. No trap was there either. And blink/phase door has a check so that players (or monsters) that blink do it outside of vaults, so the character would have landed outside of the permawalls. And the only monsters in LOS were novice paladins...

Jug
King Lich
Posts: 342
Joined: Sat 26.10.2002, 15:00
Location: UK
Contact:

Re: A YASD... and a bug

Post by Jug » Mon 07.07.2008, 10:51

It's worth knowing that the "Scene of Death" doesn't always get the position of the "@" right. :) I'm not suggesting this is the case here, but this just reminded me I've been meaning to let people know.

At the time the scene of death is generated, the player is dead (obviously) so isn't in the location they died anymore. The approach we take is to position the @ in the scene of death where we think it should be. But we've seen examples where it gets positioned incorrectly.

PowerWyrm
Balrog
Posts: 1574
Joined: Sun 27.11.2005, 15:57

Re: A YASD... and a bug

Post by PowerWyrm » Mon 07.07.2008, 11:17

The position for this char was correct, I had time to check before closing the client. Sounds to me like a tele_to effect, however there are no monsters inside the vault that had the tele_to flag (and the char was not in LOS with those monsters anyway) that's why I'm totally puzzled. Unless those novice paladins were corrupted by chaos effects and could cast gravity bolts... but wait this isn't ADOM :)

Hal
Seedy Looking Human
Posts: 16
Joined: Tue 15.01.2008, 05:31

Re: A YASD... and a bug

Post by Hal » Tue 08.07.2008, 14:54

the purple h's teleport to. It looks like you were in it's line of sight, and even if you weren't they are +20 fast, and could have moved in and out of your LOS.

PowerWyrm
Balrog
Posts: 1574
Joined: Sun 27.11.2005, 15:57

Re: A YASD... and a bug

Post by PowerWyrm » Wed 09.07.2008, 12:42

I checked the monster list and yes it could have been a dark elven sorceror (I thought it was a dark elven mage). This kind of monster has tele_to flag and looking at the vault layout the char was probably in LOS. So that's what probably happened: the h cast tele_to spell... and the closest legal location for the teleporting is the death spot inside the vault, not only out of melee range of the caster... but also out of LOS!
Sounds like an aberrant behavior in teleport_player_to()... teleport_player() has a check that prevents teleporting into vaults, and I understand why teleport_player_to() doesn't have it since it would make the tele_to spell totally harmless (you still want tele_to monsters inside vaults be able to teleport you to them!), but the method of picking the final location should be changed so that at least the final location is in LOS of the caster. Looking at the source code, the following silly result could be easily obtained:

@ in corridor filled with objects on the ground and a tele_to monster

###########............................................................................................###########
#hugevault##............................................................................................#hugevault##
#filled.with##............................................................................................#filled@with#
#monsters##........==>.......guess where the closest location for tele_to is.......==>........#monsters##
###########............................................................................................###########
#############.........................................................................................#############
|],[_-@(|h/{{##........................................................................................|],[_-.(|h/{{##
#############.........................................................................................#############

This is totally absurd... even more considering that depending on the index of the tele_to monster in the monster list, you will have one turn or no turn at all to react to the teleporting effect (all monsters with indexes in the monster list greater than the index of the caster will be able to act, cast, breathe... before your character gets a turn, since monsters are processed sequentially).
This is of course an extreme case which has very low chance to happen (even the death of the char is the result of the accumulation of unlucky feature placements... traps around the caster, naked floor grid inside the big vault room...), but it can happen.

PowerWyrm
Balrog
Posts: 1574
Joined: Sun 27.11.2005, 15:57

Re: A YASD... and a bug

Post by PowerWyrm » Wed 09.07.2008, 13:04

Hmm I don't know what to do about this... Should I post a bug report? But this isn't really a "bug", more a flaw in the tele_to logic. Vanilla doesn't check the final location either... so the same absurd result could happen, although with the turn based system your character would have more chances to survive if all the monsters don't get a turn to act before you do. Maybe I could check Angband forums/newsgroups to see if this hasn't been discussed before...

Ace
Crystal Ooze
Posts: 368
Joined: Fri 15.02.2008, 12:50

Re: A YASD... and a bug

Post by Ace » Wed 09.07.2008, 14:03

imho the spell should still teleport on fields with items but w/o players or monsters.
if the monster is surrounded by monsters = no free spot, then port the player to the closest visible spot.

if the player sport is the only free spot in LOS of the Teleport_to monster then it should do another spell instead or skip.

Jug
King Lich
Posts: 342
Joined: Sat 26.10.2002, 15:00
Location: UK
Contact:

Re: A YASD... and a bug

Post by Jug » Wed 09.07.2008, 17:34

If our behaviour matches Angband and you suspect it's a bug then it would indeed be best to report this as a bug upstream to the Angband devs.

You can raise bug reports directly here: http://dev.rephial.org/trac

Ashi
Giant Mottled Ant Lion
Posts: 218
Joined: Sun 10.11.2002, 19:58

Re: A YASD... and a bug

Post by Ashi » Wed 09.07.2008, 18:14

I had the same thing happen to me a few days ago: I opened up a corridor in a vault filled with traps and Ungoliant, and she summoned a pack of Phase spiders. The spiders of course commanded me to return, but since there was no space in the corridor, it dropped me in the middle of a large room in the vault. Fortunately there was nothing hazardous in the room...

This death reminds me of an incident in 2002 around the beginning of the Crimson era. A warrior named Xander found a *GV* at 6350 ft and explored it extremely carefully, detecting and disarming all traps. He even compared what he saw with the txt file to make sure he got every single one. At one point he came to a square where the txt file indicated there should be a trap, but no matter how much he searched or used detection, no trap showed up. He even tried to disarm the square, resulting in the message "You see nothing there to disarm." So he moved onto the square, and BAM, it was a summon trap that surrounded him with Chaos hounds and he died. I think Crimson's official ruling was that since he had used detection and tried to disarm the square, the death was due to an unknown bug and not any fault of the player, and so the character would be restored using mysterious admin powers.

PowerWyrm
Balrog
Posts: 1574
Joined: Sun 27.11.2005, 15:57

Re: A YASD... and a bug

Post by PowerWyrm » Thu 10.07.2008, 11:54

http://dev.rephial.org/trac/ticket/623

I'll see how the Angband dev team processes this ticket...

Post Reply