Bugs in 4.2.0

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

    #76
    Originally posted by scrarth
    Encountered a couple of bugs in a 4.2.0 game, played on a Windows 7 machine.

    The first bug was encountered when targeting and then teleporting away Gothmog, and then casting the spell Single Combat on an enemy using a direction key (i.e. not targeting). This resulted in the error attached as angband_error1.jpg. After the game crashed and reloading the save I was in the Single Combat room with Gothmog, not the enemy I actually cast the spell on. Fortunately I was able to beat him, but it was definitely not a fight I was expecting.

    Steps to reproduce
    1. Target an enemy using * or '
    2. Teleport away using the rod of teleport in inventory
    3. Stand next to a different enemy and cast Single Combat, using an arrow key instead of * or '

    Some time after this when I tried to book cast recall out of the dungeon, I get the error message attached in angband_error2.png (side note, why does the website upload the first as .jpg and the second as .png? They're both .pngs). I can't remember for sure but I think this was the first time I recalled since encountering the first bug, so the two might be related.

    Steps to reproduce
    1. Cast Recall from book

    I've attached a savefile for convenience, both bugs are reproducible in it. I'd really appreciate it if the savefile could be fixed, hopefully the bugs aren't too hard to track down.
    Thanks for the detailed report. I think I have an idea what caused it - Single Combat requires a targeted monster, and so it used the one you had previously targeted, which caused bad things to happen because he was out of LoS etc. I'll look at the savefile.
    One for the Dark Lord on his dark throne
    In the Land of Mordor where the Shadows lie.

    Comment

    • DavidMedley
      Veteran
      • Oct 2019
      • 1004

      #77
      Tasty Coins!

      I used Vampire Strike on creeping adamantite coins. Yummy!

      I also was surprised that it was resistant to acid. Seems like the ideal weapon to use against metal.
      Last edited by DavidMedley; November 8, 2019, 23:57.
      Please like my indie game company on Facebook! https://www.facebook.com/RatherFunGames

      Comment

      • Derakon
        Prophet
        • Dec 2009
        • 9022

        #78
        Adamantite, and mithril, are both corrosion-proof. That holds for armor made of the metal just as much as it does for monsters made of it.

        Comment

        • backwardsEric
          Knight
          • Aug 2019
          • 527

          #79
          witch/blackguard/slice of meat with original tiles

          With 4.2.0 using the original tiles on Mac OS X, witches and blackguards are rendered as 'p's and slices of meat are rendered as ','s.

          Comment

          • backwardsEric
            Knight
            • Aug 2019
            • 527

            #80
            memory leak selling item with brand, curse, or slay

            Running 4.2.0 on a Mac and collecting a report of memory leaks from it with the Leaks instrument in XCode reported leaks of 32 or 240 bytes where the memory was allocated from this partial call stack (I've omitted the functions before process_command()):

            Code:
            mem_zalloc()
            object_copy()
            object_copy_amt()
            store_sell()
            store_menu_handle()
            menu_select()
            use_store()
            event_signal()
            move_player()
            do_cmd_walk()
            process_command()
            There was also a leak of 32 bytes where the memory was allocated from this partial call stack:

            Code:
            mem_zalloc()
            object_copy()
            object_copy_amt()
            do_cmd_stash()
            process_command()
            From the code, space may be allocated for slays/brands/curses in the temporary object used in either store_sell() or do_cmd_stash() but that space is not released before the temporary object falls out of scope. The attached file is a patch from git format-patch for store.c and ui-store.c to plug the leak.

            object_info_ego() in obj-info.c and wiz_reroll_item() in wiz-debug.c also look like they could leak the memory for slays/brands/curses, but I didn't exercise those functions when profiling Angband with the Leaks instrument.
            Attached Files

            Comment

            • Nick
              Vanilla maintainer
              • Apr 2007
              • 9634

              #81
              Originally posted by scrarth
              I've attached a savefile for convenience, both bugs are reproducible in it. I'd really appreciate it if the savefile could be fixed, hopefully the bugs aren't too hard to track down.
              OK, fixed savefile attached. The saved town was the problem, so when you go back there you will find the layout different; the shop and your home should be unaffected. Let me know if you have any further problems.
              Attached Files
              One for the Dark Lord on his dark throne
              In the Land of Mordor where the Shadows lie.

              Comment

              • DavidMedley
                Veteran
                • Oct 2019
                • 1004

                #82
                Originally posted by Derakon
                Adamantite, and mithril, are both corrosion-proof. That holds for armor made of the metal just as much as it does for monsters made of it.
                Makes sense
                Please like my indie game company on Facebook! https://www.facebook.com/RatherFunGames

                Comment

                • DavidMedley
                  Veteran
                  • Oct 2019
                  • 1004

                  #83
                  Are You Stoned?

                  When I'm hallucinating, if I do things like hit space, escape, browse a book, etc., no time passes but my hallucinations flicker. Shouldn't they only change when time passes? Pretty easy to determine whether something is actually there or not this way.
                  Please like my indie game company on Facebook! https://www.facebook.com/RatherFunGames

                  Comment

                  • scrarth
                    Scout
                    • Nov 2019
                    • 43

                    #84
                    Originally posted by Nick
                    OK, fixed savefile attached. The saved town was the problem, so when you go back there you will find the layout different; the shop and your home should be unaffected. Let me know if you have any further problems.
                    No luck on my end unfortunately, I still get the chunk_copy() level bounds failed error message.

                    Comment

                    • DavidMedley
                      Veteran
                      • Oct 2019
                      • 1004

                      #85
                      Originally posted by Derakon
                      Adamantite, and mithril, are both corrosion-proof. That holds for armor made of the metal just as much as it does for monsters made of it.
                      Mithril Golem does not resist acid, however.
                      Please like my indie game company on Facebook! https://www.facebook.com/RatherFunGames

                      Comment

                      • Derakon
                        Prophet
                        • Dec 2009
                        • 9022

                        #86
                        Originally posted by DavidMedley
                        Mithril Golem does not resist acid, however.
                        Good news! We're in the 4.2.0 bugs thread, so hopefully Nick will see this.

                        (They may have been made vulnerable so that mages would have some way to fight them...)

                        Comment

                        • Nick
                          Vanilla maintainer
                          • Apr 2007
                          • 9634

                          #87
                          Originally posted by scrarth
                          No luck on my end unfortunately, I still get the chunk_copy() level bounds failed error message.
                          Sorry, I attached the wrong one

                          This one should be OK - I recalled back to town from your save.
                          Attached Files
                          One for the Dark Lord on his dark throne
                          In the Land of Mordor where the Shadows lie.

                          Comment

                          • scrarth
                            Scout
                            • Nov 2019
                            • 43

                            #88
                            Originally posted by Nick
                            Sorry, I attached the wrong one

                            This one should be OK - I recalled back to town from your save.
                            Yep, it's working fine now. Thanks a bunch for that!

                            Comment

                            • backwardsEric
                              Knight
                              • Aug 2019
                              • 527

                              #89
                              Other memory leaks

                              Other memory leaks reported by XCode's Leaks instrument for Angband 4.2.0:

                              1) Some "known" versions of objects allocated from the following partial call stacks below (omitting the calls before process_command()) were leaked.

                              mem_alloc()
                              mem_zalloc()
                              object_new()
                              object_split()
                              gear_object_for_use()
                              ranged_helper()
                              do_cmd_fire()
                              process_cmd()

                              mem_alloc()
                              mem_zalloc()
                              object_new()
                              object_see()
                              square_know_pile()
                              square_note_spot()
                              update_one()
                              update_view()
                              move_player()
                              do_cmd_walk()
                              process_command()

                              mem_alloc()
                              mem_zalloc()
                              object_new()
                              object_sense()
                              square_sense_pile()
                              effect_handler_SENSE_OBJECTS()
                              effect_do()
                              use_aux()
                              do_cmd_read_scroll()
                              process_command()

                              The attached file, object-absorb-known-object-leak-patch.txt, patches object_absorb(), but that doesn't eliminate all of those leaks.

                              2) An object allocated from this partial call stack,

                              mem_alloc()
                              mem_zalloc()
                              object_new()
                              make_object()
                              place_object()
                              alloc_object()
                              alloc_objects()
                              classic_gen()
                              cave_generate()
                              prepare_next_level()

                              , was leaked.

                              3) The string allocated from this partial call stack,

                              mem_alloc()
                              string_make()
                              cmd_set_arg_string()
                              cmd_get_string()
                              do_cmd_inscribe()
                              process_command()

                              was leaked when inscribing an object.

                              4) During character creation, there's a leak if the player edits the character background information. The partial call stack for where the allocations occur is

                              mem_realloc()
                              textblock_calculate_lines()
                              edit_text()
                              textui_do_birth()
                              play_game()

                              5) During character creation, the background or quest information can be leaked, especially if the player backtracks to select a different combination of race and class. The partial call stacks for where the allocations occurred were:

                              string_append()
                              player_generate()
                              do_cmd_choose_race()
                              process_command()

                              string_append()
                              player_generate()
                              do_cmd_choose_class()
                              process_command()

                              string_append()
                              player_generate()
                              do_cmd_birth_reset()
                              process_command()

                              string_append()
                              do_cmd_roll_stats()
                              process_command()

                              string_make()
                              do_cmd_choose_history()
                              process_command()

                              string_append()
                              player_generate()
                              do_cmd_birth_init()
                              process_command()

                              mem_zalloc()
                              player_quests_reset()
                              player_init()
                              do_cmd_birth_reset()
                              process_command()

                              string_make()
                              player_quests_reset()
                              player_init()
                              do_cmd_birth_reset()
                              process_command()

                              The attached file, player-birth-memory-leaks-patch.txt, has patches to plug those leaks and the leak in (4).
                              Attached Files

                              Comment

                              • backwardsEric
                                Knight
                                • Aug 2019
                                • 527

                                #90
                                File not closed in remove_old_dump() if error

                                In ui-prefs.c's remove_old_dump(), if there is an error opening the new file, the current file won't be closed. The attached patch fixes that.
                                Attached Files

                                Comment

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