Re: Crashing :(

From: Chris Herringshaw (Chris.Herringshaw@med.umich.edu)
Date: 11/30/94


Sean - a word of suggestion.  Since I have no idea what sort
of error you are crashing on, I can only guess.  Segmentation
Violation would be the most likely choise.  Now when your debugging
and you come across something like this, you need to take a look
at what it's *really* saying.  Yes, the program crashed on
a C library function (doprnt), which was called from inside a C 
library function (sprintf).  Now since your program worked before,
you know that sprintf and subsequently doprnt do not have
bugs in them, so you must have created the bugs while coding.
I would have to guess there is something wrong with one of the
parameters you are passing to sprintf.  So make sure you are
passing all the correct type of arguments to sprintf in
the function get_filename.  One thing that pops to mind is
to make sure that the variables used to create the string
you desire are valid, IE you don't include a %s whose matching
ch->whatever is undefined, and that your not passing a NULL
pointer as the argument to put the finished string into, etc.

====================================================================
Christopher Herringshaw     Networking and Special Projects Division
Medical Center Information Technology (MCIT)   xxviper@med.umich.edu
University of Michigan Medical Center, B1911 CFOB
1414 Catherine Street, Ann Arbor, MI 48109-0704       (313) 747-2778
====================================================================

On Wed, 30 Nov 1994, Sean P. Mountcastle wrote:

> Hello,
> 
> 	I am having some major problems with my version of Circle.  This
> has not happened since before last night when I recompiled.  When I dbx
> the core (and type where) I get something I've never seen before.  It
> appears to be pointing me to a file named doprnt.c - which is not a part
> of the MUD, unless it is included in the C Library.  I'm using gcc if that
> helps anyone.  Here's what (dbx) where gives me:
> 
> > 0 _doprnt(0x7fff9654, 0x40, 0x47be70, 0x10029e2c, 0x479ea0)
> ["../doprnt.c":99
>   1 sprintf.sprintf(0x1001a9ec, 0x10023c28, 0x10023c54, 0x7fff9670,
> 0x10023c30)
>   2 get_filename(orig_name = 0x736d6165 = "
> data address 0x10000000 out of ranges 0x10371000..0x7fff8000 0x7fffc000..
> 0x736d6
> 
> 	I know most of this is just the addresses in memory, but I include
> them for the sake of thoroughness.  I desperately hope that someone can
> help me.  dbx has usually answered all of my questions in the past but I
> cannot even find doprnt.c
> 	Thank you very much in advance,
> 
> 	- Sean Mountcastle
> 
> 



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