4.0.2 Bugs

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Nick
    Vanilla maintainer
    • Apr 2007
    • 9638

    Originally posted by Werbaer
    Crash bug in 4.0.2 windows version.

    Digging through rubble. Light goes out the moment the digging is done.
    Edit to add: Light source was a torch. Auto-pickup is on.

    Code:
    Assertion failed!
    Program: ...
    File: obj-pile.c
    Line: 134
    Expression: pile_contains(*pile,obj)
    Last messages:
    Code:
    Your light is growing faint.
    You dig in the rubble. <17x>
    You have removed the rubble.
    Your light has gone out!
    I can neither reproduce this, or see why the code here should be failing. Any clues, or a savefile if it happens again, would be welcome.
    One for the Dark Lord on his dark throne
    In the Land of Mordor where the Shadows lie.

    Comment

    • Nick
      Vanilla maintainer
      • Apr 2007
      • 9638

      Originally posted by PowerWyrm
      My variant just crashed while processing objects. Found out the following loop is faulty:

      Code:
      	while (obj) {
      		struct object *next = obj->next; [B][I]<-- crashes here[/I][/B]
      
      		/* do something */
      
      		/* Delete the object */
      		object_delete(&obj);
      		obj = next;
      	}
      When leaving the loop, "next" being local to the loop is freed, "obj" points to nowhere...
      As redlumf points out upthread, there is nothing wrong with this loop as such. My first guess for what would have caused a crash is that something else corrupted the object structure, so that obj->next became an illegal access.
      One for the Dark Lord on his dark throne
      In the Land of Mordor where the Shadows lie.

      Comment

      • AnonymousHero
        Veteran
        • Jun 2007
        • 1393

        Originally posted by Nick
        As redlumf points out upthread, there is nothing wrong with this loop as such. My first guess for what would have caused a crash is that something else corrupted the object structure, so that obj->next became an illegal access.
        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.

        [2] There are actually some interesting cases of this in the Linux kernel which have caused security issues, but I don't think it's particularly pertinent to Angband, though it can obviously still happen and obscure other errors when using optimizations. The compiler is quite unlikely to be able to "peer through" object_delete
        Last edited by AnonymousHero; October 11, 2015, 21:05.

        Comment

        • Timo Pietilä
          Prophet
          • Apr 2007
          • 4096

          Originally posted by Nick
          I can neither reproduce this, or see why the code here should be failing. Any clues, or a savefile if it happens again, would be welcome.
          I'm guessing that light actually goes out while digging, and it doesn't disturb the digging repeat, so immediately after digging is successful lights go out.

          [nevermind, I just read the referred post and it talks about crash, not odd message sequence]

          Comment

          • PowerWyrm
            Prophet
            • Apr 2008
            • 2986

            Originally posted by Nick
            As redlumf points out upthread, there is nothing wrong with this loop as such. My first guess for what would have caused a crash is that something else corrupted the object structure, so that obj->next became an illegal access.
            Yeah my bad. Didn't reproduce the crash either after having fixed two occurences of object_delete called on inventory objects without doing a gear_excise first.
            PWMAngband variant maintainer - check https://github.com/draconisPW/PWMAngband (or http://www.mangband.org/forum/viewforum.php?f=9) to learn more about this new variant!

            Comment

            • PowerWyrm
              Prophet
              • Apr 2008
              • 2986

              Originally posted by Rowan
              Just now I got a message with no subject, that said:

              makes a soft 'pop'.

              I'm used to it saying "Something makes a soft 'pop'," when it's about an unseen monster. I don't know much about programming- is this just a case of the message not having an assigned value because the monster is offscreen?

              DLvl 39; it could have been any number of things teleporting/phasedooring as I approached a big, dark room. Seems minor, but thought I'd report it since I don't see anyone mentioning it yet.
              The typo is in monster_spell.txt. There are other typos I'm currently reviewing, I'll note them all in a post.
              PWMAngband variant maintainer - check https://github.com/draconisPW/PWMAngband (or http://www.mangband.org/forum/viewforum.php?f=9) to learn more about this new variant!

              Comment

              • PowerWyrm
                Prophet
                • Apr 2008
                • 2986

                Originally posted by PowerWyrm
                The typo is in monster_spell.txt. There are other typos I'm currently reviewing, I'll note them all in a post.
                And here we go:

                - ARROW_4: "thwang" (no idea if it's correct, it's spelled "twang" everywhere else)
                - BA_POIS: it was "creates a cloud of poison" in 3.5
                - BA_WATE: it was "creates a whirlpool of water" in 3.5 (and "Something gurgles")
                - CAUSE_2: missing punctuation (--> "points at you and curses horribly!")
                - CAUSE_4: idem (2x "DIE!".)
                - HASTE: "{name} mutters." (not when blind --> "Something mutters.")
                - TPORT: missing "Something" ("Something makes a soft 'pop'.")
                - S_KIN: "You hear something appear nearby!" (S_KIN is not limited to 1 --> "some things")
                PWMAngband variant maintainer - check https://github.com/draconisPW/PWMAngband (or http://www.mangband.org/forum/viewforum.php?f=9) to learn more about this new variant!

                Comment

                • Nick
                  Vanilla maintainer
                  • Apr 2007
                  • 9638

                  Originally posted by PowerWyrm
                  ARROW_4: "thwang" (no idea if it's correct, it's spelled "twang" everywhere else)
                  I think a thwang is louder than a twang

                  Originally posted by PowerWyrm
                  CAUSE_4: idem (2x "DIE!".)
                  This looks OK to me - 'DIE!' is what the monster is saying, and it's in quotes because it's being referred to by the message.
                  One for the Dark Lord on his dark throne
                  In the Land of Mordor where the Shadows lie.

                  Comment

                  • Nick
                    Vanilla maintainer
                    • Apr 2007
                    • 9638

                    OK, I believe all outstanding bugs for 4.0.2 are either fixed (latest build will be up soon), or filed here. Note that I've confirmed the "too many Dracoliches" bug.
                    One for the Dark Lord on his dark throne
                    In the Land of Mordor where the Shadows lie.

                    Comment

                    • Ingwe Ingweron
                      Veteran
                      • Jan 2009
                      • 2129

                      Originally posted by Nick
                      OK, I believe all outstanding bugs for 4.0.2 are either fixed (latest build will be up soon), or filed here. Note that I've confirmed the "too many Dracoliches" bug.
                      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.
                      “We're more of the love, blood, and rhetoric school. Well, we can do you blood and love without the rhetoric, and we can do you blood and rhetoric without the love, and we can do you all three concurrent or consecutive. But we can't give you love and rhetoric without the blood. Blood is compulsory. They're all blood, you see.”
                      ― Tom Stoppard, Rosencrantz and Guildenstern are Dead

                      Comment

                      • Derakon
                        Prophet
                        • Dec 2009
                        • 9022

                        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.
                        Pretty sure it existed in 3.5. Ditto with Identify scrolls/staves, which prompt for the item to ID.

                        Comment

                        • Nomad
                          Knight
                          • Sep 2010
                          • 958

                          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.
                          I'd think the solution should be that the potion IDs even if you don't choose a direction. (Seems to me not choosing would be the equivalent of spitting the potion back into the bottle, and you'd probably notice if you'd taken a mouthful of Dragon's Breath...)

                          Comment

                          • Ingwe Ingweron
                            Veteran
                            • Jan 2009
                            • 2129

                            Originally posted by Derakon
                            Pretty sure it existed in 3.5. Ditto with Identify scrolls/staves, which prompt for the item to ID.
                            Except it didn't identify when the direction wasn't chosen. Nomad's solution sounds like a reasonable justification. The change needed would be for the potion to identify when a direction is not chosen, much like the identify scroll/staff/rod when no item is chosen.
                            “We're more of the love, blood, and rhetoric school. Well, we can do you blood and love without the rhetoric, and we can do you blood and rhetoric without the love, and we can do you all three concurrent or consecutive. But we can't give you love and rhetoric without the blood. Blood is compulsory. They're all blood, you see.”
                            ― Tom Stoppard, Rosencrantz and Guildenstern are Dead

                            Comment

                            • PowerWyrm
                              Prophet
                              • Apr 2008
                              • 2986

                              Originally posted by PowerWyrm
                              The typo is in monster_spell.txt. There are other typos I'm currently reviewing, I'll note them all in a post.
                              Forgot:
                              - a missing period for "breathes gravity"
                              - "Something mumbles loudly." for BA_DARK (3.5)
                              - a missing period for "Something commands you to go away"
                              PWMAngband variant maintainer - check https://github.com/draconisPW/PWMAngband (or http://www.mangband.org/forum/viewforum.php?f=9) to learn more about this new variant!

                              Comment

                              • Timo Pietilä
                                Prophet
                                • Apr 2007
                                • 4096

                                Originally posted by Nick
                                OK, I believe all outstanding bugs for 4.0.2 are either fixed (latest build will be up soon), or filed here. Note that I've confirmed the "too many Dracoliches" bug.
                                What about nexus resist preventing you from using teleport level? That was in one of the nightlies. Is that fixed? Can't find it from http://trac.rephial.org/

                                Comment

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