Re: [gdb] crash

From: Walter Goodwin (jgoodwin@expert.cc.purdue.edu)
Date: 02/14/97


> 
> okay.. I've got memorize put in on my mud <Thanks Justin>
> and whenever I type pray or mem without a argument it crashes..
> here is gdb output
> #0  0x4003c317 in _IO_vfprintf ()
> (gdb) bt
> #0  0x4003c317 in _IO_vfprintf ()
> #1  0x40040aa6 in _IO_vsprintf ()
> #2  0x80b13a4 in buf ()
> Cannot access memory at address 0xfbad0001.
> I can't exactly understand this.. but maybe one of you gurus can tell
> me whats wrong :P thanks
> 

Well, considering I have no idea what you are talking about, I'll tell
you what my psychotic abilities tell me.  At the beginning of the crashing
command, put a nice :
if (!arg)
  return;

at the top of the function, also, you _could_ put a nice
send_to_char("Do WHAT?\n", ch); right before the return so the player
knows not to use it without an argument :)

Of course, this is a simple hack, so if you really want to find out
whats going on, load up the function into your favorite text editor,
and trace out on paper (or whatever) over each operation, and see if something
wierd is happening.  Funny things like referencing arrays with negative
numbers can do wierd things.
+-----------------------------------------------------------+
| Ensure that you have read the CircleMUD Mailing List FAQ: |
|   http://cspo.queensu.ca/~fletcher/Circle/list_faq.html   |
|    Or send 'info circle' to majordomo@cspo.queensu.ca     |
+-----------------------------------------------------------+



This archive was generated by hypermail 2b30 : 12/18/00 PST