4.0.2 Bugs

Collapse
X
 
  • Time
  • Show
Clear All
new posts

  • Nick
    replied
    Originally posted by AnonymousHero
    Since the API is already such that it can, I think object_delete should actually set the pointed-to-pointer to NULL[1]. In my experience it's a much more reliable way of causing an immediate bad access to fail rather than relying on something like ASAN/UBSAN/&c. Obviously, I realize that either is undefined behavior, but in practice NULL access is pretty reliable at causing an immediate failure as long as the compiler doesn't optimize it away[2].

    [1] AFAICT from current master, it doesn't.
    Just checked this - it actually does:
    Code:
    /**
     * Delete an object and free its memory, and set its pointer to NULL
     */
    void object_delete(struct object **obj_address)
    {
    	struct object *obj = *obj_address;
    	struct object *prev = obj->prev;
    	struct object *next = obj->next;
    
    	/* Free slays and brands */
    	if (obj->slays)
    		free_slay(obj->slays);
    	if (obj->brands)
    		free_brand(obj->brands);
    
    	/* Check any next and previous objects */
    	if (next) {
    		if (prev) {
    			prev->next = next;
    			next->prev = prev;
    		} else {
    			next->prev = NULL;
    		}
    	} else if (prev) {
    		prev->next = NULL;
    	}
    
    	/* If we're tracking the object, stop */
    	if (player && player->upkeep && obj == player->upkeep->object)
    		player->upkeep->object = NULL;
    
    	mem_free(obj);
    	*obj_address = NULL;
    }

    Leave a comment:


  • Egavactip
    replied
    These have possibly been mentioned before, so apologies.

    The spell "perception" is misspelled "pereption."

    I think some of the item descriptions refer to features no longer in Angband. I wish I could remember which ones.

    There is a glitch for me in which, after I look at the map, my character's icon disappears from the screen and only reappears after I have moved a square.

    There are occasional graphic flickers as I move across the screen (this is Windows, fwiw).

    Leave a comment:


  • redlumf
    replied
    Harmless bug.

    in file init.c arround line 4363 you have to duplicate the string (cause of the 'static' buffer in vformat), otherwise the init messages are wrong.

    the following works for me.
    Code:
                    char *msg=string_make(format("Initializing %s...", pl[i].name));
    		event_signal_message(EVENT_INITSTATUS, 0, msg);
    		string_free(msg);
    Of course you never see those messages as they zap in an instant, but I kind of ported the 4.0.1 to amiga and the init part is a minute or two, so there...

    Leave a comment:


  • Werbaer
    replied
    Originally posted by zog
    I don't know if this is a bug or a feature, but Detect Treasure detects ignored items in unvisited squares. Very frustrating to clear a pit only to discover I was trying to fish out a Scroll of Summon Monster or something.
    A feature.
    Detect treasure doesn't tell you what the items are, so your character doesn't know whether he wants to ignore them until he gets to see them.

    Leave a comment:


  • zog
    replied
    I don't know if this is a bug or a feature, but Detect Treasure detects ignored items in unvisited squares. Very frustrating to clear a pit only to discover I was trying to fish out a Scroll of Summon Monster or something.

    Leave a comment:


  • Derakon
    replied
    Originally posted by fph
    Oh - good point. I never realized that a puny shrieker could be a problem during the final fight. Maybe he summoned one at some point, and I let it take one turn because I didn't consider it an immediate danger. I'll pay more attention in the future to see if this is the case, thanks.
    There's a few other monsters that can shriek -- Crebain, Shambling Mounds, Neekerbreekers, Silent Watchers, and Shimmering Vortices. Generally you want to take shriekers down ASAP because of the multiplying threat potential they represent for all the other monsters in the area.

    Leave a comment:


  • fph
    replied
    Originally posted by Derakon
    If there's any shriekers in the area, they could have hasted Morgoth. But I think that's the only way he can get faster than +30 speed.
    Oh - good point. I never realized that a puny shrieker could be a problem during the final fight. Maybe he summoned one at some point, and I let it take one turn because I didn't consider it an immediate danger. I'll pay more attention in the future to see if this is the case, thanks.

    Leave a comment:


  • Nick
    replied
    Originally posted by Ingwe Ingweron
    Is there a reason the General Store will not accept/buy unidentified ammunition, even though it sells ammunition?
    People need inconsistencies to discuss

    Leave a comment:


  • Derakon
    replied
    Originally posted by Ingwe Ingweron
    Is there a reason the General Store will not accept/buy unidentified ammunition, even though it sells ammunition? @ can still go to the Weaponsmith or the Black Market, I know. Nonetheless, I don't see the logic of the exception.
    I don't think the general store buys anything. So I guess in that sense it's more consistent.

    Leave a comment:


  • Ingwe Ingweron
    replied
    Is there a reason the General Store will not accept/buy unidentified ammunition, even though it sells ammunition? @ can still go to the Weaponsmith or the Black Market, I know. Nonetheless, I don't see the logic of the exception.

    Leave a comment:


  • PowerWyrm
    replied
    Originally posted by Nick
    Right - this might explain the crash on torch dying during digging I failed to find upthread. Which loop is it that the bad object_delete() is called in?

    EDIT: I assume it's the one in inven_damage(). I should actually check them all.
    It's indeed the one in inven_damage(). I've checked every occurence of object_delete() in my code, and that was the only loop.

    Leave a comment:


  • PowerWyrm
    replied
    Originally posted by Ingwe Ingweron
    Information leak bug. If @ quaffs an unidentified potion you can get the message something like, "Choose a direction..." Ah, that's !Dragon's Breath, but I shouldn't know that until after it's identified. And since I didn't choose a direction, it is just a "Light Brown Potion". Not sure of what the solution should be. I don't remember the problem existing in 3.5.1.
    Simply don't ask for direction when quaffing an unid potion of dragon breath, so the breath acts like a blast centered on the player. In my variant, I had the opposite problem (dragon breath was never asking for a direction).

    Leave a comment:


  • Derakon
    replied
    Originally posted by fph
    I am at +36 speed, and I definitely noticed Morgoth getting a double move on me in several occasions. If I understand correctly how speed works, he shouldn't be able to do it, am I right? I am playing 4.0.2-22-gcd84ffe.

    The attached savefile is taken immediately after a double move.
    If there's any shriekers in the area, they could have hasted Morgoth. But I think that's the only way he can get faster than +30 speed.

    Leave a comment:


  • fph
    replied
    I am at +36 speed, and I definitely noticed Morgoth getting a double move on me in several occasions. If I understand correctly how speed works, he shouldn't be able to do it, am I right? I am playing 4.0.2-22-gcd84ffe.

    The attached savefile is taken immediately after a double move.
    Attached Files

    Leave a comment:


  • Nick
    replied
    Originally posted by PowerWyrm
    Here's a nasty one: the game crashed when a fire breath destroyed the last torch in inventory. Looking at the code, it's one of those cases of calling object_delete() within a "for (obj = p->gear; obj; obj = obj->next)" loop.
    Right - this might explain the crash on torch dying during digging I failed to find upthread. Which loop is it that the bad object_delete() is called in?

    EDIT: I assume it's the one in inven_damage(). I should actually check them all.
    Last edited by Nick; October 15, 2015, 13:36. Reason: Answered my own question

    Leave a comment:

Working...
😀
😂
🥰
😘
🤢
😎
😞
😡
👍
👎