Borg bugs and feature requests

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • agoodman
    Adept
    • Jan 2011
    • 148

    those detection arrays are going to be the death of me. I am going to add some debugging around them and try to track down what is going on.

    Comment

    • eschiss1
      Apprentice
      • May 2013
      • 59

      Anyone know if any of these crashes may have been fixed in 4.2.6-216?

      Edit: tried out the new version. Gets to town (apparently has save on changing level on, which is good), crashes (wasn't paying attention at the time...), reopened, I turn on borg again, crashes again before I can say mouse...
      Last edited by eschiss1; September 23, 2026, 19:50.

      Comment

      • agoodman
        Adept
        • Jan 2011
        • 148

        Originally posted by eschiss1
        Anyone know if any of these crashes may have been fixed in 4.2.6-216?

        Edit: tried out the new version. Gets to town (apparently has save on changing level on, which is good), crashes (wasn't paying attention at the time...), reopened, I turn on borg again, crashes again before I can say mouse...
        Can you get me the save file that crashes? Best to wrap in angband.ini and borg.txt if you can.

        https://github.com/angband/angband/r...216-g1d2ad35a2 should have most of the fixes but resurrection is still being worked on. There are a couple of more issues coming but I wouldn't think we would have crashes that fast right now.

        Comment

        • backwardsEric
          Knight
          • Aug 2019
          • 590

          Originally posted by agoodman
          Can you get me the save file that crashes? Best to wrap in angband.ini and borg.txt if you can.
          For the macOS front end, the equivalent to angband.ini would be the output from running

          Code:
          defaults read org.rephial.angband
          in a terminal.

          Comment

          • eschiss1
            Apprentice
            • May 2013
            • 59

            I probably should know what you mean (I don't) but "Domain org.rephial.angband does not exist" is the output from running that line.

            Comment

            • backwardsEric
              Knight
              • Aug 2019
              • 590

              On Windows, angband.ini stores the layout of the subwindows and other parameters specific to the front end. For the macOS front end, the equivalent is ~/Library/Preferences/org.rephial.angband.plist . There are at least two ways on the command line to display that file so a human can read it:

              Code:
              defaults read  org.rephial.angband
              or

              Code:
              plutil -p ~/Library/Preferences/org.rephial.angband.plist
              . It sounds like that file is missing so neither is likely to work. Did you run the command logged in as the account that plays Angband?

              Comment

              • eschiss1
                Apprentice
                • May 2013
                • 59

                Yes. The latter command works; I have piped it to an output file and am uploading it as an attachment...
                Attached Files

                Comment

                • eschiss1
                  Apprentice
                  • May 2013
                  • 59

                  Also, not positive which borg.txt you want but I assume you mean the one in the Documents/Angband folder. (I did not overwrite it with the one that came with the 426.216 download, though perhaps was supposed to, and then make the resurrect flag changes again etc.) Anyway, here's the one in the Documents/Angband folder:
                  Attached Files

                  Comment

                  • eschiss1
                    Apprentice
                    • May 2013
                    • 59

                    I'm still doing something wrong- downloaded 228, ignored the borg.txt because haven't received a response on what to do with it, launched it, opened my current save file which works fine with older versions, clicked ^z x 1 return from town, crashed immediately after that one move.

                    Comment

                    • agoodman
                      Adept
                      • Jan 2011
                      • 148

                      Originally posted by eschiss1
                      I'm still doing something wrong- downloaded 228, ignored the borg.txt because haven't received a response on what to do with it, launched it, opened my current save file which works fine with older versions, clicked ^z x 1 return from town, crashed immediately after that one move.
                      Hey, back from traveling.

                      I think your borg.txt looks fine. The only line you changed was the cheat death option. 228 should be the latest version and it isn't crashing for me. My debugs into the detect arrays show my values right (not that they are, just that that is what I am seeing). I am on Windows and currently don't have a Mac to test on. So trying to figure out what is going on.
                      1) did I miss your save file? I see the borg.txt and the output that should correspond to angband.ini (but, unfortunately, isn't a 1-1 mapping so trying to figure out how to translate it). Did you post the save somewhere I missed?
                      2) earlier (https://angband.live/forums/forum/an...210#post258210) you posted a call stack for your crash. Is it still crashing there?

                      Comment

                      • eschiss1
                        Apprentice
                        • May 2013
                        • 59

                        Forgot about the save file. Including the console error log. Even a gzip'd version of my save file is 23 kb so I'm thinking of uploading it to Mediafire or something...

                        Here's a temporary link to an upload of my gzipped savefile (with .txt added at the end, may want to remove that)
                        Attached Files

                        Comment

                        • backwardsEric
                          Knight
                          • Aug 2019
                          • 590

                          With a 170x48 main window, no tiles, and sidebar mode, SCREEN_WID would be 157 and SCREEN_HGT would be 46. With the 66x22 town level, that would mean panels.x is (((66 - 157) * 2) / 157) + 1 = 0 and panels.y is (((22 - 46) * 2) / 46) + 1 = 0. Adjust the formulas for panels.x and panels.y so the cave width minus panel width and cave height minus panel height are coerced to zero if negative (or ensure that panels.x and panels.y are always greater than or equal to one)?

                          Comment

                          • agoodman
                            Adept
                            • Jan 2011
                            • 148

                            After downloading and trying to duplicate the crash (but on Windows, I don't have a Mac) I am having very little success. I can run and debug and the game doesn't crash and everything looks reasonable to me.

                            I am a bit confused by the call stack.
                            Code:
                            0 angband 0x10406731e borg_launch_bolt + 1214
                            1 angband 0x104067902 borg_attack_aux_launch + 386
                            2 angband 0x10406d008 borg_attack + 1096
                            3 angband 0x1040b486e borg_think_dungeon + 2014
                            borg_attack doesn't call borg_attack_aux_launch, it calls borg_calculate_attack_effectiveness which calls borg_attack_aux_launch. So why isn't it showing up that way on the call stack? Perhaps the optimizer optimized/inlined out that function. This makes me worry that there is a further call past borg_launch_bolt that was also optimized out. That would put borg_launch_bolt_at_location and the borg_detect_wall array back in contention. Still, those should always be 2x2 in town and it should always be checking 0,0 to 1,1... I am somewhat mystified.

                            Comment

                            • backwardsEric
                              Knight
                              • Aug 2019
                              • 590

                              When the panel is 1.5 times or larger than the level in a dimension, the corresponding panels.x or panels.y will be 0 and the detect arrays will only have one element in that dimension. In this case, the main window is 170x48 (effectively 157x46 in sidebar mode) and both panels.x and panels.y will be zero in town.

                              Comment

                              • agoodman
                                Adept
                                • Jan 2011
                                • 148

                                Originally posted by backwardsEric
                                When the panel is 1.5 times or larger than the level in a dimension, the corresponding panels.x or panels.y will be 0 and the detect arrays will only have one element in that dimension. In this case, the main window is 170x48 (effectively 157x46 in sidebar mode) and both panels.x and panels.y will be zero in town.
                                panels x and y should be zero but the arrays are created as
                                Code:
                                int array_size_y = panels.y + 1;
                                int array_size_x = panels.x + 1;
                                because the use is sloppy and always does stuff like

                                Code:
                                if (borg_detect_wall[q_y + 0][q_x + 0] == true
                                && borg_detect_wall[q_y + 0][q_x + 1] == true
                                && borg_detect_wall[q_y + 1][q_x + 0] == true
                                && borg_detect_wall[q_y + 1][q_x + 1] == true) {
                                without checking if +1 gets you beyond the number of panels. The old code had those arrays as static and "big". I just left it like this, and did +1 on the creation of the arrays, because I would have to understand all the uses and make sure they were reasonable to correct it. Eventually I will go back and rewrite the stuff that deals with detection to know if what areas are detected are reasonable marked for the borg but I have had other things to do and was just trying to make things work for graphics for now.

                                <new>
                                Oh, duh, if it is zero +1 will still kill me. Okay, let me see how to adjust this.
                                Last edited by agoodman; October 2, 2026, 19:04.

                                Comment

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