Angband.oook.cz
Angband.oook.cz
AboutVariantsLadderForumCompetitionComicScreenshotsFunniesLinks

Go Back   Angband Forums > Angband > Vanilla

Reply
 
Thread Tools Display Modes
Old June 10, 2007, 19:32   #1
Kav
Scout
 
Join Date: Jun 2007
Posts: 39
Kav is on a distinguished road
Angry 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.
Kav is offline   Reply With Quote
Old June 10, 2007, 23:00   #2
takkaria
Veteran
 
takkaria's Avatar
 
Join Date: Apr 2007
Posts: 1,951
Donated: $40
takkaria is on a distinguished road
Quote:
Originally Posted by Kav View Post
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 is offline   Reply With Quote
Old June 11, 2007, 02:08   #3
Kav
Scout
 
Join Date: Jun 2007
Posts: 39
Kav is on a distinguished road
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.
Kav is offline   Reply With Quote
Old June 11, 2007, 19:16   #4
petebull
Apprentice
 
Join Date: May 2007
Location: Germany
Posts: 51
Donated: $5.70
petebull is on a distinguished road
Quote:
Originally Posted by Kav View Post
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.
petebull is offline   Reply With Quote
Old June 11, 2007, 22:20   #5
Kav
Scout
 
Join Date: Jun 2007
Posts: 39
Kav is on a distinguished road
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?
Kav is offline   Reply With Quote
Old June 12, 2007, 00:09   #6
takkaria
Veteran
 
takkaria's Avatar
 
Join Date: Apr 2007
Posts: 1,951
Donated: $40
takkaria is on a distinguished road
Quote:
Originally Posted by Kav View Post
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:
$ gdb /usr/games/angband
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) run -mx11
Starting program: /usr/games/angband -mx11
takkaria is offline   Reply With Quote
Old June 13, 2007, 02:56   #7
Kav
Scout
 
Join Date: Jun 2007
Posts: 39
Kav is on a distinguished road
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:

http://csourcesearch.net/package/ang...0.5/src/util.c

and a screenshot:

http://groesch.hopto.org/gkrellShoot...-07_214911.png

I had to run it a few times before I got the error because of all my rampant deaths
Hope that helps.
Kav is offline   Reply With Quote
Old June 13, 2007, 08:43   #8
takkaria
Veteran
 
takkaria's Avatar
 
Join Date: Apr 2007
Posts: 1,951
Donated: $40
takkaria is on a distinguished road
Quote:
Originally Posted by Kav View Post
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 is offline   Reply With Quote
Old June 13, 2007, 14:05   #9
Kav
Scout
 
Join Date: Jun 2007
Posts: 39
Kav is on a distinguished road
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.

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.
Kav is offline   Reply With Quote
Old June 13, 2007, 17:52   #10
takkaria
Veteran
 
takkaria's Avatar
 
Join Date: Apr 2007
Posts: 1,951
Donated: $40
takkaria is on a distinguished road
Quote:
Originally Posted by Kav View Post
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:
http://angband.oook.cz/file.php?dir=...in-x11.c##1632
takkaria is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 12:58.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2023, vBulletin Solutions Inc.