Crash bug

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Jungle_Boy
    Swordsman
    • Nov 2008
    • 434

    Crash bug

    I found a crash in v4 rev 1d1b14a. I have attached the save file one step before the crash. To duplicate, open the save file and move left next to the gray mushroom. This is running in windows XP, using Nomad's tiles, it looks like sometimes it resets the graphics as well.

    PS Go me, I'm the first person besides Magnate to start a thread in the v4 forum!
    Attached Files
    My first winner: http://angband.oook.cz/ladder-show.php?id=10138
  • Nomad
    Knight
    • Sep 2010
    • 958

    #2
    1. Yep, I can reproduce this, even if I wander away for a while and then return and step next to the mushroom.

    2. If you learn both of the available spells, it stops happening. If you learn just one spell, it still crashes. (I tried this on a hunch since my warriors haven't had any crash problems in this version.)

    So the crash appears to be triggered by getting confused while you have unlearned spells available.

    Comment

    • Magnate
      Angband Devteam member
      • May 2007
      • 5110

      #3
      Interesting. Can you reproduce this in the V dev versions? There was a recent change to the code about the Study message - it now only refers to books you're currently carrying, rather than all books. I wonder if it's related to this. (No idea why it would be dependent on confusion though.)

      Doesn't seem to have anything to do with affixes, anyway ;-)
      "Been away so long I hardly knew the place, gee it's good to be back home" - The Beatles

      Comment

      • ekolis
        Knight
        • Apr 2007
        • 921

        #4
        Originally posted by Magnate
        (No idea why it would be dependent on confusion though.)
        Haven't played Angband in a while, but if I'm not mistaken, you can't read books while confused... I wonder if this bug could also be reproduced by dropping all your spellbooks? In both cases you'd have no readable books
        You read the scroll labeled NOBIMUS UPSCOTI...
        You are surrounded by a stasis field!
        The tengu tries to teleport, but fails!

        Comment

        • Jungle_Boy
          Swordsman
          • Nov 2008
          • 434

          #5
          I also confirmed that the crash happens when attacked by a brown mold, so it definitely appears related to confusion.
          My first winner: http://angband.oook.cz/ladder-show.php?id=10138

          Comment

          • Magnate
            Angband Devteam member
            • May 2007
            • 5110

            #6
            Originally posted by Jungle_Boy
            I also confirmed that the crash happens when attacked by a brown mold, so it definitely appears related to confusion.
            Any news on whether it also happens with the latest 3.4-dev version? That will make it *much* easier to trace ...

            EDIT: I've opened ticket #1570 for this, which links to this thread.
            Last edited by Magnate; October 28, 2011, 11:13.
            "Been away so long I hardly knew the place, gee it's good to be back home" - The Beatles

            Comment

            • Faust
              Adept
              • Apr 2007
              • 129

              #7
              latest 3.4-dev crashed when I walked into an undetected confusion trap. Don't have a save file handy.

              Comment

              • Magnate
                Angband Devteam member
                • May 2007
                • 5110

                #8
                Originally posted by Faust
                latest 3.4-dev crashed when I walked into an undetected confusion trap. Don't have a save file handy.
                Ooh. Did you by any chance have any unlearned spells in your current books? (i.e. Did you have a "Study (x)" message?)
                "Been away so long I hardly knew the place, gee it's good to be back home" - The Beatles

                Comment

                • Faust
                  Adept
                  • Apr 2007
                  • 129

                  #9
                  yeh I hadn't learnt any of the spells in the book I was carrying.

                  Comment

                  • Magnate
                    Angband Devteam member
                    • May 2007
                    • 5110

                    #10
                    Originally posted by Faust
                    yeh I hadn't learnt any of the spells in the book I was carrying.
                    Then I suspect it is the same bug, and I suspect it's from commit eb98584293, though I'm not certain of that because there's nothing obviously wrong with the commit itself. I think it's not an interaction of the actual game effects, but of the game wanting to print "Confused" and "Study (x)" on the status line at the same time.
                    "Been away so long I hardly knew the place, gee it's good to be back home" - The Beatles

                    Comment

                    • Nomad
                      Knight
                      • Sep 2010
                      • 958

                      #11
                      Found an issue that appears to be related: playing v4, I leveled up while confused and got the 'Study (1)' message, greyed out; moving or trying to rest triggers a 'You are too confused!' message. (Staying still with the 5 key seems to be okay.) Once I recovered from the confusion everything was fine, no crash.

                      Savefile of character in mid-confusion is attached.
                      Attached Files

                      Comment

                      • noz
                        Rookie
                        • Dec 2009
                        • 3

                        #12
                        I can reproduce this in v4 with your savefile - thanks!

                        What's interesting at first glance (it didn't crash for me as I stepped next to the mushroom, but as I tried to step away) is that it crashed 48117 calls down the stack. Yes, that's 48 thousand calls down!

                        Shouldn't be that hard to track down the recursion... working on it now

                        Comment

                        • noz
                          Rookie
                          • Dec 2009
                          • 3

                          #13
                          prt_study() now checks player_can_study_book() to see if the "Study" message should be in grey, which calls player_can_cast(), which will print a message saying why not <<== here's the problem ==. Deep down in the message printing, redraw_stuff() will call update_status_line(), which calls prt_study().

                          In my view, printing a message during a game mechanic check is a layer violation, and that's what causes this problem. Unfortunately the fix (done properly at least) isn't trivial, other than reverting the change that greys out the study message.

                          Comment

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