Crash - angband: Too many macros!

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Kav
    Scout
    • Jun 2007
    • 39

    Crash - angband: Too many macros!

    I've just lost 3 characters to this crash. I'll just be trolling through the dungeon when suddenly BAM! the game crashes and I lose all my progress. The first two were <10 so who cares, but the last one I just lost the last 6 lvls on a lvl 25 mage. I tried deleting my prf file and remaking it with only the macros I needed, but it keeps happening. At first I thought it had something to do with ` or tab(which I had macroed to identify spell) but I even got it to crash in the macro creation interface while I was trying to load a prf file. I was in the middle of typing mage.prf when it crashed and ge.prf appeared on the console meaning it crashed after typing ma, neither of which has a macro on it.

    What the hell is going on? The error message doesn't seem to have any correlation with the crashes, and all attempts to replicate the crash seem only to be triggered at random.

    This is happening on vanilla angband 3.0.6 running in window mode on kernel 2.6.18-4-686 under Debian Sid.

    For now I think I'm just gonna take the save file over to the XP machine. I'm done putting up with this frustration.
  • takkaria
    Veteran
    • Apr 2007
    • 1951

    #2
    Originally posted by Kav
    I've just lost 3 characters to this crash. I'll just be trolling through the dungeon when suddenly BAM! the game crashes and I lose all my progress. The first two were <10 so who cares, but the last one I just lost the last 6 lvls on a lvl 25 mage. I tried deleting my prf file and remaking it with only the macros I needed, but it keeps happening. At first I thought it had something to do with ` or tab(which I had macroed to identify spell) but I even got it to crash in the macro creation interface while I was trying to load a prf file. I was in the middle of typing mage.prf when it crashed and ge.prf appeared on the console meaning it crashed after typing ma, neither of which has a macro on it.

    What the hell is going on? The error message doesn't seem to have any correlation with the crashes, and all attempts to replicate the crash seem only to be triggered at random.

    This is happening on vanilla angband 3.0.6 running in window mode on kernel 2.6.18-4-686 under Debian Sid.
    Are you using the Debian package? Could you email me the savefile (takkaria@gmail.com)? How many macros do you have? Does the game actually say "Too many macros" when it crashes (i.e. what is the exact message, or is it just "a software bug leaps out at you")?

    If you have any development tools installed, then could you run angband in gdb? ("gdb ./angband -mx11" at the shell.) Then, when it crashes, if you could type "bt", and email me the log, that would be helpful. (If you don't have gdb installed, don't worry.)
    takkaria whispers something about options. -more-

    Comment

    • Kav
      Scout
      • Jun 2007
      • 39

      #3
      I am using the Debian package. When it crashes the angband window disappears and the terminal that I ran it from outputs the line as follows-

      angband: Too many macros!


      After deleting my prf file I created exactly 10 macros. One for each of 8 directions plus one for holding still while holding alt to cast magic missile-
      alt+[direction] - \e\e\em1a[direction]

      and one to cast identify-
      'tab' - \e\e\em3f


      I have gdb installed but have never used it and wouldn't know how. When I run "gdb /usr/games/angband -mx11" it says -mx11 gdb: unrecognized option.

      Comment

      • petebull
        Apprentice
        • May 2007
        • 51

        #4
        Originally posted by Kav
        I have gdb installed but have never used it and wouldn't know how. When I run "gdb /usr/games/angband -mx11" it says -mx11 gdb: unrecognized option.

        GDB uses arguments too, so you must make clear where the GDB options stop. Easiest way for that should be "gdb [options] --args executable-file [inferior-arguments ...]" so you simply insert --args before the angband argument in your command line.

        Comment

        • Kav
          Scout
          • Jun 2007
          • 39

          #5
          I think you just told me to type:
          gdb -mx11 /usr/games/angband

          but I got the same result. Perhaps I don't have the functionality installed required to call on that option?

          Comment

          • takkaria
            Veteran
            • Apr 2007
            • 1951

            #6
            Originally posted by Kav
            I think you just told me to type:
            gdb -mx11 /usr/games/angband

            but I got the same result. Perhaps I don't have the functionality installed required to call on that option?
            He meant gdb --args /usr/games/angband -mx11, I believe. Regardless, you may find this simpler: (just type the text that's in orange at the appropriate prompts)

            Code:
            $ [COLOR="DarkOrange"]gdb /usr/games/angband[/COLOR]
            GNU gdb 6.6-debian
            Copyright (C) 2006 Free Software Foundation, Inc.
            GDB is free software, covered by the GNU General Public License, and you are
            welcome to change it and/or distribute copies of it under certain conditions.
            Type "show copying" to see the conditions.
            There is absolutely no warranty for GDB.  Type "show warranty" for details.
            This GDB was configured as "i486-linux-gnu"...
            Using host libthread_db library "/lib/libthread_db.so.1".
            (gdb) [COLOR="DarkOrange"]run -mx11[/COLOR]
            Starting program: /usr/games/angband -mx11
            takkaria whispers something about options. -more-

            Comment

            • Kav
              Scout
              • Jun 2007
              • 39

              #7
              Doing it that way worked, thanks.

              I started a character and played until I got the crash and error message. Output was as follows.

              /usr/games/angband: Too many macros!
              Program exited with code 01.
              (gdb) bt
              No stack.
              (gdb)

              I'll assume that "No stack" wasn't the result you were hoping for? Being as it exited with a code 01 rather than what the debugger would call a crash (I think) I tried to find "Too many macros!" in the code. Here:



              and a screenshot:



              I had to run it a few times before I got the error because of all my rampant deaths
              Hope that helps.

              Comment

              • takkaria
                Veteran
                • Apr 2007
                • 1951

                #8
                Originally posted by Kav
                I'll assume that "No stack" wasn't the result you were hoping for?
                Good assumption.

                I'm not as to quite how you managed to push the limit of the number of allowed macro that far using just a handful, since the limit is 256... could you zip or tarball the files in ~/.angband/Angband/ so I could take a look?
                takkaria whispers something about options. -more-

                Comment

                • Kav
                  Scout
                  • Jun 2007
                  • 39

                  #9

                  The macros I use to cause the crash are in mage.prf and probly a few others.

                  That's what gets me, I'm obviously not going over the set number of macros. From what I could tell, that error check should only be run on macro creation in the macro control panel '@4'. But for some reason it's poping up while I'm in the middle of donig something, or in the case of when I'm trying to trigger it, just smashing buttons (lots of buttons). Why would the game quit without saving on a macro limit anyway? This just doesn't make any sense. It leaves me with the feeling that a function is running somewhere that it shouldn't be and it's checking macros >= a trash variable.

                  I'd love to be able to run and crash the game while monitoring the #macros variable that, given the error, 'should' be what's causing this, but I wouldn't have any idea how to do that without dropping flags and recompiling.

                  Comment

                  • takkaria
                    Veteran
                    • Apr 2007
                    • 1951

                    #10
                    Originally posted by Kav
                    http://groesch.hopto.org/angband_prefs.tar.gz
                    The macros I use to cause the crash are in mage.prf and probly a few others.

                    That's what gets me, I'm obviously not going over the set number of macros. From what I could tell, that error check should only be run on macro creation in the macro control panel '@4'. But for some reason it's poping up while I'm in the middle of donig something, or in the case of when I'm trying to trigger it, just smashing buttons (lots of buttons). Why would the game quit without saving on a macro limit anyway? This just doesn't make any sense. It leaves me with the feeling that a function is running somewhere that it shouldn't be and it's checking macros >= a trash variable.
                    Got it. main-x11/xaw seems to add macros for every single key combination you ever press. I'm not sure why, but that explains why your game just quits. I think that until I fix the way input is handled generally, the solution is just to up the number of allowed macros a bit.

                    Where the problem lies:
                    takkaria whispers something about options. -more-

                    Comment

                    • Kav
                      Scout
                      • Jun 2007
                      • 39

                      #11
                      Well I guess that means if I play in a console, remotely, or from windows I'll be safe.

                      auto-define macros as needed, very puzzling.

                      Originally posted by takkaria
                      I think that until I fix the way input is handled generally, the solution is just to up the number of allowed macros a bit.
                      I don't suppose you would mind telling me how to do that? Please?

                      Comment

                      • takkaria
                        Veteran
                        • Apr 2007
                        • 1951

                        #12
                        Originally posted by Kav
                        Well I guess that means if I play in a console, remotely, or from windows I'll be safe.

                        I don't suppose you would mind telling me how to do that? Please?
                        It requires compiling the game, having changed MACRO_MAX in defines.h. I don't know how savvy you are with compiling, but I could make you an executable on debian etch easily enough and send it your way.
                        takkaria whispers something about options. -more-

                        Comment

                        • Kav
                          Scout
                          • Jun 2007
                          • 39

                          #13
                          I've compiled plenty of stuff before. The variable change sounds like a no brainer, does 512 sound good? I wouldn't want to bother you any more till I give it a shot myself. Thanks a lot.
                          Last edited by Kav; June 14, 2007, 15:44.

                          Comment

                          • takkaria
                            Veteran
                            • Apr 2007
                            • 1951

                            #14
                            Originally posted by Kav
                            I've compiled plenty of stuff before. The variable change sounds like a no brainer, does 512 sound good? I wouldn't want to bother you any more till I give it a shot myself. Thanks a lot.
                            512 should do fine. (I always assume that people running OS-packaged versions don't "do" compiling.)
                            takkaria whispers something about options. -more-

                            Comment

                            • Kav
                              Scout
                              • Jun 2007
                              • 39

                              #15
                              Here's where my lack of experience kicks in.
                              make install doesn't "install" angband the way I was expecting. In fact it didn't seem to move any of the compiled files at all. Was I just supposed to expect to move them to /usr/games/ on my own or something? I thought all I had to do was change prefix to /usr/games/ in the Makefile, but obviously not. And how do I get it to use my old /var/games/angband directory?

                              Comment

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