[comp.sys.sgi] Program dieing immediatly upon execution

blbates@AERO4.LARC.NASA.GOV ("Brent L. Bates AAD/TAB MS361 x42854") (11/09/90)

    I am trying to port some software that was writen for a 3130 to a 4D/VGX.
Everything compiles ok, however when I try to execute it, I immediatly get
a segmentation violation.  Using edge to debug it, I found it dies upon the
very first executable line.  The line was originally ginit();  I tried 
changing this to winopen, but that didn't change things.
    Anyone have any ideas why it would die on the very first executable line?
There is nothing to debug, because it hasn't done anything.
--

					Brent

ghelms@sgi.com (Gretchen Helms) (11/10/90)

("Brent L. Bates AAD/TAB MS361 x42854") writes:
>    I am trying to port some software that was writen for a 3130 to a 4D/VGX.
>Everything compiles ok, however when I try to execute it, I immediatly get
>a segmentation violation.  Using edge to debug it, I found it dies upon the
>very first executable line.  The line was originally ginit();  I tried 
>changing this to winopen, but that didn't change things.

One thing that changed from 3.2 to 3.3 was that
if you had "winopen();" in your program, it would
die under 3.3.  Seems 3.3 prefers that you use 
"winopen("");" instead.  One thing you definitely 
want to check is to make sure that your winopen
has either a name like winopen("Strange problem");
or else is called like winopen("");

--
    						G. "Murdock" Helms
The further on the edge, 			Silicon Graphics
The hotter the intensity.			Product Support Engineer
						ghelms@csd.sgi.com

steve@olympus.wrcr.unr.edu (Stephen Wheatcraft) (11/12/90)

In article <9011081612.AA02433@aero4.larc.nasa.gov> blbates@AERO4.LARC.NASA.GOV ("Brent L. Bates AAD/TAB MS361 x42854") writes:
>
>    I am trying to port some software that was writen for a 3130 to a 4D/VGX.
>Everything compiles ok, however when I try to execute it, I immediatly get
>a segmentation violation.  Using edge to debug it, I found it dies upon the
>very first executable line.  The line was originally ginit();  I tried 
>changing this to winopen, but that didn't change things.
>    Anyone have any ideas why it would die on the very first executable line?
>There is nothing to debug, because it hasn't done anything.
>--

It may not really be dying on the first line, despite what edge
tells you. You can't always depend on edge (or dbxtool on Suns,
which is very similar) to "tell the truth". I have had several
debugging problems with both in which I was ultimately able to
determine that the debugger was leading me astray. Cost me
several days of wild goose chases a few times. I could go into
details, but I don't think they would help in your case and would
just waste bandwidth. Just remember not to put all your trust in
edge - try some other debugging methods just to be sure.

Steve Wheatcraft                Internet: steve@olympus.wrc.unr.edu
Desert Research Institute       Bitnet  : steve@unsvax.bitnet
University of Nevada System
P.O. Box 60220                  AT&T    : (702) 673-7393
Reno, NV 89506                  FAX     : (702) 673-7397

merritt@iris613.gsfc.nasa.gov (John H Merritt) (11/12/90)

In article <1990Nov9.230351.28413@odin.corp.sgi.com> ghelms@sgi.com (Gretchen Helms) writes:
>
>One thing that changed from 3.2 to 3.3 was that
>if you had "winopen();" in your program, it would
>die under 3.3.  Seems 3.3 prefers that you use 
>"winopen("");" instead.
Wrong, winopen() failed to work in earlier versions, I whould
get core dumps; you were just treading on thin ice.


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
John H. Merritt                   #  Yesterday I knew nothing,
Applied Research Corporation      #  Today I know that.
merritt@iris613.gsfc.nasa.gov     #