|Anonymous | Login||2020-06-04 12:26 CEST|
|Main | My View | View Issues | Change Log | Wiki | Tavern | News|
|Viewing Issue Simple Details|
|ID||Category||Severity||Reproducibility||Date Submitted||Last Update|
|0006846||[DCSS] Bug Report||crash||always||2013-03-30 22:57||2013-04-04 23:24|
|Status||closed||Product Branch||0.12 ancient branch|
|Summary||0006846: Monsters picking up loot in okawaru_arena vault causes crash|
If you allow a friendly monster to pick up one of the pieces of reward loot in okawaru_arena_lexackson, Crawl crashes. Dump: http://dobrazupa.org/morgue/MarvinPA/crash-MarvinPA-20130330-215245.txt [^]
Appears to be related to both the monster and loot being incinerated by lava, and then the (dead) monster trying to put on the (incinerated) item?
|Tags||No tags attached.|
edited on: 2013-03-31 22:25
Okay I have the specifics.
Basically, when anything grabs one of those items, an event is fired. The lua code in the vault detects the event, and replaces whichever square you are not on with lava. If you are not on either square because a monster picked up the item, then it replaces both of them (destroying both items and the monster.)
The event is fired partway through the monster's pickup method. Just after firing the event, that method tries to print a message telling you about the monster picking up the item (unless you are out of sight). Of course, since the monster was just killed, this causes a crash. If you ARE out of sight, there's no message and no crash. The bug is present but hidden.
Whether or not the monster is an ally turned out to be a red herring. It's just that allies are usually in your sight.
Firing events that callback to LUA code is pretty risky. There's no way for the firer to know what the LUA is doing. We can either be incredibly pedantic about testing invariants after firing events (and I mean REALLY pedantic. "if (!this || !this->alive) return;"), or delay all event firings until a safe point, which would mess with the mechanics of the game, or just trust that the LUA code knows what its doing. Right now we are taking the last approach, and in this case, the LUA code did NOT know what it was doing.
Simple fix: make the items no_pickup. This way, you can only get monsters being dunked in lava during the players turn. Presumably Crawl can handle monster death at any arbitrary time while the player is moving.
It's not enough to change the vault so it only dunks the other square. You would have to make sure the player wasn't on the other square, otherwise you would have created a possible instadeath. And if you do check, and prevent the instadeath, then you have an exploit, because the player can stand on one item while a monster grabs the other and thus get both of them.
If we could use LUA to just remove specific items, then we could get rid of the lava entirely and solve all these problems at once.
Grunt has a patch that implements the simple fix.
Also "acquire armour no_pickup" is broken, hence the "no_pickup any armour level:-3".
|0.12-a0-3210-g24f3786 contains the aforementioned simple fix.|
|2013-03-30 22:57||Kate||New Issue|
|2013-03-31 22:22||blackcustard||Note Added: 0022053|
|2013-03-31 22:25||sgrunt||Note Added: 0022054|
|2013-03-31 22:25||sgrunt||Assigned To||=> sgrunt|
|2013-03-31 22:25||sgrunt||Status||new => resolved|
|2013-03-31 22:25||sgrunt||Resolution||open => done|
|2013-03-31 22:25||sgrunt||Fixed in Branch||=> 0.12 development branch|
|2013-03-31 22:25||blackcustard||Note Edited: 0022053|
|2013-04-04 23:24||Kate||Status||resolved => closed|
|Mantis 1.1.8[^] Copyright © 2000 - 2009 Mantis Group|