V1626 has been really stable for me so far but crashed yesterday. I quaffed a potion of dragon breath right off the floor and the system crashed. I can't remember if it was a single potion or not but the last message said that the potion shattered. I think I breathed frost and mayhave shattered the potion that I just drank? Anyone else experienced this?
Crash in V 3.1.1 v1626
Collapse
X
-
That seems like a unique problem. I haven't seen it, but it makes sense. You use a consumable that destroys itself, which results in the object being deleted twice as the code is currently written, obviously a bad thing. The closest thing I can think of is the rod of elec balls destroying itself, but no crash since the rod isn't a consumable. A scroll of destruction is no problem since the square you are on is not affected. -
Fixed in r1683 (see http://trac.rephial.org/ticket/975).
Or did you just add IGNORE_COLD to that particular potion?
I suppose the speed of the fix answers my question.Comment
-
Was this done the right way, by deleting the object when used but before the effect happens, and saving a pointer to the kind_info and later modifying kind learning when anything is learned? That's tricky to do when some consumables can be aborted in the functions that produce effects. The optional selection hook (affected item, obj, letter, or dir etc) might have to be separated from the effect code, or else you need to be able to undelete.
Or did you just add IGNORE_COLD to that particular potion?
I suppose the speed of the fix answers my question.
It's not as much of a hack as IGNORE_COLD but more so than refactoring a bunch of effect_do() and/or cmd-obj.c
EDIT: And of course you can always check the cvs diff if you're curious...Comment
Comment